Ignore:
Timestamp:
Dec 28, 2018, 8:24:29 PM (6 years ago)
Author:
[email protected]
Message:

[JSC] Remove one indirection in JSObject::toStringName
https://bugs.webkit.org/show_bug.cgi?id=193037

Reviewed by Keith Miller.

Source/JavaScriptCore:

We should not have additional one-level indirection in JSObject::toStringName.
JSObject::toStringName is dispatched through methodTable. Even after that, we
need to call JSObject::className function through methodTable again. But className
function is rarely defined. So instead of introducing this indirection here,
classes having className functions should have toStringName function too. This can
remove one-level indirection in toStringName in major cases.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::toStringName):

  • debugger/DebuggerScope.cpp:

(JSC::DebuggerScope::toStringName):

  • debugger/DebuggerScope.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::toStringName):

Source/WebCore:

Use old JSObject::toStringName function here.

  • bindings/js/JSDOMConstructorBase.cpp:

(WebCore::JSDOMConstructorBase::className):
(WebCore::JSDOMConstructorBase::toStringName):

  • bindings/js/JSDOMConstructorBase.h:

(WebCore::JSDOMConstructorBase::className): Deleted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/debugger/DebuggerScope.h

    r233765 r239557  
    4343    static void visitChildren(JSCell*, SlotVisitor&);
    4444    static String className(const JSObject*, VM&);
     45    static String toStringName(const JSObject*, ExecState*);
    4546    static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    4647    static bool put(JSCell*, ExecState*, PropertyName, JSValue, PutPropertySlot&);
Note: See TracChangeset for help on using the changeset viewer.