Bug 29958 - Inspector console stops working while JS in IFRAME is paused
Summary: Inspector console stops working while JS in IFRAME is paused
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-01 03:19 PDT by Daniel Fazekas
Modified: 2009-10-05 02:06 PDT (History)
3 users (show)

See Also:


Attachments
Test pages to demonstrate the regression (630 bytes, application/zip)
2009-10-01 03:19 PDT, Daniel Fazekas
no flags Details
patch (3.37 KB, patch)
2009-10-03 09:31 PDT, Pavel Feldman
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Fazekas 2009-10-01 03:19:39 PDT
Created attachment 40431 [details]
Test pages to demonstrate the regression

In recent WebKit nightly builds (for example, AppleWebKit/532.2+ r48958), when you pause JavaScript execution in the Web Inspector, either with a breakpoint or by pressing the "Pause script execution" button, *if the script getting paused was running inside the IFRAME*, the inspector console stops working and only results in the following error message no matter what you enter:

TypeError: Result of expression 'window._inspectorCommandLineAPI' [undefined] is not an object.

The console only starts functioning again once script execution is resumed.
It used to work fine even when paused in Safari 4.0.3.

Simple test case attached:
1. Open "main.html", which includes iframe.html that has a script attached to the button's onclick event.
2. Open Web Inspector, enable script debugging and press the "Pause script execution" button or just place a breakpoint inside the iframe.html JS function.
3. Try pressing the button.
4. While JS execution is paused, open the Web Inspector console and enter anything.
Comment 1 Patrick Mueller 2009-10-02 10:20:41 PDT
Able to reproduce with the supplied test case - thanks!

pfeldman, this seems like one for you ...
Comment 2 Pavel Feldman 2009-10-03 09:31:55 PDT
Created attachment 40577 [details]
patch
Comment 3 Pavel Feldman 2009-10-05 02:06:21 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/front-end/InjectedScript.js
Committed r49085