Bug 135250

Summary: Creating a JSGlobalObject with a custom JSClassRef results in a JSProxy with the wrong prototype
Product: WebKit Reporter: Mark Hahnenberg <mhahnenberg>
Component: JavaScriptCoreAssignee: Mark Hahnenberg <mhahnenberg>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Windows fix none

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>