Ignore:
Timestamp:
Oct 27, 2011, 10:01:38 AM (14 years ago)
Author:
[email protected]
Message:

De-virtualize JSCell::toThisObject
https://bugs.webkit.org/show_bug.cgi?id=70958

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Converted all instances of toThisObject to static functions,
added toThisObject to the MethodTable, and replaced all call sites
with a corresponding lookup in the MethodTable.

  • API/JSContextRef.cpp:
  • JavaScriptCore.exp:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  • runtime/ClassInfo.h:
  • runtime/JSActivation.cpp:

(JSC::JSActivation::toThisObject):

  • runtime/JSActivation.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::toThisObject):

  • runtime/JSCell.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::put):
(JSC::JSObject::toThisObject):

  • runtime/JSObject.h:

(JSC::JSValue::toThisObject):

  • runtime/JSStaticScopeObject.cpp:

(JSC::JSStaticScopeObject::toThisObject):

  • runtime/JSStaticScopeObject.h:
  • runtime/JSString.cpp:

(JSC::JSString::toThisObject):

  • runtime/JSString.h:
  • runtime/StrictEvalActivation.cpp:

(JSC::StrictEvalActivation::toThisObject):

  • runtime/StrictEvalActivation.h:

Source/WebCore:

No new tests.

Converted all instances of toThisObject to static functions,
added toThisObject to the MethodTable, and replaced all call sites
with a corresponding lookup in the MethodTable.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::toThisObject):

  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSErrorHandler.cpp:

(WebCore::JSErrorHandler::handleEvent):

  • bridge/NP_jsobject.cpp:

(_NPN_Invoke):

  • bridge/qt/qt_runtime.cpp:

(JSC::Bindings::QtRuntimeConnectionMethod::call):

Source/WebKit/mac:

Converted all instances of toThisObject to static functions,
added toThisObject to the MethodTable, and replaced all call sites
with a corresponding lookup in the MethodTable.

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::NetscapePluginInstanceProxy::invoke):
(WebKit::NetscapePluginInstanceProxy::invokeDefault):

Source/WebKit2:

Converted all instances of toThisObject to static functions,
added toThisObject to the MethodTable, and replaced all call sites
with a corresponding lookup in the MethodTable.

  • WebProcess/Plugins/Netscape/NPJSObject.cpp:

(WebKit::NPJSObject::invoke):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSContextRef.cpp

    r95510 r98593  
    164164
    165165    // It is necessary to call toThisObject to get the wrapper object when used with WebCore.
    166     return toRef(exec->lexicalGlobalObject()->toThisObject(exec));
     166    return toRef(exec->lexicalGlobalObject()->methodTable()->toThisObject(exec->lexicalGlobalObject(), exec));
    167167}
    168168
Note: See TracChangeset for help on using the changeset viewer.