| Index: Source/core/inspector/InspectorDOMAgent.cpp
|
| diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
|
| index abb0caabe750cc8c1c6c19739af88cb80d7e824d..5dab143df86b08e2d74b74fa4ee48b4e562bb19f 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(ScriptState::forMainWorld(frame));
|
| - if (injectedScript.isEmpty())
|
| + V8InjectedScript* injectedScript = static_cast<V8InjectedScript*>(&m_injectedScriptManager->injectedScriptFor(ScriptState::forMainWorld(frame)));
|
| + if (injectedScript->isEmpty())
|
| return nullptr;
|
|
|
| - return injectedScript.wrapNode(node, objectGroup);
|
| + return injectedScript->wrapNode(node, objectGroup);
|
| }
|
|
|
| bool InspectorDOMAgent::pushDocumentUponHandlelessOperation(ErrorString* errorString)
|
|
|