| Index: src/debug/debug-evaluate.cc
|
| diff --git a/src/debug/debug-evaluate.cc b/src/debug/debug-evaluate.cc
|
| index b36d8a21abc873419b4e33f5285aceef1500619d..55f3ac32d8d97dabd638e7627b7ba350c759bfc8 100644
|
| --- a/src/debug/debug-evaluate.cc
|
| +++ b/src/debug/debug-evaluate.cc
|
| @@ -41,13 +41,14 @@ MaybeHandle<Object> DebugEvaluate::Global(Isolate* isolate,
|
| Handle<Context> context = isolate->native_context();
|
| Handle<JSObject> receiver(context->global_proxy());
|
| Handle<SharedFunctionInfo> outer_info(context->closure()->shared(), isolate);
|
| - return Evaluate(isolate, outer_info, context, receiver, source);
|
| + return Evaluate(isolate, outer_info, context, receiver, source, false);
|
| }
|
|
|
| MaybeHandle<Object> DebugEvaluate::Local(Isolate* isolate,
|
| StackFrame::Id frame_id,
|
| int inlined_jsframe_index,
|
| - Handle<String> source) {
|
| + Handle<String> source,
|
| + bool throw_on_side_effect) {
|
| // Handle the processing of break.
|
| DisableBreak disable_break_scope(isolate->debug());
|
|
|
| @@ -74,8 +75,9 @@ MaybeHandle<Object> DebugEvaluate::Local(Isolate* isolate,
|
|
|
| Handle<Context> context = context_builder.evaluation_context();
|
| Handle<JSObject> receiver(context->global_proxy());
|
| - MaybeHandle<Object> maybe_result = Evaluate(
|
| - isolate, context_builder.outer_info(), context, receiver, source);
|
| + MaybeHandle<Object> maybe_result =
|
| + Evaluate(isolate, context_builder.outer_info(), context, receiver, source,
|
| + throw_on_side_effect);
|
| if (!maybe_result.is_null()) context_builder.UpdateValues();
|
| return maybe_result;
|
| }
|
| @@ -84,7 +86,8 @@ MaybeHandle<Object> DebugEvaluate::Local(Isolate* isolate,
|
| // Compile and evaluate source for the given context.
|
| MaybeHandle<Object> DebugEvaluate::Evaluate(
|
| Isolate* isolate, Handle<SharedFunctionInfo> outer_info,
|
| - Handle<Context> context, Handle<Object> receiver, Handle<String> source) {
|
| + Handle<Context> context, Handle<Object> receiver, Handle<String> source,
|
| + bool throw_on_side_effect) {
|
| Handle<JSFunction> eval_fun;
|
| ASSIGN_RETURN_ON_EXCEPTION(
|
| isolate, eval_fun,
|
| @@ -95,8 +98,7 @@ MaybeHandle<Object> DebugEvaluate::Evaluate(
|
|
|
| Handle<Object> result;
|
| {
|
| - NoSideEffectScope no_side_effect(isolate,
|
| - FLAG_side_effect_free_debug_evaluate);
|
| + NoSideEffectScope no_side_effect(isolate, throw_on_side_effect);
|
| ASSIGN_RETURN_ON_EXCEPTION(
|
| isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL),
|
| Object);
|
|
|