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

Unified Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 300393002: Merge DevTools Refactor CL to Blink36 (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/1985
Patch Set: PTAL Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorController.cpp ('k') | Source/core/inspector/InspectorDebuggerAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 00f2cfc0038ac65b03d3b9f06af816fc2b4a315e..e5fb1efce9faa1aa26d75cf2ca9767dc0b0b1bd3 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -1206,7 +1206,7 @@ void InspectorDOMAgent::highlightNode(ErrorString* errorString, const RefPtr<JSO
if (nodeId) {
node = assertNode(errorString, *nodeId);
} else if (objectId) {
- InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(*objectId);
+ InjectedScript& injectedScript = m_injectedScriptManager->injectedScriptForObjectId(*objectId);
node = injectedScript.nodeForObjectId(*objectId);
if (!node)
*errorString = "Node for given objectId not found";
@@ -1412,7 +1412,7 @@ void InspectorDOMAgent::getAttributes(ErrorString* errorString, int nodeId, RefP
void InspectorDOMAgent::requestNode(ErrorString*, const String& objectId, int* nodeId)
{
- InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(objectId);
+ InjectedScript& injectedScript = m_injectedScriptManager->injectedScriptForObjectId(objectId);
Node* node = injectedScript.nodeForObjectId(objectId);
if (node)
*nodeId = pushNodePathToFrontend(node);
@@ -1630,7 +1630,7 @@ PassRefPtr<TypeBuilder::DOM::EventListener> InspectorDOMAgent::buildObjectForEve
if (frame) {
ScriptState* scriptState = eventListenerHandlerScriptState(frame, eventListener.get());
if (scriptState) {
- InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState);
+ InjectedScript& injectedScript = m_injectedScriptManager->injectedScriptFor(scriptState);
if (!injectedScript.isEmpty()) {
RefPtr<TypeBuilder::Runtime::RemoteObject> valueJson = injectedScript.wrapObject(functionValue, *objectGroupId);
value->setHandler(valueJson);
@@ -2052,11 +2052,11 @@ PassRefPtr<TypeBuilder::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(No
if (!frame)
return nullptr;
- InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(V8ScriptState::forMainWorld(frame));
- if (injectedScript.isEmpty())
+ V8InjectedScript* injectedScript = static_cast<V8InjectedScript*>(&m_injectedScriptManager->injectedScriptFor(V8ScriptState::forMainWorld(frame)));
+ if (injectedScript->isEmpty())
return nullptr;
- return injectedScript.wrapNode(node, objectGroup);
+ return injectedScript->wrapNode(node, objectGroup);
}
bool InspectorDOMAgent::pushDocumentUponHandlelessOperation(ErrorString* errorString)
« no previous file with comments | « Source/core/inspector/InspectorController.cpp ('k') | Source/core/inspector/InspectorDebuggerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698