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

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

Issue 1650283002: DevTools: remove DOM and Bindings dependencies from inspector/v8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing Created 4 years, 11 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 a0b42ffa86fa09d208abcf4faf8a58a0c394bd1e..8c6d7fbc3c23e2e12a7fa0eb3942e1d564fde760 100644
--- a/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
+++ b/third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
@@ -5,6 +5,12 @@
#include "core/inspector/ThreadDebugger.h"
#include "bindings/core/v8/V8Binding.h"
+#include "bindings/core/v8/V8DOMException.h"
+#include "bindings/core/v8/V8DOMTokenList.h"
+#include "bindings/core/v8/V8HTMLAllCollection.h"
+#include "bindings/core/v8/V8HTMLCollection.h"
+#include "bindings/core/v8/V8Node.h"
+#include "bindings/core/v8/V8NodeList.h"
#include "bindings/core/v8/V8ScriptRunner.h"
#include "core/inspector/InspectorDOMDebuggerAgent.h"
@@ -56,4 +62,24 @@ v8::MaybeLocal<v8::Value> ThreadDebugger::callInternalFunction(v8::Local<v8::Fun
return V8ScriptRunner::callInternalFunction(function, receiver, argc, info, m_isolate);
}
+String ThreadDebugger::valueSubtype(v8::Local<v8::Value> value)
+{
+ if (V8Node::hasInstance(value, m_isolate))
+ return "node";
+ if (V8NodeList::hasInstance(value, m_isolate)
+ || V8DOMTokenList::hasInstance(value, m_isolate)
+ || V8HTMLCollection::hasInstance(value, m_isolate)
+ || V8HTMLAllCollection::hasInstance(value, m_isolate)) {
+ return "array";
+ }
+ if (V8DOMException::hasInstance(value, m_isolate))
+ return "error";
+ return String();
+}
+
+bool ThreadDebugger::formatAccessorsAsProperties(v8::Local<v8::Value> value)
+{
+ return V8DOMWrapper::isWrapper(m_isolate, value);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698