Ignore:
Timestamp:
Oct 6, 2011, 11:17:07 AM (14 years ago)
Author:
[email protected]
Message:

Add explicit JSGlobalThis type.
https://bugs.webkit.org/show_bug.cgi?id=69478

Reviewed by Darin Adler.

JSC supports a split global object, as used by WebCore for the Window. As a stage
of making this visible to JSC, make it so that if the global this value is not the
global object itself, it must be a subclass of JSGlobalThis.

Source/JavaScriptCore:

  • API/JSCallbackObjectFunctions.h:

(JSC::::finishCreation):

  • Don't pass the thisValue to JSGlobalObject::finishCreation.
  • JavaScriptCore.xcodeproj/project.pbxproj:
    • Added JSGlobalThis.h
  • jsc.cpp:

(GlobalObject::finishCreation):

  • Don't pass the thisValue to JSGlobalObject::finishCreation.
  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::create):
(JSC::JSGlobalObject::finishCreation):

  • finishCreation takes a JSGlobalThis, or thisValue is implicit.
  • runtime/JSGlobalThis.h: Added.

(JSC::JSGlobalThis::create):
(JSC::JSGlobalThis::JSGlobalThis):
(JSC::JSGlobalThis::finishCreation):

  • Thin wrapper on JSNonFinalObject to allow type checking.
  • testRegExp.cpp:

(GlobalObject::finishCreation):

  • Don't pass the thisValue to JSGlobalObject::finishCreation.

Source/JavaScriptGlue:

  • JSRun.h:

(JSGlueGlobalObject::create):

  • Don't pass the thisValue to JSGlobalObject::finishCreation.

Source/WebCore:

  • ForwardingHeaders/runtime/JSGlobalThis.h: Added.
    • Added forwarding header.
  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::finishCreation):

  • bindings/js/JSDOMGlobalObject.h:
    • finishCreation takes a JSGlobalThis, or thisValue is implicit.
  • bindings/js/JSDOMWindowShell.h:
    • Make the window shell a subclass of JSGlobalThis.
  • bindings/js/JSWorkerContextBase.cpp:

(WebCore::JSWorkerContextBase::finishCreation):

  • Don't pass the thisValue to JSGlobalObject::finishCreation.
  • bindings/js/JSWorkerContextBase.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):

  • Don't pass the thisValue to JSGlobalObject::finishCreation, for worker contexts.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r96831 r96836  
     12011-10-05  Gavin Barraclough  <[email protected]>
     2
     3        Add explicit JSGlobalThis type.
     4        https://bugs.webkit.org/show_bug.cgi?id=69478
     5
     6        Reviewed by Darin Adler.
     7
     8        JSC supports a split global object, as used by WebCore for the Window. As a stage
     9        of making this visible to JSC, make it so that if the global this value is not the
     10        global object itself, it must be a subclass of JSGlobalThis.
     11
     12        * API/JSCallbackObjectFunctions.h:
     13        (JSC::::finishCreation):
     14            - Don't pass the thisValue to JSGlobalObject::finishCreation.
     15        * JavaScriptCore.xcodeproj/project.pbxproj:
     16            - Added JSGlobalThis.h
     17        * jsc.cpp:
     18        (GlobalObject::finishCreation):
     19            - Don't pass the thisValue to JSGlobalObject::finishCreation.
     20        * runtime/JSGlobalObject.h:
     21        (JSC::JSGlobalObject::create):
     22        (JSC::JSGlobalObject::finishCreation):
     23            - finishCreation takes a JSGlobalThis, or thisValue is implicit.
     24        * runtime/JSGlobalThis.h: Added.
     25        (JSC::JSGlobalThis::create):
     26        (JSC::JSGlobalThis::JSGlobalThis):
     27        (JSC::JSGlobalThis::finishCreation):
     28            - Thin wrapper on JSNonFinalObject to allow type checking.
     29        * testRegExp.cpp:
     30        (GlobalObject::finishCreation):
     31            - Don't pass the thisValue to JSGlobalObject::finishCreation.
     32
    1332011-10-06  Mark Hahnenberg  <[email protected]>
    234
Note: See TracChangeset for help on using the changeset viewer.