| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 78bf25a0f7d558e07d6b8e74fd2fe7d698dc05a2..82bb1ea0d486588d119b4753cc3584bdd6d8ddc0 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -5593,7 +5593,7 @@ RUNTIME_FUNCTION(Runtime_StoreArrayLiteralElement) {
|
| // to a built-in function such as Array.forEach.
|
| RUNTIME_FUNCTION(Runtime_DebugCallbackSupportsStepping) {
|
| ASSERT(args.length() == 1);
|
| - if (!isolate->debugger()->is_active() || !isolate->debug()->StepInActive()) {
|
| + if (!isolate->debug()->is_active() || !isolate->debug()->StepInActive()) {
|
| return isolate->heap()->false_value();
|
| }
|
| CONVERT_ARG_CHECKED(Object, callback, 0);
|
| @@ -10740,7 +10740,7 @@ RUNTIME_FUNCTION(Runtime_LookupAccessor) {
|
| RUNTIME_FUNCTION(Runtime_DebugBreak) {
|
| SealHandleScope shs(isolate);
|
| ASSERT(args.length() == 0);
|
| - Execution::DebugBreakHelper(isolate);
|
| + isolate->debug()->HandleDebugBreak();
|
| return isolate->heap()->undefined_value();
|
| }
|
|
|
| @@ -10769,7 +10769,7 @@ RUNTIME_FUNCTION(Runtime_SetDebugEventListener) {
|
| args[0]->IsNull());
|
| CONVERT_ARG_HANDLE_CHECKED(Object, callback, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(Object, data, 1);
|
| - isolate->debugger()->SetEventListener(callback, data);
|
| + isolate->debug()->SetEventListener(callback, data);
|
|
|
| return isolate->heap()->undefined_value();
|
| }
|
| @@ -10857,7 +10857,7 @@ RUNTIME_FUNCTION(Runtime_DebugGetPropertyDetails) {
|
| // could have the assumption that its own native context is the current
|
| // context and not some internal debugger context.
|
| SaveContext save(isolate);
|
| - if (isolate->debug()->InDebugger()) {
|
| + if (isolate->debug()->in_debug_scope()) {
|
| isolate->set_context(*isolate->debug()->debugger_entry()->GetContext());
|
| }
|
|
|
| @@ -12904,7 +12904,7 @@ RUNTIME_FUNCTION(Runtime_DebugEvaluate) {
|
| CONVERT_ARG_HANDLE_CHECKED(Object, context_extension, 5);
|
|
|
| // Handle the processing of break.
|
| - DisableBreak disable_break_save(isolate, disable_break);
|
| + DisableBreak disable_break_scope(isolate->debug(), disable_break);
|
|
|
| // Get the frame where the debugging is performed.
|
| StackFrame::Id id = UnwrapFrameId(wrapped_id);
|
| @@ -12968,7 +12968,7 @@ RUNTIME_FUNCTION(Runtime_DebugEvaluateGlobal) {
|
| CONVERT_ARG_HANDLE_CHECKED(Object, context_extension, 3);
|
|
|
| // Handle the processing of break.
|
| - DisableBreak disable_break_save(isolate, disable_break);
|
| + DisableBreak disable_break_scope(isolate->debug(), disable_break);
|
|
|
| // Enter the top context from before the debugger was invoked.
|
| SaveContext save(isolate);
|
| @@ -13336,7 +13336,7 @@ static int FindSharedFunctionInfosForScript(HeapIterator* iterator,
|
| // in OpaqueReferences.
|
| RUNTIME_FUNCTION(Runtime_LiveEditFindSharedFunctionInfosForScript) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 1);
|
| CONVERT_ARG_CHECKED(JSValue, script_value, 0);
|
|
|
| @@ -13381,7 +13381,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditFindSharedFunctionInfosForScript) {
|
| // with the function itself going first. The root function is a script function.
|
| RUNTIME_FUNCTION(Runtime_LiveEditGatherCompileInfo) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 2);
|
| CONVERT_ARG_CHECKED(JSValue, script, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(String, source, 1);
|
| @@ -13401,7 +13401,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditGatherCompileInfo) {
|
| // the script with its original source and sends notification to debugger.
|
| RUNTIME_FUNCTION(Runtime_LiveEditReplaceScript) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 3);
|
| CONVERT_ARG_CHECKED(JSValue, original_script_value, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(String, new_source, 1);
|
| @@ -13424,7 +13424,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditReplaceScript) {
|
|
|
| RUNTIME_FUNCTION(Runtime_LiveEditFunctionSourceUpdated) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 1);
|
| CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_info, 0);
|
| RUNTIME_ASSERT(SharedInfoWrapper::IsInstance(shared_info));
|
| @@ -13437,7 +13437,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditFunctionSourceUpdated) {
|
| // Replaces code of SharedFunctionInfo with a new one.
|
| RUNTIME_FUNCTION(Runtime_LiveEditReplaceFunctionCode) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 2);
|
| CONVERT_ARG_HANDLE_CHECKED(JSArray, new_compile_info, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_info, 1);
|
| @@ -13451,7 +13451,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditReplaceFunctionCode) {
|
| // Connects SharedFunctionInfo to another script.
|
| RUNTIME_FUNCTION(Runtime_LiveEditFunctionSetScript) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 2);
|
| CONVERT_ARG_HANDLE_CHECKED(Object, function_object, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(Object, script_object, 1);
|
| @@ -13478,7 +13478,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditFunctionSetScript) {
|
| // with a substitution one.
|
| RUNTIME_FUNCTION(Runtime_LiveEditReplaceRefToNestedFunction) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 3);
|
|
|
| CONVERT_ARG_HANDLE_CHECKED(JSValue, parent_wrapper, 0);
|
| @@ -13501,7 +13501,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditReplaceRefToNestedFunction) {
|
| // Each group describes a change in text; groups are sorted by change_begin.
|
| RUNTIME_FUNCTION(Runtime_LiveEditPatchFunctionPositions) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 2);
|
| CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_array, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(JSArray, position_change_array, 1);
|
| @@ -13518,7 +13518,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditPatchFunctionPositions) {
|
| // LiveEdit::FunctionPatchabilityStatus type.
|
| RUNTIME_FUNCTION(Runtime_LiveEditCheckAndDropActivations) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 2);
|
| CONVERT_ARG_HANDLE_CHECKED(JSArray, shared_array, 0);
|
| CONVERT_BOOLEAN_ARG_CHECKED(do_drop, 1);
|
| @@ -13541,7 +13541,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditCheckAndDropActivations) {
|
| // of diff chunks.
|
| RUNTIME_FUNCTION(Runtime_LiveEditCompareStrings) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 2);
|
| CONVERT_ARG_HANDLE_CHECKED(String, s1, 0);
|
| CONVERT_ARG_HANDLE_CHECKED(String, s2, 1);
|
| @@ -13554,7 +13554,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditCompareStrings) {
|
| // Returns true if successful. Otherwise returns undefined or an error message.
|
| RUNTIME_FUNCTION(Runtime_LiveEditRestartFrame) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 2);
|
| CONVERT_NUMBER_CHECKED(int, break_id, Int32, args[0]);
|
| RUNTIME_ASSERT(CheckExecutionState(isolate, break_id));
|
| @@ -13589,7 +13589,7 @@ RUNTIME_FUNCTION(Runtime_LiveEditRestartFrame) {
|
| // source_position.
|
| RUNTIME_FUNCTION(Runtime_GetFunctionCodePositionFromSource) {
|
| HandleScope scope(isolate);
|
| - CHECK(isolate->debugger()->live_edit_enabled());
|
| + CHECK(isolate->debug()->live_edit_enabled());
|
| ASSERT(args.length() == 2);
|
| CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
|
| CONVERT_NUMBER_CHECKED(int32_t, source_position, Int32, args[1]);
|
| @@ -13639,7 +13639,7 @@ RUNTIME_FUNCTION(Runtime_ExecuteInDebugContext) {
|
| 0,
|
| NULL);
|
| } else {
|
| - EnterDebugger enter_debugger(isolate);
|
| + DebugScope debug_scope(isolate->debug());
|
| maybe_result = Execution::Call(isolate,
|
| function,
|
| isolate->global_object(),
|
|
|