Index: Source/web/SuspendableScriptExecutor.cpp |
diff --git a/Source/web/SuspendableScriptExecutor.cpp b/Source/web/SuspendableScriptExecutor.cpp |
index e4c95204d52448eacffdd18898ec0959bce89fa5..03459c6a33b858e7a74a1e5944ac0ba5ff88cf81 100644 |
--- a/Source/web/SuspendableScriptExecutor.cpp |
+++ b/Source/web/SuspendableScriptExecutor.cpp |
@@ -28,7 +28,7 @@ void SuspendableScriptExecutor::contextDestroyed() |
// and context remained suspend (method resume has never called) |
SuspendableTimer::contextDestroyed(); |
m_callback->completed(Vector<v8::Local<v8::Value>>()); |
- deref(); |
+ dispose(); |
} |
SuspendableScriptExecutor::SuspendableScriptExecutor(LocalFrame* frame, int worldID, const WillBeHeapVector<ScriptSourceCode>& sources, int extensionGroup, bool userGesture, WebScriptExecutionCallback* callback) |
@@ -81,6 +81,15 @@ void SuspendableScriptExecutor::executeAndDestroySelf() |
results.append(scriptValue); |
} |
m_callback->completed(results); |
+ dispose(); |
+} |
+ |
+void SuspendableScriptExecutor::dispose() |
+{ |
+#if ENABLE(OILPAN) |
+ // Remove object as a ContextLifecycleObserver. |
+ ActiveDOMObject::clearContext(); |
haraken
2015/06/23 09:25:56
Is this a performance optimization? Or do we need
sof
2015/06/23 09:40:59
I think it makes sense to remove oneself here, rat
haraken
2015/06/23 09:44:55
Makes sense. (I'd prefer calling ActiveDOMObject::
|
+#endif |
deref(); |
} |