Bug 135250 - Creating a JSGlobalObject with a custom JSClassRef results in a JSProxy with the wrong prototype
Summary: Creating a JSGlobalObject with a custom JSClassRef results in a JSProxy with ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Hahnenberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-24 13:03 PDT by Mark Hahnenberg
Modified: 2014-08-05 16:54 PDT (History)
1 user (show)

See Also:


Attachments
Patch (15.87 KB, patch)
2014-07-24 13:13 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff
Windows fix (15.93 KB, patch)
2014-07-24 15:33 PDT, Mark Hahnenberg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hahnenberg 2014-07-24 13:03:57 PDT
JSGlobalObject::resetPrototype (which is called from JSGlobalContextCreateInGroup) doesn't change its JSProxy's prototype as well. This results in a JSProxy where no properties in the original prototype chain (as created from the JSClassRef hierarchy) are accessible.
Comment 1 Mark Hahnenberg 2014-07-24 13:13:21 PDT
Created attachment 235452 [details]
Patch
Comment 2 Mark Hahnenberg 2014-07-24 13:14:06 PDT
<rdar://problem/17706699>
Comment 3 WebKit Commit Bot 2014-07-24 13:14:54 PDT
Attachment 235452 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/API/tests/CustomGlobalObjectClassTest.c: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]
ERROR: Source/JavaScriptCore/API/tests/CustomGlobalObjectClassTest.c:79:  Declaration has space between * and variable name in char* buffer  [whitespace/declaration] [3]
Total errors found: 2 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Geoffrey Garen 2014-07-24 13:40:32 PDT
Comment on attachment 235452 [details]
Patch

r=me
Comment 5 Mark Hahnenberg 2014-07-24 15:33:57 PDT
Created attachment 235466 [details]
Windows fix
Comment 6 WebKit Commit Bot 2014-07-24 15:35:17 PDT
Attachment 235466 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/API/tests/CustomGlobalObjectClassTest.c: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]
ERROR: Source/JavaScriptCore/API/tests/CustomGlobalObjectClassTest.c:79:  Declaration has space between * and variable name in char* buffer  [whitespace/declaration] [3]
Total errors found: 2 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Mark Hahnenberg 2014-07-24 15:56:29 PDT
Committed r171543: <http://trac.webkit.org/changeset/171543>