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

Unified Diff: third_party/WebKit/Source/core/inspector/ThreadDebugger.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/ThreadDebugger.cpp
diff --git a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
index 312f70a08fc691a74b78a209edc1d1e75f48d965..65042d1d9ae2b70c158bf11755b6e794f308e083 100644
--- a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
@@ -4,6 +4,7 @@
#include "core/inspector/ThreadDebugger.h"
+#include <memory>
#include "bindings/core/v8/SourceLocation.h"
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8DOMException.h"
@@ -25,7 +26,6 @@
#include "platform/ScriptForbiddenScope.h"
#include "wtf/CurrentTime.h"
#include "wtf/PtrUtil.h"
-#include <memory>
namespace blink {
@@ -41,7 +41,19 @@ ThreadDebugger* ThreadDebugger::from(v8::Isolate* isolate) {
if (!isolate)
return nullptr;
V8PerIsolateData* data = V8PerIsolateData::from(isolate);
- return data ? data->threadDebugger() : nullptr;
+ return data ? static_cast<ThreadDebugger*>(data->threadDebugger()) : nullptr;
+}
+
+// static
+void ThreadDebugger::setThreadDebugger(v8::Isolate* isolate,
+ ThreadDebugger* threadDebugger) {
+ V8PerIsolateData::from(isolate)->setThreadDebugger(threadDebugger);
+}
+
+// static
+ThreadDebugger* ThreadDebugger::getThreadDebugger(v8::Isolate* isolate) {
+ return static_cast<ThreadDebugger*>(
+ V8PerIsolateData::from(isolate)->threadDebugger());
}
// static

Powered by Google App Engine
This is Rietveld 408576698