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

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

Issue 2488733003: [inspector] Add exception caught/uncaught status to protocol (Closed)
Patch Set: Use Maybe version of BooleanValue Created 4 years, 1 month 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/v8-debugger-agent-impl.h ('k') | test/inspector/debugger/caught-uncaught-exceptions.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/v8-debugger-agent-impl.cc
diff --git a/src/inspector/v8-debugger-agent-impl.cc b/src/inspector/v8-debugger-agent-impl.cc
index 8c9e9054a2143706c066d249d13c66b42ca9d7fa..ab4e349909865e93c5c2ecc23f888dd16a45e6da 100644
--- a/src/inspector/v8-debugger-agent-impl.cc
+++ b/src/inspector/v8-debugger-agent-impl.cc
@@ -1078,7 +1078,8 @@ void V8DebuggerAgentImpl::didParseSource(
V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::didPause(
v8::Local<v8::Context> context, v8::Local<v8::Value> exception,
- const std::vector<String16>& hitBreakpoints, bool isPromiseRejection) {
+ const std::vector<String16>& hitBreakpoints, bool isPromiseRejection,
+ bool isUncaught) {
JavaScriptCallFrames callFrames = m_debugger->currentCallFrames(1);
JavaScriptCallFrame* topCallFrame =
!callFrames.empty() ? callFrames.begin()->get() : nullptr;
@@ -1120,7 +1121,12 @@ V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::didPause(
std::unique_ptr<protocol::Runtime::RemoteObject> obj;
injectedScript->wrapObject(exception, kBacktraceObjectGroup, false, false,
&obj);
- m_breakAuxData = obj ? obj->serialize() : nullptr;
+ if (obj) {
+ m_breakAuxData = obj->serialize();
+ m_breakAuxData->setBoolean("uncaught", isUncaught);
dgozman 2016/11/09 16:27:48 To be very clean, we'd better pass uncaught alongs
jgruber 2016/11/10 07:55:52 Agreed, but wouldn't that break backwards compatib
+ } else {
+ m_breakAuxData = nullptr;
+ }
// m_breakAuxData might be null after this.
}
}
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.h ('k') | test/inspector/debugger/caught-uncaught-exceptions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698