Bug 94790

Summary: Derived JS binding code throws a different exception than the normal one for overloaded functions when argument count is not enough
Product: WebKit Reporter: Xiaobo Wang <xiaobwang>
Component: WebCore JavaScriptAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ap, dglazkov, haraken, japhet, jay.bhaskar, mxie, rwlbuis, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
none
Archive of layout-test-results from gce-cr-linux-08
none
patch wich V8 update
haraken: commit-queue-
Archive of layout-test-results from gce-cr-linux-08
none
patch revision 3 none

Xiaobo Wang
Reported 2012-08-23 01:43:21 PDT
Observed by 2 failed DRT tests if MEDIA_STREAM is enabled. fast/files/create-blob-url-crash.html fast/files/url-required-arguments.html The reason is DOMURL::createObjectURL() is a overloaded when MEDIA_STREAM is enabled. A dispatching function is added for overloaded functions, and it doesn't check argument count if failed to dispatch the call to one of the overloaded functions. Chromium and Gtk face the same issue but they created platform specific expected files for the 2 tests. I think a better solution is to fix the issue in the code generator, so that all platforms can share the same expected files. Even if we only consider one platform, for example BlackBerry, it's possible we enable or disable MEDIA_STREAM explicitly when building WebKit. If we just change the expected result for the ENABLED scenario, the tests will still fail for the other scenario (DISABLE scenario).
Attachments
patch (8.18 KB, patch)
2012-08-23 01:53 PDT, Xiaobo Wang
no flags
Archive of layout-test-results from gce-cr-linux-08 (430.14 KB, application/zip)
2012-08-23 02:30 PDT, WebKit Review Bot
no flags
patch wich V8 update (10.75 KB, patch)
2012-08-23 06:06 PDT, Xiaobo Wang
haraken: commit-queue-
Archive of layout-test-results from gce-cr-linux-08 (444.14 KB, application/zip)
2012-08-23 06:50 PDT, WebKit Review Bot
no flags
patch revision 3 (31.20 KB, patch)
2012-08-24 00:49 PDT, Xiaobo Wang
no flags
Xiaobo Wang
Comment 1 2012-08-23 01:53:08 PDT
Kentaro Hara
Comment 2 2012-08-23 02:14:22 PDT
Comment on attachment 160116 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=160116&action=review > Source/WebCore/ChangeLog:8 > + Throw NotEnoughArguments exception for overloaded functions if actualrgument Typo: actual argument > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1336 > + my $leastNumMandatoryParams = 255; Where does 255 come from?
Xiaobo Wang
Comment 3 2012-08-23 02:27:52 PDT
(In reply to comment #2) > (From update of attachment 160116 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=160116&action=review > > > Source/WebCore/ChangeLog:8 > > + Throw NotEnoughArguments exception for overloaded functions if actualrgument > > Typo: actual argument Oops, sorry for the typo. > > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1336 > > + my $leastNumMandatoryParams = 255; > > Where does 255 come from? Just want to initialize variable $leastNumMandatoryParams with a number big enough for argument count, do you think 255 is a reasonable number?
WebKit Review Bot
Comment 4 2012-08-23 02:30:42 PDT
Comment on attachment 160116 [details] patch Attachment 160116 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13562633 New failing tests: fast/files/url-required-arguments.html fast/files/create-blob-url-crash.html
WebKit Review Bot
Comment 5 2012-08-23 02:30:44 PDT
Created attachment 160118 [details] Archive of layout-test-results from gce-cr-linux-08 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-08 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Kentaro Hara
Comment 6 2012-08-23 02:39:22 PDT
Comment on attachment 160116 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=160116&action=review Why don't we need the same fix in CodeGeneratorV8.pm? >>> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:1336 >>> + my $leastNumMandatoryParams = 255; >> >> Where does 255 come from? > > Just want to initialize variable $leastNumMandatoryParams with a number big enough for argument count, do you think 255 is a reasonable number? Nit: OK. I was just curious.
Xiaobo Wang
Comment 7 2012-08-23 06:06:54 PDT
Created attachment 160142 [details] patch wich V8 update
Kentaro Hara
Comment 8 2012-08-23 06:19:46 PDT
Comment on attachment 160142 [details] patch wich V8 update View in context: https://bugs.webkit.org/attachment.cgi?id=160142&action=review The change looks OK. I think you need to update ./run-binding-tests results. See here: https://trac.webkit.org/wiki/WebKitIDL#RunBindingsTests > Source/WebCore/ChangeLog:8 > + Throw NotEnoughArguments exception for overloaded functions if actualrgument Typo: actual argument
WebKit Review Bot
Comment 9 2012-08-23 06:50:27 PDT
Comment on attachment 160142 [details] patch wich V8 update Attachment 160142 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13566665 New failing tests: storage/indexeddb/transaction-and-objectstore-calls.html platform/chromium/virtual/gpu/fast/canvas/canvas-overloads-setStrokeColor.html fast/canvas/canvas-overloads-setShadow.html storage/indexeddb/transaction-storeNames-required.html platform/chromium/virtual/gpu/fast/canvas/canvas-overloads-setFillColor.html storage/indexeddb/objectStore-required-arguments.html fast/canvas/canvas-overloads-setFillColor.html fast/canvas/canvas-overloads-setStrokeColor.html fast/canvas/canvas-overloads-drawImage.html storage/indexeddb/index-get-key-argument-required.html platform/chromium/virtual/gpu/fast/canvas/canvas-overloads-setShadow.html fast/canvas/webgl/texImageTest.html platform/chromium/virtual/gpu/fast/canvas/canvas-overloads-drawImage.html platform/chromium/virtual/gpu/fast/canvas/webgl/texImageTest.html
WebKit Review Bot
Comment 10 2012-08-23 06:50:30 PDT
Created attachment 160152 [details] Archive of layout-test-results from gce-cr-linux-08 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: gce-cr-linux-08 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Xiaobo Wang
Comment 11 2012-08-24 00:47:16 PDT
(In reply to comment #8) > (From update of attachment 160142 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=160142&action=review > > The change looks OK. I think you need to update ./run-binding-tests results. See here: > https://trac.webkit.org/wiki/WebKitIDL#RunBindingsTests > > > Source/WebCore/ChangeLog:8 > > + Throw NotEnoughArguments exception for overloaded functions if actualrgument > > Typo: actual argument Thanks for the reminder. I'll update binding results.
Xiaobo Wang
Comment 12 2012-08-24 00:49:44 PDT
Created attachment 160353 [details] patch revision 3 Updated failed DRT tests. Updated JS/V8 binding tests result.
Kentaro Hara
Comment 13 2012-08-24 00:51:12 PDT
Comment on attachment 160353 [details] patch revision 3 Looks OK
WebKit Review Bot
Comment 14 2012-08-24 02:02:37 PDT
Comment on attachment 160353 [details] patch revision 3 Clearing flags on attachment: 160353 Committed r126562: <http://trac.webkit.org/changeset/126562>
WebKit Review Bot
Comment 15 2012-08-24 02:02:41 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.