libraries/v8/runtime.cc
// Set the native flag on the function.
// This is used to decide if we should transform null and undefined
// into the global object when doing call and apply.
Set the native flag on the function.
This is used to decide if we should transform null and undefined
into the global object when doing call and apply.
Set the native flag on the function . This is used to decide if we should transform null and undefined into the global object when doing call and apply .
RUNTIME_FUNCTION(MaybeObject*, Runtime_SetNativeFlag) {
  SealHandleScope shs(isolate);
  RUNTIME_ASSERT(args.length() == 1);
  Handle<Object> object = args.at<Object>(0);
  if (object->IsJSFunction()) {
    JSFunction* func = JSFunction::cast(*object);
    func->shared()->set_native(true);
  }
  return isolate->heap()->undefined_value();
}
RUNTIME_FUNCTION ( MaybeObject * , Runtime_SetNativeFlag ) { SealHandleScope shs ( isolate ) ; RUNTIME_ASSERT ( args . length ( ) == 1 ) ; Handle < Object > object = args . at < Object > ( 0 ) ; if ( object -> IsJSFunction ( ) ) { JSFunction * func = JSFunction :: cast ( * object ) ; func -> shared ( ) -> set_native ( true ) ; } return isolate -> heap ( ) -> undefined_value ( ) ; }
Set the native flag on the function.
Set the native flag on the function .