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

Unified Diff: src/debug.cc

Issue 1154163006: Debugger: consider try-finally scopes not catching wrt debug events. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: do not specifically test turbofan Created 5 years, 7 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 | src/frames.h » ('j') | src/isolate.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index b63e99dbd5247ca2ba048641b3162ee5811440ba..4e57f49f0e96df1426792e80186d7b0706ed3962 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -1150,7 +1150,7 @@ void Debug::FloodHandlerWithOneShot() {
for (JavaScriptFrameIterator it(isolate_, id); !it.done(); it.Advance()) {
JavaScriptFrame* frame = it.frame();
int stack_slots = 0; // The computed stack slot count is not used.
- if (frame->LookupExceptionHandlerInTable(&stack_slots) > 0) {
+ if (frame->LookupExceptionHandlerInTable(&stack_slots, NULL) > 0) {
// Flood the function with the catch/finally block with break points.
FloodWithOneShot(Handle<JSFunction>(frame->function()));
return;
@@ -2486,7 +2486,9 @@ MaybeHandle<Object> Debug::PromiseHasUserDefinedRejectHandler(
void Debug::OnException(Handle<Object> exception, Handle<Object> promise) {
- Isolate::CatchType catch_type = isolate_->PredictExceptionCatcher();
+ // Use conservative prediction so that try-finally is not considered to catch.
+ Isolate::CatchType catch_type =
+ isolate_->PredictExceptionCatcher(Isolate::CONSERVATIVE_PREDICTION);
bool uncaught = (catch_type == Isolate::NOT_CAUGHT);
if (promise->IsJSObject()) {
Handle<JSObject> jspromise = Handle<JSObject>::cast(promise);
« no previous file with comments | « no previous file | src/frames.h » ('j') | src/isolate.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698