libraries/v8/runtime.cc
// Calls specified function with or without entering the debugger.
// This is used in unit tests to run code as if debugger is entered or simply
// to have a stack with C++ frame in the middle.
Calls specified function with or without entering the debugger.
This is used in unit tests to run code as if debugger is entered or simply
to have a stack with C++ frame in the middle.
Calls specified function with or without entering the debugger . This is used in unit tests to run code as if debugger is entered or simply to have a stack with C ++ frame in the middle .
RUNTIME_FUNCTION(MaybeObject*, Runtime_ExecuteInDebugContext) {
  HandleScope scope(isolate);
  ASSERT(args.length() == 2);
  CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
  CONVERT_BOOLEAN_ARG_CHECKED(without_debugger, 1);
  Handle<Object> result;
  bool pending_exception;
  {
    if (without_debugger) {
      result = Execution::Call(isolate,
                               function,
                               isolate->global_object(),
                               0,
                               NULL,
                               &pending_exception);
    } else {
      EnterDebugger enter_debugger(isolate);
      result = Execution::Call(isolate,
                               function,
                               isolate->global_object(),
                               0,
                               NULL,
                               &pending_exception);
    }
  }
  if (!pending_exception) {
    return *result;
  } else {
    return Failure::Exception();
  }
}
RUNTIME_FUNCTION ( MaybeObject * , Runtime_ExecuteInDebugContext ) { HandleScope scope ( isolate ) ; ASSERT ( args . length ( ) == 2 ) ; CONVERT_ARG_HANDLE_CHECKED ( JSFunction , function , 0 ) ; CONVERT_BOOLEAN_ARG_CHECKED ( without_debugger , 1 ) ; Handle < Object > result ; bool pending_exception ; { if ( without_debugger ) { result = Execution :: Call ( isolate , function , isolate -> global_object ( ) , 0 , NULL , & pending_exception ) ; } else { EnterDebugger enter_debugger ( isolate ) ; result = Execution :: Call ( isolate , function , isolate -> global_object ( ) , 0 , NULL , & pending_exception ) ; } } if ( ! pending_exception ) { return * result ; } else { return Failure :: Exception ( ) ; } }
Calls specified function with or without entering the debugger.
Calls specified function with or without entering the debugger .