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

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

Issue 2176373004: [DevTools] Speculative crash fix in currentCallFrames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d9db1a3fbb766c10cc0d73fd741511a0041aef8c..dc3b8dd03bc95cbbd9dcf59cc9890277d4cf8063 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerImpl.cpp
@@ -480,6 +480,8 @@ void V8DebuggerImpl::breakProgramCallback(const v8::FunctionCallbackInfo<v8::Val
{
DCHECK_EQ(info.Length(), 2);
V8DebuggerImpl* thisPtr = toV8DebuggerImpl(info.Data());
+ if (!thisPtr->enabled())
+ return;
v8::Local<v8::Context> pausedContext = thisPtr->m_isolate->GetCurrentContext();
v8::Local<v8::Value> exception;
v8::Local<v8::Array> hitBreakpoints;
@@ -630,8 +632,10 @@ void V8DebuggerImpl::compileDebuggerScript()
v8::Local<v8::String> scriptValue = v8::String::NewFromUtf8(m_isolate, DebuggerScript_js, v8::NewStringType::kInternalized, sizeof(DebuggerScript_js)).ToLocalChecked();
v8::Local<v8::Value> value;
- if (!compileAndRunInternalScript(debuggerContext(), scriptValue).ToLocal(&value))
+ if (!compileAndRunInternalScript(debuggerContext(), scriptValue).ToLocal(&value)) {
+ NOTREACHED();
return;
+ }
DCHECK(value->IsObject());
m_debuggerScript.Reset(m_isolate, value.As<v8::Object>());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698