Bug 113218

Summary: [V8] exceptions are not checked after toInt32 calls in bindings.
Product: WebKit Reporter: arno. <a.renevier>
Component: WebCore JavaScriptAssignee: arno. <a.renevier>
Status: RESOLVED INVALID    
Severity: Normal CC: ggaren, haraken, oliver, simon.fraser, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 113538    
Bug Blocks:    
Attachments:
Description Flags
testcase: selectedIndex will be 2 with v8/javascript; 1 in gecko and -1 in ie
none
patch proposal: fixes the problem in v8 bindings none

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.