libraries/v8/runtime.cc
// Compile and evaluate source for the given context.
Compile and evaluate source for the given context.
Compile and evaluate source for the given context .
static MaybeObject* DebugEvaluate(Isolate* isolate,
                                  Handle<Context> context,
                                  Handle<Object> context_extension,
                                  Handle<Object> receiver,
                                  Handle<String> source) {
  if (context_extension->IsJSObject()) {
    Handle<JSObject> extension = Handle<JSObject>::cast(context_extension);
    Handle<JSFunction> closure(context->closure(), isolate);
    context = isolate->factory()->NewWithContext(closure, context, extension);
  }
  Handle<SharedFunctionInfo> shared = Compiler::CompileEval(
      source,
      context,
      context->IsNativeContext(),
      CLASSIC_MODE,
      NO_PARSE_RESTRICTION,
      RelocInfo::kNoPosition);
  RETURN_IF_EMPTY_HANDLE(isolate, shared);
  Handle<JSFunction> eval_fun =
      isolate->factory()->NewFunctionFromSharedFunctionInfo(
          shared, context, NOT_TENURED);
  bool pending_exception;
  Handle<Object> result = Execution::Call(
      isolate, eval_fun, receiver, 0, NULL, &pending_exception);
  if (pending_exception) return Failure::Exception();
  if (result->IsJSGlobalProxy()) {
    result = Handle<JSObject>(JSObject::cast(result->GetPrototype(isolate)));
  }
  isolate->debug()->ClearStepping();
  return *result;
}
static MaybeObject * DebugEvaluate ( Isolate * isolate , Handle < Context > context , Handle < Object > context_extension , Handle < Object > receiver , Handle < String > source ) { if ( context_extension -> IsJSObject ( ) ) { Handle < JSObject > extension = Handle < JSObject > :: cast ( context_extension ) ; Handle < JSFunction > closure ( context -> closure ( ) , isolate ) ; context = isolate -> factory ( ) -> NewWithContext ( closure , context , extension ) ; } Handle < SharedFunctionInfo > shared = Compiler :: CompileEval ( source , context , context -> IsNativeContext ( ) , CLASSIC_MODE , NO_PARSE_RESTRICTION , RelocInfo :: kNoPosition ) ; RETURN_IF_EMPTY_HANDLE ( isolate , shared ) ; Handle < JSFunction > eval_fun = isolate -> factory ( ) -> NewFunctionFromSharedFunctionInfo ( shared , context , NOT_TENURED ) ; bool pending_exception ; Handle < Object > result = Execution :: Call ( isolate , eval_fun , receiver , 0 , NULL , & pending_exception ) ; if ( pending_exception ) return Failure :: Exception ( ) ; if ( result -> IsJSGlobalProxy ( ) ) { result = Handle < JSObject > ( JSObject :: cast ( result -> GetPrototype ( isolate ) ) ) ; } isolate -> debug ( ) -> ClearStepping ( ) ; return * result ; }
Compile and evaluate source for the given context.
Compile and evaluate source for the given context .
// Skip the global proxy as it has no properties and always delegates to the // real global object. // Clear the oneshot breakpoints so that the debugger does not step further.