Bug 52652

Summary: Web Inspector: make InjectedScriptAccess API a part of Web Inspector protocol.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, apavlov, bweinstein, eric, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed change.
none
[PATCH] Proposed change with passing tests now. yurys: review+

Pavel Feldman
Reported 2011-01-18 12:50:37 PST
Calls served by the InjectedScript should be first class protocol citizens, not dispatched via single protocol message.
Attachments
[PATCH] Proposed change. (51.04 KB, patch)
2011-01-18 13:17 PST, Pavel Feldman
no flags
[PATCH] Proposed change with passing tests now. (57.93 KB, patch)
2011-01-18 23:09 PST, Pavel Feldman
yurys: review+
Pavel Feldman
Comment 1 2011-01-18 13:17:15 PST
Created attachment 79319 [details] [PATCH] Proposed change. I am still nailing down couple of tests, but I think it is ready for review.
WebKit Review Bot
Comment 2 2011-01-18 13:19:50 PST
Attachment 79319 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/http..." exit_code: 1 Source/WebCore/inspector/InjectedScript.h:77: The parameter name "function" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 24 files If any of these errors are false positives, please file a bug against check-webkit-style.
Pavel Feldman
Comment 3 2011-01-18 23:09:00 PST
Created attachment 79393 [details] [PATCH] Proposed change with passing tests now.
Yury Semikhatsky
Comment 4 2011-01-19 00:13:55 PST
Comment on attachment 79393 [details] [PATCH] Proposed change with passing tests now. View in context: https://bugs.webkit.org/attachment.cgi?id=79393&action=review > Source/WebCore/inspector/InjectedScript.cpp:167 > + if (hasNoValue() || !canAccessInspectedWindow()) { Is there a valid scenario where hasNoValue() == true ? > Source/WebCore/inspector/InjectedScriptHost.h:114 > + InjectedScript injectedScriptForMainWorld(); injectedScriptForMainWorld -> injectedScriptForMainFrame, we don't create injected scripts for non-main worlds. > Source/WebCore/inspector/InjectedScriptSource.js:195 > + if (callFrameId >= 0) { I'd rather use callFrameId !== -1 since there no frames with negative ids. > Source/WebCore/inspector/InjectedScriptSource.js:330 > + getNodePrototypes: function(nodeId) Why did this method move? > Source/WebCore/inspector/Inspector.idl:77 > + [domain=InjectedScript] void evaluate(in String expression, in String objectGroup, out Value result); Either both or none of evaluate & evaluateInCallFrame should accept injectedScriptId for consistency. > Source/WebCore/inspector/front-end/ExtensionServer.js:275 > + InspectorBackend.evaluate(evalExpression, "none", callback.bind(this)); none -> extension?
Pavel Feldman
Comment 5 2011-01-19 01:02:19 PST
WebKit Review Bot
Comment 6 2011-01-19 06:09:12 PST
http://trac.webkit.org/changeset/76105 might have broken SnowLeopard Intel Release (Tests) The following tests are not passing: http/tests/inspector/extensions-resources-redirect.html
Note You need to log in before you can comment on or make changes to this bug.