RESOLVED FIXED 93952
Remove custom bindings from ConvolverNode.idl
https://bugs.webkit.org/show_bug.cgi?id=93952
Summary Remove custom bindings from ConvolverNode.idl
Vineet Chaudhary (vineetc)
Reported 2012-08-14 03:42:16 PDT
We should remove custom bindings as CodeGenerator uses UNUSED_PARAM macro. This was introduced in r72838.
Attachments
Patch (9.11 KB, patch)
2012-08-14 03:46 PDT, Vineet Chaudhary (vineetc)
no flags
Vineet Chaudhary (vineetc)
Comment 1 2012-08-14 03:46:57 PDT
Created attachment 158284 [details] Patch Actually I was planning to remove custom bindings from AudioBufferSourceNode.idl to but I couldn't find a way to throw exception from AudioBufferSourceNode::setBuffer() in AudioBufferSourceNode.cpp for both JSC and V8. Is there any way to throw TypeError in common both for JSC and V8?
Kentaro Hara
Comment 2 2012-08-14 03:54:04 PDT
(In reply to comment #1) > Actually I was planning to remove custom bindings from AudioBufferSourceNode.idl to but I couldn't find a way to throw exception from AudioBufferSourceNode::setBuffer() in AudioBufferSourceNode.cpp for both JSC and V8. > Is there any way to throw TypeError in common both for JSC and V8? No. If you could throw TypeError from WebCore, binding layer has to catch the error and rethrow it to JavaScript, which means that you cannot avoid handling error in the binding layer anyway.
Kentaro Hara
Comment 3 2012-08-14 03:54:12 PDT
Comment on attachment 158284 [details] Patch OK
Vineet Chaudhary (vineetc)
Comment 4 2012-08-14 04:25:54 PDT
(In reply to comment #2) > (In reply to comment #1) > > Actually I was planning to remove custom bindings from AudioBufferSourceNode.idl to but I couldn't find a way to throw exception from AudioBufferSourceNode::setBuffer() in AudioBufferSourceNode.cpp for both JSC and V8. > > Is there any way to throw TypeError in common both for JSC and V8? > > No. If you could throw TypeError from WebCore, binding layer has to catch the error and rethrow it to JavaScript, which means that you cannot avoid handling error in the binding layer anyway. Ohh thanks I got it. For that we can use ExceptionCode enum. So we may use INVALID_ACCESS_ERR for TypeError. But again we have different TypeError messages here like "Value is not of type AudioBuffer" and "AudioBuffer unsupported number of channels" too :(.
Kentaro Hara
Comment 5 2012-08-14 04:33:35 PDT
(In reply to comment #4) > Ohh thanks I got it. For that we can use ExceptionCode enum. > So we may use INVALID_ACCESS_ERR for TypeError. Actually ExceptionCode is not for JavaScript errors but for DOM exceptions. We don't want to mix them just for auto-generating code. But if we can remove a bunch of custom bindings by introducing something like that, it might be worth considering. It would depend on the benefit. > But again we have different TypeError messages here like "Value is not of type AudioBuffer" and "AudioBuffer unsupported number of channels" too :(. Yeah. My point is that "given that the binding layer has to handle the error anyway, let's handle it straightforwardly in the binding layer even if we use custom bindings".
WebKit Review Bot
Comment 6 2012-08-14 05:10:52 PDT
Comment on attachment 158284 [details] Patch Clearing flags on attachment: 158284 Committed r125550: <http://trac.webkit.org/changeset/125550>
WebKit Review Bot
Comment 7 2012-08-14 05:10:59 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.