Bug 36828

Summary: Web Inspector: get rid of "Unsafe JavaScript attempt..." message when inspecting frames whose content has changed
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: Web Inspector (Deprecated)Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, eric, joepeck, keishi, pfeldman, pmuellr, rik, timothy, webkit-ews, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
pfeldman: review-
patch
none
patch
none
patch pfeldman: review+

Description Yury Semikhatsky 2010-03-30 08:37:48 PDT
Run LayoutTests/http/tests/inspector-enabled/console-log-before-frame-navigation.html
It will write following message in console:

Unsafe JavaScript attempt to access frame with URL http://localhost:8000/inspector-enabled/resources/console-log-frame-after-navigation.html from frame with URL http://127.0.0.1:8000/inspector-enabled/resources/console-log-frame-before-navigation.html. Domains, protocols and ports must match.
Comment 1 Yury Semikhatsky 2010-03-30 08:44:14 PDT
Created attachment 52042 [details]
patch
Comment 2 WebKit Review Bot 2010-03-30 08:48:29 PDT
Attachment 52042 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp:47:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 7 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Early Warning System Bot 2010-03-30 08:49:18 PDT
Attachment 52042 [details] did not build on qt:
Build output: http://webkit-commit-queue.appspot.com/results/1629100
Comment 4 Eric Seidel (no email) 2010-03-30 08:51:09 PDT
Attachment 52042 [details] did not build on mac:
Build output: http://webkit-commit-queue.appspot.com/results/1584090
Comment 5 Pavel Feldman 2010-03-30 08:54:57 PDT
Comment on attachment 52042 [details]
patch

I don't think we should add such a complexity because of a corner case scenario. I'd much rather not get into InjectedScript bindings from native code if we know that inspected window is no longer available.
Comment 6 Yury Semikhatsky 2010-03-31 07:31:14 PDT
Created attachment 52159 [details]
patch
Comment 7 WebKit Review Bot 2010-03-31 07:35:52 PDT
Attachment 52159 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp:47:  Alphabetical sorting problem.  [build/include_order] [4]
Total errors found: 1 in 9 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Early Warning System Bot 2010-03-31 07:36:46 PDT
Attachment 52159 [details] did not build on qt:
Build output: http://webkit-commit-queue.appspot.com/results/1628127
Comment 9 Eric Seidel (no email) 2010-03-31 07:38:11 PDT
Attachment 52159 [details] did not build on mac:
Build output: http://webkit-commit-queue.appspot.com/results/1629134
Comment 10 Yury Semikhatsky 2010-03-31 07:55:15 PDT
Created attachment 52166 [details]
patch

Fixed release mode build errors.
Comment 11 Eric Seidel (no email) 2010-03-31 07:57:34 PDT
Attachment 52166 [details] did not build on mac:
Build output: http://webkit-commit-queue.appspot.com/results/1597096
Comment 12 Early Warning System Bot 2010-03-31 08:04:09 PDT
Attachment 52166 [details] did not build on qt:
Build output: http://webkit-commit-queue.appspot.com/results/1604133
Comment 13 Yury Semikhatsky 2010-03-31 08:05:47 PDT
Created attachment 52168 [details]
patch

One more attempt to fix release mode builds.
Comment 14 Pavel Feldman 2010-03-31 08:17:54 PDT
Comment on attachment 52168 [details]
patch

Fix ChangeLog, otherwise looks good.
Comment 15 Yury Semikhatsky 2010-03-31 08:24:54 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	LayoutTests/ChangeLog
	M	LayoutTests/http/tests/inspector-enabled/console-log-before-frame-navigation-expected.txt
	M	LayoutTests/http/tests/inspector-enabled/resources/console-log-frame-before-navigation.html
	M	WebCore/ChangeLog
	M	WebCore/bindings/js/JSInjectedScriptHostCustom.cpp
	M	WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
	M	WebCore/inspector/InjectedScript.cpp
	M	WebCore/inspector/InjectedScript.h
	M	WebCore/inspector/InjectedScriptHost.h
	M	WebCore/inspector/front-end/InjectedScript.js
Committed r56841