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

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

Issue 2687943004: Abstract out ThreadDebugger from V8PerIsolateData (Closed)
Patch Set: Initialize HiddenValue and PrivateProperty in V8Initializer 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..9b7263e4a5f1c6660cb8dbd822ae728edf555871 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());
+ CHECK(isMainThread());
Yuki 2017/02/15 10:00:40 ASSERT corresponds to DCHECK. Is this change inten
adithyas 2017/02/15 18:12:12 Ah, my bad. Thanks!
+ ThreadDebugger* debugger =
+ ThreadDebugger::getThreadDebugger(V8PerIsolateData::mainThreadIsolate());
+ CHECK(debugger && !debugger->isWorker());
Yuki 2017/02/15 10:00:40 Ditto.
+ return static_cast<MainThreadDebugger*>(debugger);
}
void MainThreadDebugger::interruptMainThreadAndRun(

Powered by Google App Engine
This is Rietveld 408576698