Commit b8cce79f authored by ishell's avatar ishell Committed by Commit bot

A couple of other "stack overflow" vs. "has_pending_exception()" issues in debugger fixed.

BUG=chromium:505007
LOG=N

Review URL: https://codereview.chromium.org/1219693003

Cr-Commit-Position: refs/heads/master@{#29369}
parent 0dd2e3cc
......@@ -3022,6 +3022,11 @@ RUNTIME_FUNCTION(Runtime_ExecuteInDebugContext) {
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
DebugScope debug_scope(isolate->debug());
if (debug_scope.failed()) {
DCHECK(isolate->has_pending_exception());
return isolate->heap()->exception();
}
Handle<Object> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, result,
......@@ -3037,6 +3042,10 @@ RUNTIME_FUNCTION(Runtime_GetDebugContext) {
Handle<Context> context;
{
DebugScope debug_scope(isolate->debug());
if (debug_scope.failed()) {
DCHECK(isolate->has_pending_exception());
return isolate->heap()->exception();
}
context = isolate->debug()->GetDebugContext();
}
if (context.is_null()) return isolate->heap()->undefined_value();
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --stack-size=100 --allow-natives-syntax
function f() {
try {
f();
} catch(e) {
%GetDebugContext();
}
}
f();
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --stack-size=100 --allow-natives-syntax
function g() {}
function f() {
try {
f();
} catch(e) {
%ExecuteInDebugContext(g);
}
}
f();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment