Bug 160475

Summary: Drop custom bindings code for HTMLOptionsCollection.remove()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, commit-queue, darin, dbates, esprehn+autocc, gyuyoung.kim, kondapallykalyan, rniwa, sam
Priority: P2 Keywords: WebExposed
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
URL: https://html.spec.whatwg.org/multipage/infrastructure.html#htmloptionscollection
See Also: https://bugs.webkit.org/show_bug.cgi?id=160477
Bug Depends on: 160394    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2016-08-02 16:07:34 PDT
Drop custom bindings code for HTMLOptionsCollection.remove() and use overloading instead.
Comment 1 Chris Dumez 2016-08-02 16:09:09 PDT
Generated code looks like so:
EncodedJSValue JSC_HOST_CALL jsHTMLOptionsCollectionPrototypeFunctionRemove(ExecState* state)
{
    size_t argsCount = std::min<size_t>(1, state->argumentCount());
    if (argsCount == 1) {
        JSValue distinguishingArg = state->uncheckedArgument(0);
        if (distinguishingArg.isObject() && asObject(distinguishingArg)->inherits(JSHTMLOptionElement::info()))
            return jsHTMLOptionsCollectionPrototypeFunctionRemove2(state);
        if (distinguishingArg.isNumber())
            return jsHTMLOptionsCollectionPrototypeFunctionRemove1(state);
        return jsHTMLOptionsCollectionPrototypeFunctionRemove1(state);
    }
    return argsCount < 1 ? throwVMError(state, createNotEnoughArgumentsError(state)) : throwVMTypeError(state);
}
Comment 2 Chris Dumez 2016-08-02 16:12:04 PDT
Created attachment 285155 [details]
Patch
Comment 3 Chris Dumez 2016-08-02 16:28:51 PDT
Created attachment 285158 [details]
Patch
Comment 4 WebKit Commit Bot 2016-08-02 19:57:25 PDT
Comment on attachment 285158 [details]
Patch

Clearing flags on attachment: 285158

Committed r204063: <http://trac.webkit.org/changeset/204063>
Comment 5 WebKit Commit Bot 2016-08-02 19:57:30 PDT
All reviewed patches have been landed.  Closing bug.