Bug 113218 - [V8] exceptions are not checked after toInt32 calls in bindings.
Summary: [V8] exceptions are not checked after toInt32 calls in bindings.
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: arno.
URL:
Keywords:
Depends on: 113538
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-25 10:26 PDT by arno.
Modified: 2014-12-16 00:48 PST (History)
5 users (show)

See Also:


Attachments
testcase: selectedIndex will be 2 with v8/javascript; 1 in gecko and -1 in ie (945 bytes, text/html)
2013-03-25 10:26 PDT, arno.
no flags Details
patch proposal: fixes the problem in v8 bindings (4.22 KB, patch)
2013-03-28 12:26 PDT, arno.
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description arno. 2013-03-25 10:26:02 PDT
Created attachment 194882 [details]
testcase: selectedIndex will be 2 with v8/javascript; 1 in gecko and -1 in ie

Hi, in generated bindings, some values are converted to integers with toInt32.
exceptions are not checked afterwards.
But exceptions may occur if argument is an object with an valueOf method.
Comment 1 arno. 2013-03-28 12:26:37 PDT
Created attachment 195619 [details]
patch proposal: fixes the problem in v8 bindings
Comment 2 Kentaro Hara 2013-03-28 12:29:02 PDT
Comment on attachment 195619 [details]
patch proposal: fixes the problem in v8 bindings

great
Comment 3 WebKit Review Bot 2013-03-28 13:06:53 PDT
Comment on attachment 195619 [details]
patch proposal: fixes the problem in v8 bindings

Clearing flags on attachment: 195619

Committed r147149: <http://trac.webkit.org/changeset/147149>
Comment 4 WebKit Review Bot 2013-03-28 13:06:58 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Simon Fraser (smfr) 2013-03-28 14:22:42 PDT
This broke binding generation tests on Mac:
http://build.webkit.org/builders/Apple%20Lion%20Release%20WK1%20%28Tests%29/builds/10946/steps/bindings-generation-tests/logs/stdio

Why is Mac code seeing a macro call V8TRYCATCH_VOID ?
Comment 6 arno. 2013-03-28 14:37:15 PDT
(In reply to comment #5)
> This broke binding generation tests on Mac:
> http://build.webkit.org/builders/Apple%20Lion%20Release%20WK1%20%28Tests%29/builds/10946/steps/bindings-generation-tests/logs/stdio
> 
> Why is Mac code seeing a macro call V8TRYCATCH_VOID ?

Oups, I forgot to run run-bindings-tests --reset-results. What's the best way to handle that ? Submit a patch with just test results reseted, or resubmit the commited patch with the results reseted ?
Comment 7 WebKit Review Bot 2013-03-28 14:37:53 PDT
Re-opened since this is blocked by bug 113538
Comment 8 Kentaro Hara 2013-03-28 15:13:06 PDT
Would you re-upload a patch with binding-tests update?
Comment 9 arno. 2013-03-28 15:14:01 PDT
(In reply to comment #8)
> Would you re-upload a patch with binding-tests update?

It's already been fixed in bug #113538
Comment 10 Kentaro Hara 2013-03-28 15:14:29 PDT
Ah, makes sense. Thanks!
Comment 11 Brian Burg 2014-12-16 00:48:09 PST
Closing some V8-related work items.