Bug 122764 - Web Inspector: Avoid using Runtime.executionContextCreated to figure out the iframe's contentDocument node.
Summary: Web Inspector: Avoid using Runtime.executionContextCreated to figure out the ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2013-10-14 10:56 PDT by Alexandru Chiculita
Modified: 2016-12-13 15:34 PST (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Chiculita 2013-10-14 10:56:31 PDT
Runtime.executionContextCreated is only called if you have a <script> tag in the page, so iframes with no scripting will not show up in the WebInspector.

Also, it means that the console will not be able to inject any other script inside the iframe, so maybe we just need to always create a scripting context when the web inspector is loaded.

Note that it happens to work in Safari because of the do-not-track feature that will always create an exceution context for all pages. However, that's not the case for the test runner.
The context is created because of the following function call Safari::BrowserBundlePageController::injectDoNotTrackDOMPropertyInStandardWorld().
Comment 1 Radar WebKit Bug Importer 2013-10-14 10:56:49 PDT
Comment 2 Alexandru Chiculita 2013-10-14 11:18:44 PDT
I've logged https://bugs.webkit.org/show_bug.cgi?id=122766 for the do-not-track issue.