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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/api-arguments.h ('k') | src/api-arguments-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/api-arguments.h" 5 #include "src/api-arguments.h"
6 6
7 #include "src/debug/debug.h"
7 #include "src/objects-inl.h" 8 #include "src/objects-inl.h"
8 #include "src/tracing/trace-event.h" 9 #include "src/tracing/trace-event.h"
9 #include "src/vm-state-inl.h" 10 #include "src/vm-state-inl.h"
10 11
11 namespace v8 { 12 namespace v8 {
12 namespace internal { 13 namespace internal {
13 14
14 Handle<Object> FunctionCallbackArguments::Call(FunctionCallback f) { 15 Handle<Object> FunctionCallbackArguments::Call(FunctionCallback f) {
15 Isolate* isolate = this->isolate(); 16 Isolate* isolate = this->isolate();
17 if (isolate->needs_side_effect_check() &&
18 !isolate->debug()->PerformSideEffectCheckForCallback(FUNCTION_ADDR(f))) {
19 return Handle<Object>();
20 }
16 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::FunctionCallback); 21 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::FunctionCallback);
17 VMState<EXTERNAL> state(isolate); 22 VMState<EXTERNAL> state(isolate);
18 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); 23 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
19 FunctionCallbackInfo<v8::Value> info(begin(), argv_, argc_); 24 FunctionCallbackInfo<v8::Value> info(begin(), argv_, argc_);
20 f(info); 25 f(info);
21 return GetReturnValue<Object>(isolate); 26 return GetReturnValue<Object>(isolate);
22 } 27 }
23 28
24 Handle<JSObject> PropertyCallbackArguments::Call( 29 Handle<JSObject> PropertyCallbackArguments::Call(
25 IndexedPropertyEnumeratorCallback f) { 30 IndexedPropertyEnumeratorCallback f) {
26 Isolate* isolate = this->isolate(); 31 Isolate* isolate = this->isolate();
32 if (isolate->needs_side_effect_check() &&
33 !isolate->debug()->PerformSideEffectCheckForCallback(FUNCTION_ADDR(f))) {
34 return Handle<JSObject>();
35 }
27 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::PropertyCallback); 36 RuntimeCallTimerScope timer(isolate, &RuntimeCallStats::PropertyCallback);
28 VMState<EXTERNAL> state(isolate); 37 VMState<EXTERNAL> state(isolate);
29 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f)); 38 ExternalCallbackScope call_scope(isolate, FUNCTION_ADDR(f));
30 PropertyCallbackInfo<v8::Array> info(begin()); 39 PropertyCallbackInfo<v8::Array> info(begin());
31 f(info); 40 f(info);
32 return GetReturnValue<JSObject>(isolate); 41 return GetReturnValue<JSObject>(isolate);
33 } 42 }
34 43
44 bool PropertyCallbackArguments::PerformSideEffectCheck(Isolate* isolate,
45 Address function) {
46 return isolate->debug()->PerformSideEffectCheckForCallback(function);
47 }
48
35 } // namespace internal 49 } // namespace internal
36 } // namespace v8 50 } // namespace v8
OLDNEW
« 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