libraries/v8/runtime.cc
// Set the context local variable value.
Set the context local variable value.
Set the context local variable value .
static bool SetContextLocalValue(Isolate* isolate,
                                 Handle<ScopeInfo> scope_info,
                                 Handle<Context> context,
                                 Handle<String> variable_name,
                                 Handle<Object> new_value) {
  for (int i = 0; i < scope_info->ContextLocalCount(); i++) {
    Handle<String> next_name(scope_info->ContextLocalName(i));
    if (variable_name->Equals(*next_name)) {
      VariableMode mode;
      InitializationFlag init_flag;
      int context_index =
          scope_info->ContextSlotIndex(*next_name, &mode, &init_flag);
      context->set(context_index, *new_value);
      return true;
    }
  }
  return false;
}
static bool SetContextLocalValue ( Isolate * isolate , Handle < ScopeInfo > scope_info , Handle < Context > context , Handle < String > variable_name , Handle < Object > new_value ) { for ( int i = 0 ; i < scope_info -> ContextLocalCount ( ) ; i ++ ) { Handle < String > next_name ( scope_info -> ContextLocalName ( i ) ) ; if ( variable_name -> Equals ( * next_name ) ) { VariableMode mode ; InitializationFlag init_flag ; int context_index = scope_info -> ContextSlotIndex ( * next_name , & mode , & init_flag ) ; context -> set ( context_index , * new_value ) ; return true ; } } return false ; }
Set the context local variable value.
Set the context local variable value .