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

Unified Diff: src/inspector/v8-debugger.cc

Issue 2583173002: Revert of [inspector] gracefully handle stack overflows in the inspector. (Closed)
Patch Set: Created 4 years 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 | « src/inspector/java-script-call-frame.cc ('k') | src/inspector/v8-debugger-agent-impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-debugger.cc
diff --git a/src/inspector/v8-debugger.cc b/src/inspector/v8-debugger.cc
index e8f7fb32f8a7b22c30e1bfce9391617c5416905d..5e3d477587576260da7e45c875b98d129c5fc6b9 100644
--- a/src/inspector/v8-debugger.cc
+++ b/src/inspector/v8-debugger.cc
@@ -50,7 +50,6 @@
debuggerScript
->Get(context, toV8StringInternalized(m_isolate, functionName))
.ToLocalChecked());
- v8::TryCatch try_catch(m_isolate);
return function->Call(context, debuggerScript, argc, argv);
}
@@ -410,16 +409,16 @@
->Get(debuggerContext(),
toV8StringInternalized(m_isolate, "currentCallFrames"))
.ToLocalChecked());
- if (!v8::debug::Call(debuggerContext(), currentCallFramesFunction,
- v8::Integer::New(m_isolate, limit))
- .ToLocal(&currentCallFramesV8))
- return JavaScriptCallFrames();
+ currentCallFramesV8 =
+ v8::debug::Call(debuggerContext(), currentCallFramesFunction,
+ v8::Integer::New(m_isolate, limit))
+ .ToLocalChecked();
} else {
v8::Local<v8::Value> argv[] = {m_executionState,
v8::Integer::New(m_isolate, limit)};
- if (!callDebuggerMethod("currentCallFrames", arraysize(argv), argv)
- .ToLocal(&currentCallFramesV8))
- return JavaScriptCallFrames();
+ currentCallFramesV8 =
+ callDebuggerMethod("currentCallFrames", arraysize(argv), argv)
+ .ToLocalChecked();
}
DCHECK(!currentCallFramesV8.IsEmpty());
if (!currentCallFramesV8->IsArray()) return JavaScriptCallFrames();
@@ -589,10 +588,8 @@
isUncaught);
} else if (event == v8::Break) {
v8::Local<v8::Value> argv[] = {eventDetails.GetEventData()};
- v8::Local<v8::Value> hitBreakpoints;
- if (!callDebuggerMethod("getBreakpointNumbers", 1, argv)
- .ToLocal(&hitBreakpoints))
- return;
+ v8::Local<v8::Value> hitBreakpoints =
+ callDebuggerMethod("getBreakpointNumbers", 1, argv).ToLocalChecked();
DCHECK(hitBreakpoints->IsArray());
handleProgramBreak(eventContext, eventDetails.GetExecutionState(),
v8::Local<v8::Value>(), hitBreakpoints.As<v8::Array>());
@@ -780,11 +777,9 @@
return v8::Undefined(m_isolate);
}
v8::Local<v8::Value> argv[] = {object};
- v8::Local<v8::Value> entriesValue;
- if (!callDebuggerMethod("getCollectionEntries", 1, argv)
- .ToLocal(&entriesValue) ||
- !entriesValue->IsArray())
- return v8::Undefined(m_isolate);
+ v8::Local<v8::Value> entriesValue =
+ callDebuggerMethod("getCollectionEntries", 1, argv).ToLocalChecked();
+ if (!entriesValue->IsArray()) return v8::Undefined(m_isolate);
v8::Local<v8::Array> entries = entriesValue.As<v8::Array>();
v8::Local<v8::Array> copiedArray =
@@ -817,11 +812,11 @@
return v8::Null(m_isolate);
}
v8::Local<v8::Value> argv[] = {object};
- v8::Local<v8::Value> location;
+ v8::Local<v8::Value> location =
+ callDebuggerMethod("getGeneratorObjectLocation", 1, argv)
+ .ToLocalChecked();
v8::Local<v8::Value> copied;
- if (!callDebuggerMethod("getGeneratorObjectLocation", 1, argv)
- .ToLocal(&location) ||
- !copyValueFromDebuggerContext(m_isolate, debuggerContext(), context,
+ if (!copyValueFromDebuggerContext(m_isolate, debuggerContext(), context,
location)
.ToLocal(&copied) ||
!copied->IsObject())
« no previous file with comments | « src/inspector/java-script-call-frame.cc ('k') | src/inspector/v8-debugger-agent-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698