Bug 26433

Summary: [V8] Exception from JavaScript propagates to main script
Product: WebKit Reporter: Adam Barth <abarth>
Component: WebCore JavaScriptAssignee: Adam Barth <abarth>
Severity: Normal CC: abarth, ap, dglazkov, japhet
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://webblaze.org/abarth/tests/jswrite/test3.html
Description Flags
Patch to isolate compile time exceptions in javascript URLs abarth: review+, abarth: commit-queue-

Description Adam Barth 2009-06-15 22:29:27 PDT
If a script sets an iframe's src attribute to a JavaScript URL that throws an exception, then that exception is improperly propagated from the JavaScript URL to the main script.  Test case:

Comment 1 Alexey Proskuryakov 2009-06-17 01:43:17 PDT
I cannot reproduce this with Safari 3.2.3 or with a local debug build of r44713.
Comment 2 Adam Barth 2009-06-17 08:56:59 PDT
This bug appears to be specific to the V8 bindings.
Comment 3 Dimitri Glazkov (Google) 2009-06-19 14:18:26 PDT
I'll look. Thanks for the report.
Comment 4 Dimitri Glazkov (Google) 2009-06-25 11:27:52 PDT
Nate, can you check on this?
Comment 5 Adam Barth 2009-08-19 19:32:57 PDT
Any progress on this Nate?  Should be an easy fix.
Comment 6 Adam Barth 2009-08-20 22:43:03 PDT
In the lost time, Nate made some progress getting to the root cause of this bug.  He's going to touch base with the V8 folks and confirm his understanding.
Comment 7 Mads Ager 2009-08-25 01:43:36 PDT
Created attachment 38536 [details]
Patch to isolate compile time exceptions in javascript URLs

The problem is that we only isolate runtime exceptions and not compile time exceptions in javascript URLs.
Comment 8 Adam Barth 2009-08-25 09:17:06 PDT
Comment on attachment 38536 [details]
Patch to isolate compile time exceptions in javascript URLs

This looks great.  The only problem is you indented using two spaces instead of four.  :)

Someone can either fix this when landing manually, or you can post an updated patch that we can land automatically.
Comment 9 Adam Barth 2009-08-25 12:28:27 PDT
I'll land this manually.
Comment 10 Adam Barth 2009-08-25 12:31:58 PDT
Committed r47753: <http://trac.webkit.org/changeset/47753>