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

Unified Diff: third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.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/v8/V8DebuggerAgentImpl.cpp
diff --git a/third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp b/third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp
index 57d601a6cab0cd03edaefce18da853187b42e7b7..073693138b74d1744031a5dc7eec9992779602ca 100644
--- a/third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp
+++ b/third_party/WebKit/Source/core/inspector/v8/V8DebuggerAgentImpl.cpp
@@ -6,15 +6,13 @@
#include "bindings/core/v8/ScriptCallStackFactory.h"
#include "bindings/core/v8/ScriptRegexp.h"
-#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8RecursionScope.h"
#include "core/dom/Microtask.h"
-#include "core/inspector/AsyncCallChain.h"
#include "core/inspector/ContentSearchUtils.h"
-#include "core/inspector/InstrumentingAgents.h"
#include "core/inspector/ScriptAsyncCallStack.h"
#include "core/inspector/ScriptCallFrame.h"
#include "core/inspector/ScriptCallStack.h"
+#include "core/inspector/v8/AsyncCallChain.h"
#include "core/inspector/v8/IgnoreExceptionsScope.h"
#include "core/inspector/v8/InjectedScript.h"
#include "core/inspector/v8/InjectedScriptHost.h"
@@ -25,6 +23,7 @@
#include "core/inspector/v8/V8Debugger.h"
#include "core/inspector/v8/V8DebuggerClient.h"
#include "core/inspector/v8/V8JavaScriptCallFrame.h"
+#include "core/inspector/v8/V8StringUtil.h"
#include "platform/JSONValues.h"
#include "platform/SharedBuffer.h"
#include "platform/weborigin/KURL.h"
@@ -68,6 +67,11 @@ static const char skipAllPauses[] = "skipAllPauses";
} // namespace DebuggerAgentState;
+inline static bool asBool(const bool* const b)
+{
+ return b ? *b : false;
+}
+
static const int maxSkipStepFrameCount = 128;
const char V8DebuggerAgent::backtraceObjectGroup[] = "backtrace";
@@ -986,9 +990,8 @@ void V8DebuggerAgentImpl::compileScript(ErrorString* errorString, const String&
v8::HandleScope handles(injectedScript->isolate());
v8::Context::Scope scope(injectedScript->context());
v8::TryCatch tryCatch(m_isolate);
- v8::Local<v8::String> expressionValue = v8::String::NewFromUtf8(m_isolate, expression.utf8().data(), v8::NewStringType::kNormal).ToLocalChecked();
v8::Local<v8::Script> script;
- if (!m_debugger->client()->compileScript(injectedScript->context(), expressionValue, sourceURL).ToLocal(&script)) {
+ if (!m_debugger->client()->compileScript(injectedScript->context(), toV8String(m_isolate, expression), sourceURL).ToLocal(&script)) {
v8::Local<v8::Message> message = tryCatch.Message();
if (!message.IsEmpty())
exceptionDetails = createExceptionDetails(m_isolate, message);
@@ -1718,7 +1721,7 @@ void V8DebuggerAgentImpl::reset()
PassRefPtr<TypeBuilder::Debugger::ExceptionDetails> V8DebuggerAgentImpl::createExceptionDetails(v8::Isolate* isolate, v8::Local<v8::Message> message)
{
- RefPtr<ExceptionDetails> exceptionDetails = ExceptionDetails::create().setText(toCoreStringWithUndefinedOrNullCheck(message->Get()));
+ RefPtr<ExceptionDetails> exceptionDetails = ExceptionDetails::create().setText(toWTFStringWithTypeCheck(message->Get()));
exceptionDetails->setLine(message->GetLineNumber());
exceptionDetails->setColumn(message->GetStartColumn());
v8::Local<v8::StackTrace> messageStackTrace = message->GetStackTrace();

Powered by Google App Engine
This is Rietveld 408576698