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

Unified Diff: src/runtime/runtime-observe.cc

Issue 739523002: Allow stepping into Object.observe handlers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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
Index: src/runtime/runtime-observe.cc
diff --git a/src/runtime/runtime-observe.cc b/src/runtime/runtime-observe.cc
index 4579136d9aa8efd1ad5b3f47d5d6e6189d8df674..e8838ee9b2bc1cbc984dcbb4fb46b311bdcfac18 100644
--- a/src/runtime/runtime-observe.cc
+++ b/src/runtime/runtime-observe.cc
@@ -5,6 +5,7 @@
#include "src/v8.h"
#include "src/arguments.h"
+#include "src/debug.h"
#include "src/runtime/runtime-utils.h"
namespace v8 {
@@ -63,6 +64,18 @@ RUNTIME_FUNCTION(Runtime_DeliverObservationChangeRecords) {
// we make a call inside a verbose TryCatch.
catcher.SetVerbose(true);
Handle<Object> argv[] = {argument};
+
+ // Allow stepping into the observer callback.
+ Debug* debug = isolate->debug();
+ if (debug->is_active() && debug->IsStepping() &&
+ debug->LastStepAction() == StepIn) {
+ // Previous StepIn may have activated a StepOut if it was at the frame exit.
+ // In this case to be able to step into the callback again, we need to clear
+ // the step out first.
+ debug->ClearStepOut();
+ debug->FloodWithOneShot(callback);
+ }
+
USE(Execution::Call(isolate, callback, isolate->factory()->undefined_value(),
arraysize(argv), argv));
if (isolate->has_pending_exception()) {

Powered by Google App Engine
This is Rietveld 408576698