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

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

Issue 2624543004: [inspector] unconditionally pause on OOM (Closed)
Patch Set: rebased Created 3 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
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.h ('k') | test/inspector/debugger/pause-on-oom.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 b287d1c082d880cd5c7c53e37f686b4dc3e21147..09c7b5842be7cc5b9ce57929f8603e6f46c30f3e 100644
--- a/src/inspector/v8-debugger-agent-impl.cc
+++ b/src/inspector/v8-debugger-agent-impl.cc
@@ -1124,13 +1124,15 @@ void V8DebuggerAgentImpl::didParseSource(
V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::didPause(
v8::Local<v8::Context> context, v8::Local<v8::Value> exception,
const std::vector<String16>& hitBreakpoints, bool isPromiseRejection,
- bool isUncaught) {
+ bool isUncaught, bool isOOMBreak) {
JavaScriptCallFrames callFrames = m_debugger->currentCallFrames(1);
JavaScriptCallFrame* topCallFrame =
!callFrames.empty() ? callFrames.begin()->get() : nullptr;
V8DebuggerAgentImpl::SkipPauseRequest result;
- if (m_skipAllPauses)
+ if (isOOMBreak)
+ result = RequestNoSkip;
+ else if (m_skipAllPauses)
result = RequestContinue;
else if (!hitBreakpoints.empty())
result = RequestNoSkip; // Don't skip explicit breakpoints even if set in
@@ -1154,7 +1156,10 @@ V8DebuggerAgentImpl::SkipPauseRequest V8DebuggerAgentImpl::didPause(
m_pausedContext.Reset(m_isolate, context);
v8::HandleScope handles(m_isolate);
- if (!exception.IsEmpty()) {
+ if (isOOMBreak) {
+ m_breakReason = protocol::Debugger::Paused::ReasonEnum::OOM;
+ m_breakAuxData = nullptr;
+ } else if (!exception.IsEmpty()) {
InjectedScript* injectedScript = nullptr;
m_session->findInjectedScript(InspectedContext::contextId(context),
injectedScript);
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.h ('k') | test/inspector/debugger/pause-on-oom.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698