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

Kentaro Hara
Reported 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.
Attachments
Patch (11.56 KB, patch)
2012-01-11 17:10 PST, Kentaro Hara
no flags
rebased patch for commit (11.51 KB, patch)
2012-01-11 17:22 PST, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2012-01-11 17:10:58 PST
Kentaro Hara
Comment 2 2012-01-11 17:22:23 PST
Created attachment 122138 [details] rebased patch for commit
WebKit Review Bot
Comment 3 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>
Takeshi Yoshino
Comment 4 2013-04-08 22:54:05 PDT
Looks like it's ok to close this. Reopen if not.
Note You need to log in before you can comment on or make changes to this bug.