Bug 76127

Summary: [JSC] Remove redundant arguments from [Supplemental] custom methods
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, japhet, sam, tyoshino, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 72138    
Attachments:
Description Flags
Patch
none
rebased patch for commit none

Description Kentaro Hara 2012-01-11 16:50:57 PST
Since in JSC a callback of custom methods is non-static, we do not need to pass a pointer of an implementation object.

Before (JSTestInterface.cpp):
JSValue jsTestInterfaceSupplementalStr3(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSTestInterface* castedThis = static_cast<JSTestInterface*>(asObject(slotBase));
    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
    return castedThis->supplementalStr3(impl, exec);
}

After (JSTestInterface.cpp):
JSValue jsTestInterfaceSupplementalStr3(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSTestInterface* castedThis = static_cast<JSTestInterface*>(asObject(slotBase));
     return castedThis->supplementalStr3(exec);  // JSTestInterface knows 'impl'.
}

We should also remove redundant arguments from JSDOMWindowWebSocketCustom.cpp and JSDOMWindowWebAudioCustom.cpp.
Comment 1 Kentaro Hara 2012-01-11 17:10:58 PST
Created attachment 122135 [details]
Patch
Comment 2 Kentaro Hara 2012-01-11 17:22:23 PST
Created attachment 122138 [details]
rebased patch for commit
Comment 3 WebKit Review Bot 2012-01-11 17:58:01 PST
Comment on attachment 122138 [details]
rebased patch for commit

Clearing flags on attachment: 122138

Committed r104778: <http://trac.webkit.org/changeset/104778>
Comment 4 Takeshi Yoshino 2013-04-08 22:54:05 PDT
Looks like it's ok to close this. Reopen if not.