WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
43163
Add a CF-style base type (WKTypeRef) as a base for polymorphic functions
https://bugs.webkit.org/show_bug.cgi?id=43163
Summary
Add a CF-style base type (WKTypeRef) as a base for polymorphic functions
Sam Weinig
Reported
2010-07-28 17:40:57 PDT
Add a CF-style base type (WKTypeRef) as a base for polymorphic functions.
Attachments
Patch
(46.55 KB, patch)
2010-07-28 17:41 PDT
,
Sam Weinig
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Sam Weinig
Comment 1
2010-07-28 17:41:52 PDT
Created
attachment 62900
[details]
Patch
WebKit Review Bot
Comment 2
2010-07-28 17:44:10 PDT
Attachment 62900
[details]
did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebKit2/UIProcess/API/C/WKType.cpp:26: Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4] WebKit2/UIProcess/API/C/WKAPICast.h:54: More than one command on the same line [whitespace/newline] [4] WebKit2/UIProcess/API/C/WKAPICast.h:61: More than one command on the same line [whitespace/newline] [4] WebKit2/UIProcess/API/C/WKAPICast.h:62: More than one command on the same line [whitespace/newline] [4] WebKit2/UIProcess/API/C/WKAPICast.h:69: More than one command on the same line [whitespace/newline] [4] WebKit2/UIProcess/API/C/WKAPICast.h:77: More than one command on the same line [whitespace/newline] [4] WebKit2/UIProcess/API/C/WKAPICast.h:124: Extra space before last semicolon. If this should be an empty statement, use { } instead. [whitespace/semicolon] [5] Total errors found: 7 in 54 files If any of these errors are false positives, please file a bug against check-webkit-style.
Darin Adler
Comment 3
2010-07-28 17:47:26 PDT
Comment on
attachment 62900
[details]
Patch
> + virtual Type type() const { return TypeArray; }
> + virtual Type type() const { return TypeString; }
> + virtual Type type() const { return TypeURL; }
> + virtual Type type() const { return TypeBackForwardList; }
> + virtual Type type() const { return TypeBackForwardListItem; }
> + virtual Type type() const { return TypeContext; }
> + virtual Type type() const { return TypeFramePolicyListener; }
> + virtual Type type() const { return TypeFrame; }
> + virtual Type type() const { return TypeNavigationData; }
> + virtual Type type() const { return TypePageNamespace; }
> + virtual Type type() const { return TypePage; }
> + virtual Type type() const { return TypePreferences; }
> + virtual Type type() const { return TypeBundleFrame; }
> + virtual Type type() const { return TypeBundlePage; }
Making this private may catch some callers accidentally calling the virtual function on something already known to be a WebArray.
> + operator APIType() { return reinterpret_cast<APIType>(m_impl.get()); }
Doesn't static_cast work for this? If not, why not?
Sam Weinig
Comment 4
2010-07-28 18:00:06 PDT
(In reply to
comment #3
)
> (From update of
attachment 62900
[details]
) > > + virtual Type type() const { return TypeArray; } > > > + virtual Type type() const { return TypeString; } > > > + virtual Type type() const { return TypeURL; } > > > + virtual Type type() const { return TypeBackForwardList; } > > > + virtual Type type() const { return TypeBackForwardListItem; } > > > + virtual Type type() const { return TypeContext; } > > > + virtual Type type() const { return TypeFramePolicyListener; } > > > + virtual Type type() const { return TypeFrame; } > > > + virtual Type type() const { return TypeNavigationData; } > > > + virtual Type type() const { return TypePageNamespace; } > > > + virtual Type type() const { return TypePage; } > > > + virtual Type type() const { return TypePreferences; } > > > + virtual Type type() const { return TypeBundleFrame; } > > > + virtual Type type() const { return TypeBundlePage; } > > Making this private may catch some callers accidentally calling the virtual function on something already known to be a WebArray.
Will do.
> > + operator APIType() { return reinterpret_cast<APIType>(m_impl.get()); } > > Doesn't static_cast work for this? If not, why not?
/Volumes/Data/Users/weinig/Code/webkit/OpenSource/WebKit2/UIProcess/API/C/WKAPICast.h:91: error: invalid static_cast from type 'WebKit::WebString*' to type 'OpaqueWKStringRef*'
Sam Weinig
Comment 5
2010-07-28 21:52:57 PDT
Landed in
http://trac.webkit.org/changeset/64253
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug