Changeset 96836 in webkit for trunk/Source/JavaScriptCore/API


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
Note: See TracChangeset for help on using the changeset viewer.