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

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

Issue 2622863003: [debugger] infrastructure for side-effect-free debug-evaluate. (Closed)
Patch Set: 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
Index: src/runtime/runtime-debug.cc
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 281ba29695d54ebd8d26aba7376706641180dbc9..5b9ebe537af2d35bd7e3230e34e3bf2851f09d27 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -5,6 +5,7 @@
#include "src/runtime/runtime-utils.h"
#include "src/arguments.h"
+#include "src/compiler.h"
#include "src/debug/debug-evaluate.h"
#include "src/debug/debug-frames.h"
#include "src/debug/debug-scopes.h"
@@ -1857,6 +1858,21 @@ RUNTIME_FUNCTION(Runtime_DebugPrepareStepInIfStepping) {
return isolate->heap()->undefined_value();
}
+// Perform %DebugPrepareStepInIfStepping and a read-only check.
+RUNTIME_FUNCTION(Runtime_DebugOnFunctionCall) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(1, args.length());
+ CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0);
+ if (isolate->debug()->last_step_action() >= StepIn) {
jgruber 2017/01/10 12:46:38 Maybe we should refactor these '>= StepIn' checks
Yang 2017/01/10 14:14:07 We do have static asserts in many places to guard
+ isolate->debug()->PrepareStepIn(fun);
+ }
+ if (isolate->debug()->needs_readonly_check() &&
+ !isolate->debug()->PerformReadOnlyCheck(fun)) {
+ return isolate->heap()->exception();
+ }
+ return isolate->heap()->undefined_value();
+}
+
// Set one shot breakpoints for the suspended generator object.
RUNTIME_FUNCTION(Runtime_DebugPrepareStepInSuspendedGenerator) {
HandleScope scope(isolate);

Powered by Google App Engine
This is Rietveld 408576698