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

Unified Diff: third_party/WebKit/Source/core/inspector/MainThreadDebugger.h

Issue 1838523004: Initialize debugger together with isolate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed unnecessary assert hitting in unit tests Created 4 years, 9 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: third_party/WebKit/Source/core/inspector/MainThreadDebugger.h
diff --git a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.h b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.h
index b84b25fdefb7729d5b52e77bce415faae642cf4c..ea04075c19bf89e855ef6fd7b67e990b006536f9 100644
--- a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.h
+++ b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.h
@@ -38,10 +38,6 @@
#include "platform/heap/Handle.h"
#include <v8.h>
-namespace WTF {
-class Mutex;
-}
-
namespace blink {
class LocalFrame;
@@ -59,26 +55,20 @@ public:
virtual void quitNow() = 0;
};
- static PassOwnPtr<MainThreadDebugger> create(PassOwnPtr<ClientMessageLoop> clientMessageLoop, v8::Isolate* isolate)
- {
- return adoptPtr(new MainThreadDebugger(std::move(clientMessageLoop), isolate));
- }
-
+ explicit MainThreadDebugger(v8::Isolate*);
~MainThreadDebugger() override;
- static void contextCreated(ScriptState*, LocalFrame*, SecurityOrigin*);
- static void contextWillBeDestroyed(ScriptState*);
- static int contextGroupId(LocalFrame*);
-
static MainThreadDebugger* instance();
static void interruptMainThreadAndRun(PassOwnPtr<InspectorTaskRunner::Task>);
- InspectorTaskRunner* taskRunner() const { return m_taskRunner.get(); }
+ InspectorTaskRunner* taskRunner() const { return m_taskRunner.get(); }
bool isWorker() override { return false; }
+ void setClientMessageLoop(PassOwnPtr<ClientMessageLoop>);
+ int contextGroupId(LocalFrame*);
+ void contextCreated(ScriptState*, LocalFrame*, SecurityOrigin*);
+ void contextWillBeDestroyed(ScriptState*);
private:
- MainThreadDebugger(PassOwnPtr<ClientMessageLoop>, v8::Isolate*);
-
// V8DebuggerClient implementation.
void runMessageLoopOnPause(int contextGroupId) override;
void quitMessageLoopOnPause() override;
@@ -87,8 +77,6 @@ private:
bool callingContextCanAccessContext(v8::Local<v8::Context> calling, v8::Local<v8::Context> target) override;
void contextsToReport(int contextGroupId, V8ContextInfoVector&) override;
- static WTF::Mutex& creationMutex();
-
OwnPtr<ClientMessageLoop> m_clientMessageLoop;
OwnPtr<InspectorTaskRunner> m_taskRunner;

Powered by Google App Engine
This is Rietveld 408576698