libraries/v8/runtime.cc
// Set a local property, even if it is READ_ONLY.  If the property does not
// exist, it will be added with attributes NONE.
Set a local property, even if it is READ_ONLY.  If the property does not
exist, it will be added with attributes NONE.
Set a local property even if it is READ_ONLY . If the property does not exist it will be added with attributes NONE .
RUNTIME_FUNCTION(MaybeObject*, Runtime_IgnoreAttributesAndSetProperty) {
  HandleScope scope(isolate);
  RUNTIME_ASSERT(args.length() == 3 || args.length() == 4);
  CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
  CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
  CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
  PropertyAttributes attributes = NONE;
  if (args.length() == 4) {
    CONVERT_SMI_ARG_CHECKED(unchecked_value, 3);
    RUNTIME_ASSERT(
        (unchecked_value & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0);
    attributes = static_cast<PropertyAttributes>(unchecked_value);
  }
  Handle<Object> result = JSObject::SetLocalPropertyIgnoreAttributes(
      object, name, value, attributes);
  RETURN_IF_EMPTY_HANDLE(isolate, result);
  return *result;
}
RUNTIME_FUNCTION ( MaybeObject * , Runtime_IgnoreAttributesAndSetProperty ) { HandleScope scope ( isolate ) ; RUNTIME_ASSERT ( args . length ( ) == 3 || args . length ( ) == 4 ) ; CONVERT_ARG_HANDLE_CHECKED ( JSObject , object , 0 ) ; CONVERT_ARG_HANDLE_CHECKED ( Name , name , 1 ) ; CONVERT_ARG_HANDLE_CHECKED ( Object , value , 2 ) ; PropertyAttributes attributes = NONE ; if ( args . length ( ) == 4 ) { CONVERT_SMI_ARG_CHECKED ( unchecked_value , 3 ) ; RUNTIME_ASSERT ( ( unchecked_value & ~ ( READ_ONLY | DONT_ENUM | DONT_DELETE ) ) == 0 ) ; attributes = static_cast < PropertyAttributes > ( unchecked_value ) ; } Handle < Object > result = JSObject :: SetLocalPropertyIgnoreAttributes ( object , name , value , attributes ) ; RETURN_IF_EMPTY_HANDLE ( isolate , result ) ; return * result ; }
Set a local property, even if it is READ_ONLY.
Set a local property even if it is READ_ONLY .
// Compute attributes. // Only attribute bits should be set.