Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Issue 542055: DevTools: injected script per context(WebCore part) (Closed)

Created:
10 years, 11 months ago by yurys
Modified:
9 years, 7 months ago
Reviewers:
pfeldman
CC:
chromium-reviews_googlegroups.com
Base URL:
http://svn.webkit.org/repository/webkit/trunk/WebCore/
Visibility:
Public.

Description

DevTools: injected script per context(WebCore part)

Patch Set 1 #

Total comments: 54

Patch Set 2 : '' #

Total comments: 23

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+586 lines, -296 lines) Patch
M bindings/js/JSInjectedScriptHostCustom.cpp View 1 6 chunks +6 lines, -59 lines 0 comments Download
M bindings/js/ScriptController.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M bindings/js/ScriptController.cpp View 1 1 chunk +6 lines, -0 lines 0 comments Download
M bindings/js/ScriptObject.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M bindings/js/ScriptValue.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M bindings/js/ScriptValue.cpp View 1 2 chunks +0 lines, -10 lines 0 comments Download
M bindings/v8/ScriptObject.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M bindings/v8/ScriptValue.h View 1 1 chunk +0 lines, -5 lines 0 comments Download
M bindings/v8/custom/V8InjectedScriptHostCustom.cpp View 1 2 chunks +0 lines, -37 lines 0 comments Download
M inspector/ConsoleMessage.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M inspector/ConsoleMessage.cpp View 1 4 chunks +9 lines, -8 lines 0 comments Download
M inspector/InjectedScriptHost.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M inspector/InjectedScriptHost.cpp View 1 2 3 3 chunks +20 lines, -14 lines 0 comments Download
M inspector/InjectedScriptHost.idl View 1 1 chunk +0 lines, -4 lines 0 comments Download
M inspector/InspectorBackend.h View 1 2 chunks +3 lines, -2 lines 0 comments Download
M inspector/InspectorBackend.cpp View 1 2 3 4 chunks +26 lines, -6 lines 0 comments Download
M inspector/InspectorBackend.idl View 1 2 chunks +3 lines, -2 lines 0 comments Download
M inspector/InspectorController.h View 1 5 chunks +2 lines, -15 lines 0 comments Download
M inspector/InspectorController.cpp View 1 2 3 11 chunks +33 lines, -58 lines 0 comments Download
M inspector/InspectorFrontend.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M inspector/InspectorFrontend.cpp View 1 2 3 3 chunks +20 lines, -6 lines 0 comments Download
M inspector/front-end/AuditsPanel.js View 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M inspector/front-end/ConsoleView.js View 2 3 4 4 chunks +11 lines, -6 lines 0 comments Download
M inspector/front-end/DOMAgent.js View 3 chunks +6 lines, -0 lines 0 comments Download
M inspector/front-end/Database.js View 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M inspector/front-end/ElementsPanel.js View 2 3 4 4 chunks +4 lines, -4 lines 0 comments Download
M inspector/front-end/ElementsTreeOutline.js View 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M inspector/front-end/EventListenersSidebarPane.js View 1 chunk +1 line, -1 line 0 comments Download
M inspector/front-end/InjectedScript.js View 1 2 3 17 chunks +363 lines, -21 lines 0 comments Download
M inspector/front-end/InjectedScriptAccess.js View 1 2 3 4 2 chunks +18 lines, -3 lines 0 comments Download
M inspector/front-end/MetricsSidebarPane.js View 2 3 4 3 chunks +5 lines, -3 lines 0 comments Download
M inspector/front-end/ObjectPropertiesSection.js View 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M inspector/front-end/ObjectProxy.js View 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M inspector/front-end/PropertiesSidebarPane.js View 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M inspector/front-end/ResourcesPanel.js View 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M inspector/front-end/ScriptsPanel.js View 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M inspector/front-end/StylesSidebarPane.js View 1 2 3 4 7 chunks +7 lines, -7 lines 0 comments Download
M inspector/front-end/WatchExpressionsSidebarPane.js View 1 1 chunk +2 lines, -1 line 0 comments Download
M inspector/front-end/inspector.js View 1 2 3 5 chunks +13 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
pfeldman
http://codereview.chromium.org/542055/diff/1/3 File bindings/js/JSInjectedScriptHostCustom.cpp (right): http://codereview.chromium.org/542055/diff/1/3#newcode91 bindings/js/JSInjectedScriptHostCustom.cpp:91: return JSInspectedObjectWrapper::wrap(inspectedWindow->globalExec(), toJS(exec, database)); what happens to this? http://codereview.chromium.org/542055/diff/1/3#newcode107 ...
10 years, 11 months ago (2010-01-13 13:35:12 UTC) #1
yurys
http://codereview.chromium.org/542055/diff/1/3 File bindings/js/JSInjectedScriptHostCustom.cpp (right): http://codereview.chromium.org/542055/diff/1/3#newcode91 bindings/js/JSInjectedScriptHostCustom.cpp:91: return JSInspectedObjectWrapper::wrap(inspectedWindow->globalExec(), toJS(exec, database)); On 2010/01/13 13:35:12, pfeldman wrote: ...
10 years, 11 months ago (2010-01-14 17:35:37 UTC) #2
pfeldman
http://codereview.chromium.org/542055/diff/4001/5013 File inspector/InjectedScriptHost.cpp (right): http://codereview.chromium.org/542055/diff/4001/5013#newcode183 inspector/InjectedScriptHost.cpp:183: ScriptObject injectedScript = m_idToInjectedScript.get(injectedScriptId); check for 0 - it ...
10 years, 11 months ago (2010-01-14 18:59:02 UTC) #3
yurys
10 years, 11 months ago (2010-01-18 09:35:13 UTC) #4
http://codereview.chromium.org/542055/diff/4001/5013
File inspector/InjectedScriptHost.cpp (right):

http://codereview.chromium.org/542055/diff/4001/5013#newcode183
inspector/InjectedScriptHost.cpp:183: ScriptObject injectedScript =
m_idToInjectedScript.get(injectedScriptId);
On 2010/01/14 18:59:03, pfeldman wrote:
> check for 0 - it is asynchronous.

Done.

http://codereview.chromium.org/542055/diff/4001/5025
File inspector/InspectorBackend.cpp (right):

http://codereview.chromium.org/542055/diff/4001/5025#newcode272
inspector/InspectorBackend.cpp:272: bool injectedScriptIdIsNodeId =
injectedScriptId <= 0;
On 2010/01/14 18:59:03, pfeldman wrote:
> FIXME?

Done.

http://codereview.chromium.org/542055/diff/4001/5014
File inspector/InspectorController.cpp (right):

http://codereview.chromium.org/542055/diff/4001/5014#newcode1867
inspector/InspectorController.cpp:1867: ASSERT(false);
On 2010/01/14 18:59:03, pfeldman wrote:
> you hit this due to async nature of stuff too.

Done.

http://codereview.chromium.org/542055/diff/4001/5032
File inspector/front-end/ConsoleView.js (right):

http://codereview.chromium.org/542055/diff/4001/5032#newcode540
inspector/front-end/ConsoleView.js:540:
InjectedScriptAccess.pushNodeToFrontend(object.injectedScriptId, object,
printNode);
On 2010/01/14 18:59:03, pfeldman wrote:
> InjectedScriptAccess has too many parameters in calls already. I think we
should
> use following notation instead:
> 
> InjectedScriptAccess.get(object.injectedScriptId).pushNodeToFrontend(object,
> printNode); That way you don't force clients to have injected script id as the
> first argument of the method.

Done.

http://codereview.chromium.org/542055/diff/4001/5039
File inspector/front-end/Database.js (right):

http://codereview.chromium.org/542055/diff/4001/5039#newcode98
inspector/front-end/Database.js:98: InjectedScriptAccess.executeSql(0 /* For now
use main frame injected script. */, this._id, query, callback);
On 2010/01/14 18:59:03, pfeldman wrote:
> FIXME?

Done.

http://codereview.chromium.org/542055/diff/4001/5038
File inspector/front-end/ElementsPanel.js (right):

http://codereview.chromium.org/542055/diff/4001/5038#newcode239
inspector/front-end/ElementsPanel.js:239: InjectedScriptAccess.nodeByPath(0 /*
main frame injected script id */, this._selectedPathOnReset,
selectLastSelectedNode.bind(this));
On 2010/01/14 18:59:03, pfeldman wrote:
> InjectedScriptAccess.getDefault() here and below.

Done.

http://codereview.chromium.org/542055/diff/4001/5020
File inspector/front-end/InjectedScript.js (right):

http://codereview.chromium.org/542055/diff/4001/5020#newcode913
inspector/front-end/InjectedScript.js:913: return "";
On 2010/01/14 18:59:03, pfeldman wrote:
> it was a convention - false means "i failed".

Reverted. Would be nice to document this unobvious convention, otherwise it
looks like a bug.

http://codereview.chromium.org/542055/diff/4001/5021
File inspector/front-end/InjectedScriptAccess.js (right):

http://codereview.chromium.org/542055/diff/4001/5021#newcode52
inspector/front-end/InjectedScriptAccess.js:52: WebInspector.log(methodName + '
' + injectedScriptId + ' ' + (typeof injectedScriptId));
On 2010/01/14 18:59:03, pfeldman wrote:
> remove log

Done.

http://codereview.chromium.org/542055/diff/4001/5019
File inspector/front-end/inspector.js (right):

http://codereview.chromium.org/542055/diff/4001/5019#newcode396
inspector/front-end/inspector.js:396:
InspectorBackend.setInjectedScriptSource(injectedScriptSource.join(''));
On 2010/01/14 18:59:03, pfeldman wrote:
> do not use single quotes.
> "(" + injectedScriptConstructor + ")"

Done.

http://codereview.chromium.org/542055/diff/4001/5019#newcode1156
inspector/front-end/inspector.js:1156: callFrames = JSON.parse(callFrames);
On 2010/01/14 18:59:03, pfeldman wrote:
> Don't like this either.

This will disappear once we switch to SerializedScriptValue.

Powered by Google App Engine
This is Rietveld 408576698