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

Unified Diff: src/api-arguments.cc

Issue 2622863003: [debugger] infrastructure for side-effect-free debug-evaluate. (Closed)
Patch Set: fix mips one more time 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
« no previous file with comments | « src/api-arguments.h ('k') | src/api-arguments-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api-arguments.cc
diff --git a/src/api-arguments.cc b/src/api-arguments.cc
index 3baf9ea36502ca7d24ff0b99577b2de7fb20735e..c7c54e5de1c37fc635644642cfeb1820e27f6f62 100644
--- a/src/api-arguments.cc
+++ b/src/api-arguments.cc
@@ -4,6 +4,7 @@
#include "src/api-arguments.h"
+#include "src/debug/debug.h"
#include "src/objects-inl.h"
#include "src/tracing/trace-event.h"
#include "src/vm-state-inl.h"
@@ -13,6 +14,10 @@ namespace internal {
Handle<Object> FunctionCallbackArguments::Call(FunctionCallback f) {
Isolate* isolate = this->isolate();
+ if (isolate->needs_side_effect_check() &&
+ !isolate->debug()->PerformSideEffectCheckForCallback(FUNCTION_ADDR(f))) {
+ return Handle<Object>();
+ }
RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::FunctionCallback);
VMState<EXTERNAL> state(isolate);
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
@@ -24,6 +29,10 @@ Handle<Object> FunctionCallbackArguments::Call(FunctionCallback f) {
Handle<JSObject> PropertyCallbackArguments::Call(
IndexedPropertyEnumeratorCallback f) {
Isolate* isolate = this->isolate();
+ if (isolate->needs_side_effect_check() &&
+ !isolate->debug()->PerformSideEffectCheckForCallback(FUNCTION_ADDR(f))) {
+ return Handle<JSObject>();
+ }
RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::PropertyCallback);
VMState<EXTERNAL> state(isolate);
ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
@@ -32,5 +41,10 @@ Handle<JSObject> PropertyCallbackArguments::Call(
return GetReturnValue<JSObject>(isolate);
}
+bool PropertyCallbackArguments::PerformSideEffectCheck(Isolate* isolate,
+ Address function) {
+ return isolate->debug()->PerformSideEffectCheckForCallback(function);
+}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/api-arguments.h ('k') | src/api-arguments-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698