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

Unified Diff: Source/web/SuspendableScriptExecutor.h

Issue 1197163003: Oilpan: make SuspendableScriptExecutor safe. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | « no previous file | Source/web/SuspendableScriptExecutor.cpp » ('j') | Source/web/SuspendableScriptExecutor.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/SuspendableScriptExecutor.h
diff --git a/Source/web/SuspendableScriptExecutor.h b/Source/web/SuspendableScriptExecutor.h
index 476202050555924fba8a1ae72c6f50cb71c5b670..331e003b1d1b9b8f4ad8edce357031bf8267068b 100644
--- a/Source/web/SuspendableScriptExecutor.h
+++ b/Source/web/SuspendableScriptExecutor.h
@@ -16,7 +16,7 @@ class LocalFrame;
class ScriptSourceCode;
class WebScriptExecutionCallback;
-class SuspendableScriptExecutor final : public RefCountedWillBeRefCountedGarbageCollected<SuspendableScriptExecutor>, public SuspendableTimer {
+class SuspendableScriptExecutor final : public RefCountedWillBeGarbageCollectedFinalized<SuspendableScriptExecutor>, public SuspendableTimer {
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SuspendableScriptExecutor);
public:
static void createAndRun(LocalFrame*, int worldID, const WillBeHeapVector<ScriptSourceCode>& sources, int extensionGroup, bool userGesture, WebScriptExecutionCallback*);
@@ -24,6 +24,9 @@ public:
virtual void contextDestroyed() override;
+ // Eager finalization is needed to promptly stop this timer object.
+ // (see DOMTimer comment for more.)
+ EAGERLY_FINALIZE();
DECLARE_VIRTUAL_TRACE();
private:
@@ -33,6 +36,7 @@ private:
void run();
void executeAndDestroySelf();
+ void dispose();
RawPtrWillBeMember<LocalFrame> m_frame;
int m_worldID;
« no previous file with comments | « no previous file | Source/web/SuspendableScriptExecutor.cpp » ('j') | Source/web/SuspendableScriptExecutor.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698