Bug 26433 - [V8] Exception from JavaScript propagates to main script
Summary: [V8] Exception from JavaScript propagates to main script
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Adam Barth
URL: http://webblaze.org/abarth/tests/jswr...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-15 22:29 PDT by Adam Barth
Modified: 2009-08-25 12:31 PDT (History)
4 users (show)

See Also:


Attachments
Patch to isolate compile time exceptions in javascript URLs (6.33 KB, patch)
2009-08-25 01:43 PDT, Mads Ager
abarth: review+
abarth: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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:

http://webblaze.org/abarth/tests/jswrite/test3.html
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>