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

Unified Diff: Source/web/SuspendableScriptExecutor.h

Issue 1258653003: Switch SuspendableScriptExecutor over to using SelfKeepAlive<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: retire m_disposed checking Created 5 years, 4 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') | no next file with comments »
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 ecbee08bcdafa985302e67e78c99303c65ed3a8e..b0b4d7a4332e0285f1394a532da1430df3790ed6 100644
--- a/Source/web/SuspendableScriptExecutor.h
+++ b/Source/web/SuspendableScriptExecutor.h
@@ -7,7 +7,6 @@
#include "core/frame/SuspendableTimer.h"
#include "platform/heap/Handle.h"
-#include "wtf/OwnPtr.h"
#include "wtf/Vector.h"
namespace blink {
@@ -16,7 +15,7 @@ class LocalFrame;
class ScriptSourceCode;
class WebScriptExecutionCallback;
-class SuspendableScriptExecutor final : public RefCountedWillBeRefCountedGarbageCollected<SuspendableScriptExecutor>, public SuspendableTimer {
+class SuspendableScriptExecutor final : public GarbageCollectedFinalized<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,9 +23,6 @@ public:
void contextDestroyed() override;
- // Eager finalization is needed to promptly stop this timer object.
- // (see DOMTimer comment for more.)
- EAGERLY_FINALIZE();
DECLARE_VIRTUAL_TRACE();
private:
@@ -39,14 +35,15 @@ private:
void dispose();
RefPtrWillBeMember<LocalFrame> m_frame;
- int m_worldID;
WillBeHeapVector<ScriptSourceCode> m_sources;
+ WebScriptExecutionCallback* m_callback;
+
+ SelfKeepAlive<SuspendableScriptExecutor> m_keepAlive;
+
+ int m_worldID;
int m_extensionGroup;
+
bool m_userGesture;
- WebScriptExecutionCallback* m_callback;
-#if ENABLE(ASSERT)
- bool m_disposed;
-#endif
};
} // namespace blink
« no previous file with comments | « no previous file | Source/web/SuspendableScriptExecutor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698