Bug 157120 - The GetterSetter structure needs a globalObject.
Summary: The GetterSetter structure needs a globalObject.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-04-27 22:44 PDT by Mark Lam
Modified: 2016-04-27 23:55 PDT (History)
8 users (show)

See Also:


Attachments
proposed patch. (9.14 KB, patch)
2016-04-27 22:50 PDT, Mark Lam
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2016-04-27 22:44:38 PDT
In r199170: <http://trac.webkit.org/changeset/199170>, GetterSetter was promoted from a JSCell to a JSObject.  JSObject methods expect their structure to have a globalObject.  For example, see JSObject::calculatedClassName().  GetterSetter was previously using a singleton getterSetterStructure owned by the VM.  That singleton getterSetterStructure is not associated with any globalObjects.  As a result, JSObject::calculatedClassName() will run into a null globalObject when it is called on a GetterSetter object.

This patch removes the VM singleton getterSetterStructure, and instead, creates a getterSetterStructure for each JSGlobalObject.
Comment 1 Mark Lam 2016-04-27 22:45:10 PDT
<rdar://problem/25965945>
Comment 2 Mark Lam 2016-04-27 22:50:55 PDT
Created attachment 277595 [details]
proposed patch.
Comment 3 Mark Lam 2016-04-27 23:55:10 PDT
Thanks for the review.  Landed in r200177: <http://trac.webkit.org/r200177>.