| Index: third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
|
| index 1fe4c09225c3bcf16576dae33d89b4917c53413a..5b112eeb6812c688d15034623de398a14dfaa193 100644
|
| --- a/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/InspectorHeapProfilerAgent.cpp
|
| @@ -334,12 +334,12 @@ void InspectorHeapProfilerAgent::getObjectByHeapObjectId(ErrorString* error, con
|
| *error = "Object is not available";
|
| return;
|
| }
|
| - InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(heapObject.scriptState());
|
| - if (injectedScript.isEmpty()) {
|
| + InjectedScript* injectedScript = m_injectedScriptManager->injectedScriptFor(heapObject.scriptState());
|
| + if (!injectedScript) {
|
| *error = "Object is not available. Inspected context is gone";
|
| return;
|
| }
|
| - result = injectedScript.wrapObject(heapObject, objectGroup ? *objectGroup : "");
|
| + result = injectedScript->wrapObject(heapObject, objectGroup ? *objectGroup : "");
|
| if (!result)
|
| *error = "Failed to wrap object";
|
| }
|
| @@ -362,13 +362,13 @@ void InspectorHeapProfilerAgent::getHeapObjectId(ErrorString* errorString, const
|
| *errorString = "Invalid object id";
|
| return;
|
| }
|
| - InjectedScript injectedScript = m_injectedScriptManager->findInjectedScript(remoteId.get());
|
| - if (injectedScript.isEmpty()) {
|
| + InjectedScript* injectedScript = m_injectedScriptManager->findInjectedScript(remoteId.get());
|
| + if (!injectedScript) {
|
| *errorString = "Inspected context has gone";
|
| return;
|
| }
|
| - ScriptState::Scope scope(injectedScript.scriptState());
|
| - v8::Local<v8::Value> value = injectedScript.findObject(*remoteId);
|
| + ScriptState::Scope scope(injectedScript->scriptState());
|
| + v8::Local<v8::Value> value = injectedScript->findObject(*remoteId);
|
| if (value.IsEmpty() || value->IsUndefined()) {
|
| *errorString = "Object with given id not found";
|
| return;
|
|
|