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

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
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | test/mjsunit/debug-stepin-foreach.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-observe.cc
diff --git a/src/runtime/runtime-observe.cc b/src/runtime/runtime-observe.cc
index 4579136d9aa8efd1ad5b3f47d5d6e6189d8df674..211922c5b78fad1bcc73f6f4804b676fd62ca0e9 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->last_step_action() == 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()) {
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | test/mjsunit/debug-stepin-foreach.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698