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

Unified Diff: Source/core/inspector/AsyncCallStackTracker.h

Issue 413113003: Oilpan: Prepare moving AsyncCallChain to Oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
Index: Source/core/inspector/AsyncCallStackTracker.h
diff --git a/Source/core/inspector/AsyncCallStackTracker.h b/Source/core/inspector/AsyncCallStackTracker.h
index 4fba41e3d06c386655737f54ecff8b6d412f758d..0dbc3c7a61b8a2e6fe204f1dd2b31a7845647f9d 100644
--- a/Source/core/inspector/AsyncCallStackTracker.h
+++ b/Source/core/inspector/AsyncCallStackTracker.h
@@ -52,10 +52,11 @@ class XMLHttpRequest;
class AsyncCallStackTracker {
haraken 2014/07/29 03:43:39 Consider moving AsyncCallStackTracker to the heap
keishi 2014/07/29 07:56:36 I'll do it in a follow-up
WTF_MAKE_NONCOPYABLE(AsyncCallStackTracker);
public:
- class AsyncCallStack : public RefCounted<AsyncCallStack> {
+ class AsyncCallStack : public RefCountedWillBeGarbageCollectedFinalized<AsyncCallStack> {
public:
AsyncCallStack(const String&, const ScriptValue&);
~AsyncCallStack();
+ void trace(Visitor*) { }
String description() const { return m_description; }
ScriptValue callFrames() const { return m_callFrames; }
private:
@@ -63,13 +64,14 @@ public:
ScriptValue m_callFrames;
};
- typedef Deque<RefPtr<AsyncCallStack>, 4> AsyncCallStackVector;
+ typedef WillBeHeapDeque<RefPtrWillBeMember<AsyncCallStack>, 4> AsyncCallStackVector;
- class AsyncCallChain : public RefCounted<AsyncCallChain> {
+ class AsyncCallChain : public RefCountedWillBeGarbageCollected<AsyncCallChain> {
public:
AsyncCallChain() { }
AsyncCallChain(const AsyncCallChain& t) : m_callStacks(t.m_callStacks) { }
AsyncCallStackVector callStacks() const { return m_callStacks; }
+ void trace(Visitor*);
private:
friend class AsyncCallStackTracker;
AsyncCallStackVector m_callStacks;
@@ -118,8 +120,8 @@ public:
private:
void willHandleXHREvent(XMLHttpRequest*, Event*);
- PassRefPtr<AsyncCallChain> createAsyncCallChain(const String& description, const ScriptValue& callFrames);
- void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtr<AsyncCallChain>);
+ PassRefPtrWillBeRawPtr<AsyncCallChain> createAsyncCallChain(const String& description, const ScriptValue& callFrames);
+ void setCurrentAsyncCallChain(ExecutionContext*, PassRefPtrWillBeRawPtr<AsyncCallChain>);
void clearCurrentAsyncCallChain();
static void ensureMaxAsyncCallChainDepth(AsyncCallChain*, unsigned);
bool validateCallFrames(const ScriptValue& callFrames);
@@ -128,7 +130,7 @@ private:
ExecutionContextData* createContextDataIfNeeded(ExecutionContext*);
unsigned m_maxAsyncCallStackDepth;
- RefPtr<AsyncCallChain> m_currentAsyncCallChain;
+ RefPtrWillBePersistent<AsyncCallChain> m_currentAsyncCallChain;
unsigned m_nestedAsyncCallCount;
typedef HashMap<ExecutionContext*, ExecutionContextData*> ExecutionContextDataMap;
ExecutionContextDataMap m_executionContextDataMap;
« no previous file with comments | « no previous file | Source/core/inspector/AsyncCallStackTracker.cpp » ('j') | Source/core/inspector/AsyncCallStackTracker.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698