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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp

Issue 2146333003: [DevTools] Replace SetScriptSourceError with ExceptionDetails in protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a Created 4 years, 5 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/platform/v8_inspector/V8DebuggerImpl.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
index 1e368354bfcc4556c3ffe39930d0ed6baabf71ef..16436d055d887e96ef22faa8ee6c502c5ab58ffb 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
@@ -367,7 +367,7 @@ void V8DebuggerImpl::clearStepping()
callDebuggerMethod("clearStepping", 0, argv);
}
-bool V8DebuggerImpl::setScriptSource(const String16& sourceID, v8::Local<v8::String> newSource, bool preview, ErrorString* error, Maybe<protocol::Debugger::SetScriptSourceError>* errorData, JavaScriptCallFrames* newCallFrames, Maybe<bool>* stackChanged)
+bool V8DebuggerImpl::setScriptSource(const String16& sourceID, v8::Local<v8::String> newSource, bool preview, ErrorString* error, Maybe<protocol::Runtime::ExceptionDetails>* exceptionDetails, JavaScriptCallFrames* newCallFrames, Maybe<bool>* stackChanged)
{
class EnableLiveEditScope {
public:
@@ -427,10 +427,11 @@ bool V8DebuggerImpl::setScriptSource(const String16& sourceID, v8::Local<v8::Str
// Compile error.
case 1:
{
- *errorData = protocol::Debugger::SetScriptSourceError::create()
- .setMessage(toProtocolStringWithTypeCheck(resultTuple->Get(2)))
- .setLineNumber(resultTuple->Get(3)->ToInteger(m_isolate)->Value())
- .setColumnNumber(resultTuple->Get(4)->ToInteger(m_isolate)->Value()).build();
+ *exceptionDetails = protocol::Runtime::ExceptionDetails::create()
+ .setText(toProtocolStringWithTypeCheck(resultTuple->Get(2)))
+ .setScriptId(String16("0"))
+ .setLineNumber(resultTuple->Get(3)->ToInteger(m_isolate)->Value() - 1)
+ .setColumnNumber(resultTuple->Get(4)->ToInteger(m_isolate)->Value() - 1).build();
return false;
}
}

Powered by Google App Engine
This is Rietveld 408576698