Bug 160475 - Drop custom bindings code for HTMLOptionsCollection.remove()
Summary: Drop custom bindings code for HTMLOptionsCollection.remove()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL: https://html.spec.whatwg.org/multipag...
Keywords: WebExposed
Depends on: 160394
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-02 16:07 PDT by Chris Dumez
Modified: 2016-08-02 19:57 PDT (History)
9 users (show)

See Also:


Attachments
Patch (10.36 KB, patch)
2016-08-02 16:12 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (10.30 KB, patch)
2016-08-02 16:28 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.