OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/debug/debug-evaluate.h" | 5 #include "src/debug/debug-evaluate.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/contexts.h" | 9 #include "src/contexts.h" |
10 #include "src/debug/debug-frames.h" | 10 #include "src/debug/debug-frames.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // Compile and evaluate source for the given context. | 86 // Compile and evaluate source for the given context. |
87 MaybeHandle<Object> DebugEvaluate::Evaluate( | 87 MaybeHandle<Object> DebugEvaluate::Evaluate( |
88 Isolate* isolate, Handle<SharedFunctionInfo> outer_info, | 88 Isolate* isolate, Handle<SharedFunctionInfo> outer_info, |
89 Handle<Context> context, Handle<Object> receiver, Handle<String> source, | 89 Handle<Context> context, Handle<Object> receiver, Handle<String> source, |
90 bool throw_on_side_effect) { | 90 bool throw_on_side_effect) { |
91 Handle<JSFunction> eval_fun; | 91 Handle<JSFunction> eval_fun; |
92 ASSIGN_RETURN_ON_EXCEPTION( | 92 ASSIGN_RETURN_ON_EXCEPTION( |
93 isolate, eval_fun, | 93 isolate, eval_fun, |
94 Compiler::GetFunctionFromEval(source, outer_info, context, SLOPPY, | 94 Compiler::GetFunctionFromEval(source, outer_info, context, SLOPPY, |
95 NO_PARSE_RESTRICTION, kNoSourcePosition, | 95 NO_PARSE_RESTRICTION, kNoSourcePosition, |
96 kNoSourcePosition), | 96 kNoSourcePosition, kNoSourcePosition), |
97 Object); | 97 Object); |
98 | 98 |
99 Handle<Object> result; | 99 Handle<Object> result; |
100 { | 100 { |
101 NoSideEffectScope no_side_effect(isolate, throw_on_side_effect); | 101 NoSideEffectScope no_side_effect(isolate, throw_on_side_effect); |
102 ASSIGN_RETURN_ON_EXCEPTION( | 102 ASSIGN_RETURN_ON_EXCEPTION( |
103 isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL), | 103 isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL), |
104 Object); | 104 Object); |
105 } | 105 } |
106 | 106 |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 | 539 |
540 if (FLAG_trace_side_effect_free_debug_evaluate) { | 540 if (FLAG_trace_side_effect_free_debug_evaluate) { |
541 PrintF("[debug-evaluate] API Callback at %p may cause side effect.\n", | 541 PrintF("[debug-evaluate] API Callback at %p may cause side effect.\n", |
542 reinterpret_cast<void*>(function_addr)); | 542 reinterpret_cast<void*>(function_addr)); |
543 } | 543 } |
544 return false; | 544 return false; |
545 } | 545 } |
546 | 546 |
547 } // namespace internal | 547 } // namespace internal |
548 } // namespace v8 | 548 } // namespace v8 |
OLD | NEW |