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

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

Issue 2687943004: Abstract out ThreadDebugger from V8PerIsolateData (Closed)
Patch Set: Fix style, add comment Created 3 years, 10 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.cpp
diff --git a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
index 202710978799862311e6cfe6f78058cc04584667..3e13fdefe9c20c6afcbb458b97b52254ba8e9e3a 100644
--- a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
@@ -30,6 +30,7 @@
#include "core/inspector/MainThreadDebugger.h"
+#include <memory>
#include "bindings/core/v8/BindingSecurity.h"
#include "bindings/core/v8/DOMWrapperWorld.h"
#include "bindings/core/v8/ScriptController.h"
@@ -65,7 +66,6 @@
#include "platform/UserGestureIndicator.h"
#include "wtf/PtrUtil.h"
#include "wtf/ThreadingPrimitives.h"
-#include <memory>
namespace blink {
@@ -216,11 +216,11 @@ int MainThreadDebugger::contextGroupId(LocalFrame* frame) {
}
MainThreadDebugger* MainThreadDebugger::instance() {
- ASSERT(isMainThread());
- V8PerIsolateData* data =
- V8PerIsolateData::from(V8PerIsolateData::mainThreadIsolate());
- ASSERT(data->threadDebugger() && !data->threadDebugger()->isWorker());
- return static_cast<MainThreadDebugger*>(data->threadDebugger());
+ DCHECK(isMainThread());
+ ThreadDebugger* debugger =
+ ThreadDebugger::from(V8PerIsolateData::mainThreadIsolate());
+ DCHECK(debugger && !debugger->isWorker());
+ return static_cast<MainThreadDebugger*>(debugger);
}
void MainThreadDebugger::interruptMainThreadAndRun(

Powered by Google App Engine
This is Rietveld 408576698