RESOLVED FIXED 172480
[WebIDL] Overloaded functions should throw this object check exception before argument check exception
https://bugs.webkit.org/show_bug.cgi?id=172480
Summary [WebIDL] Overloaded functions should throw this object check exception before...
Sam Weinig
Reported 2017-05-22 17:10:23 PDT
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.
Attachments
Test case (645 bytes, text/html)
2017-05-22 17:10 PDT, Sam Weinig
no flags
Patch (299.28 KB, patch)
2017-05-26 17:15 PDT, Sam Weinig
cdumez: review+
Sam Weinig
Comment 1 2017-05-26 17:15:31 PDT
Chris Dumez
Comment 2 2017-05-26 18:49:54 PDT
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.
Sam Weinig
Comment 3 2017-05-26 19:54:04 PDT
Radar WebKit Bug Importer
Comment 4 2017-05-30 20:24:40 PDT
Note You need to log in before you can comment on or make changes to this bug.