Summary: | [WebIDL] Overloaded functions should throw this object check exception before argument check exception | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||||
Component: | Bindings | Assignee: | Sam Weinig <sam> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cdumez, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Created attachment 311400 [details]
Patch
Comment on attachment 311400 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=311400&action=review r=me > Source/WebCore/ChangeLog:13 > + - Made is so all operations, including static ones, use the trampoline / body model, made *it* ? > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4401 > + assert("[Custom] is not support for overloaded operations.") if $isCustom && $isOverloaded; *supported* > Source/WebCore/bindings/scripts/test/JS/JSTestGlobalObject.cpp:393 > +static inline JSC::EncodedJSValue jsTestGlobalObjectInstanceFunctionEnabledAtRuntimeOperationBody2(JSC::ExecState* state, typename IDLOperation<JSTestGlobalObject>::ClassParameter castedThis, JSC::ThrowScope& throwScope) My personal preference would have been Operation2Body rather than OperationBody2. > Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp:886 > +static inline JSC::EncodedJSValue jsTestInterfacePrototypeFunctionSupplementalMethod2Body(JSC::ExecState* state, typename IDLOperation<JSTestInterface>::ClassParameter castedThis, JSC::ThrowScope& throwScope) Notice that the format here is Method2Body, not MethodBody2. Committed r217518: <http://trac.webkit.org/changeset/217518> |
Created attachment 310959 [details] Test case Overloaded functions currently do argument checks before the this object check, which leads to the exceptions being thrown in the wrong order.