WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
126670
Constructors for Objective-C classes do not work properly with instanceof
https://bugs.webkit.org/show_bug.cgi?id=126670
Summary
Constructors for Objective-C classes do not work properly with instanceof
Mark Hahnenberg
Reported
2014-01-08 16:02:06 PST
This is due to the fact that the JS constructors created for Objective-C classes via the JSC API inherit from JSCallbackObject, which overrides hasInstance with its own customHasInstance. JSCallbackObject::customHasInstance only checks the JSClassRefs for hasInstance callbacks. If it doesn't find any callbacks, it returns false. One way to fix this would be to change JSCallbackObject::customHasInstance to return JSObject::defaultHasInstance in the case where no hasInstance callbacks are found.
Attachments
Patch
(2.87 KB, patch)
2014-01-08 16:11 PST
,
Mark Hahnenberg
no flags
Details
Formatted Diff
Diff
Patch
(5.15 KB, patch)
2014-01-08 16:30 PST
,
Mark Hahnenberg
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Mark Hahnenberg
Comment 1
2014-01-08 16:02:47 PST
<
rdar://problem/15710527
>
Mark Hahnenberg
Comment 2
2014-01-08 16:11:01 PST
Created
attachment 220672
[details]
Patch
Geoffrey Garen
Comment 3
2014-01-08 16:21:02 PST
Comment on
attachment 220672
[details]
Patch r=me
Mark Hahnenberg
Comment 4
2014-01-08 16:30:17 PST
Created
attachment 220674
[details]
Patch
WebKit Commit Bot
Comment 5
2014-01-09 11:10:56 PST
Comment on
attachment 220674
[details]
Patch Clearing flags on attachment: 220674 Committed
r161564
: <
http://trac.webkit.org/changeset/161564
>
WebKit Commit Bot
Comment 6
2014-01-09 11:10:58 PST
All reviewed patches have been landed. Closing bug.
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