Handle<String> key,
Handle<Object> value,
PropertyAttributes attributes,
- StrictModeFlag strict) {
- CALL_HEAP_FUNCTION(object->SetProperty(*key, *value, attributes, strict),
+ StrictModeFlag strict_mode) {
+ CALL_HEAP_FUNCTION(object->SetProperty(*key, *value, attributes, strict_mode),
Object);
}
Handle<Object> key,
Handle<Object> value,
PropertyAttributes attributes,
- StrictModeFlag strict) {
+ StrictModeFlag strict_mode) {
CALL_HEAP_FUNCTION(
- Runtime::SetObjectProperty(object, key, value, attributes, strict),
+ Runtime::SetObjectProperty(object, key, value, attributes, strict_mode),
Object);
}
Handle<String> key,
Handle<Object> value,
PropertyAttributes attributes,
- StrictModeFlag strict) {
+ StrictModeFlag strict_mode) {
CALL_HEAP_FUNCTION(object->SetPropertyWithInterceptor(*key,
*value,
attributes,
- strict),
+ strict_mode),
Object);
}
Handle<String> key,
Handle<Object> value,
PropertyAttributes attributes,
- StrictModeFlag strict);
+ StrictModeFlag strict_mode);
Handle<Object> SetProperty(Handle<Object> object,
Handle<Object> key,
Handle<Object> value,
PropertyAttributes attributes,
- StrictModeFlag strict);
+ StrictModeFlag strict_mode);
Handle<Object> ForceSetProperty(Handle<JSObject> object,
Handle<Object> key,
Handle<String> key,
Handle<Object> value,
PropertyAttributes attributes,
- StrictModeFlag strict);
+ StrictModeFlag strict_mode);
Handle<Object> SetElement(Handle<JSObject> object,
uint32_t index,
String* name,
Object* value,
PropertyAttributes attributes,
- StrictModeFlag strict) {
+ StrictModeFlag strict_mode) {
// Check local property, ignore interceptor.
LookupResult result;
LocalLookupRealNamedProperty(name, &result);
if (result.IsFound()) {
// An existing property, a map transition or a null descriptor was
// found. Use set property to handle all these cases.
- return SetProperty(&result, name, value, attributes, strict);
+ return SetProperty(&result, name, value, attributes, strict_mode);
}
// Add a new real property.
return AddProperty(name, value, attributes);
String* name,
Object* value,
PropertyAttributes attributes,
- StrictModeFlag strict) {
+ StrictModeFlag strict_mode) {
HandleScope scope;
Handle<JSObject> this_handle(this);
Handle<String> name_handle(name);
this_handle->SetPropertyPostInterceptor(*name_handle,
*value_handle,
attributes,
- strict);
+ strict_mode);
RETURN_IF_SCHEDULED_EXCEPTION();
return raw_result;
}
MaybeObject* JSObject::SetProperty(String* name,
Object* value,
PropertyAttributes attributes,
- StrictModeFlag strict) {
+ StrictModeFlag strict_mode) {
LookupResult result;
LocalLookup(name, &result);
- return SetProperty(&result, name, value, attributes, strict);
+ return SetProperty(&result, name, value, attributes, strict_mode);
}
String* name,
Object* value,
PropertyAttributes attributes,
- StrictModeFlag strict) {
+ StrictModeFlag strict_mode) {
// Make sure that the top context does not change when doing callbacks or
// interceptor calls.
AssertNoContextChange ncc;
if (proto->IsNull()) return value;
ASSERT(proto->IsJSGlobalObject());
return JSObject::cast(proto)->SetProperty(
- result, name, value, attributes, strict);
+ result, name, value, attributes, strict_mode);
}
if (!result->IsProperty() && !IsJSContextExtensionObject()) {
return AddProperty(name, value, attributes);
}
if (result->IsReadOnly() && result->IsProperty()) {
- if (strict == kStrictMode) {
+ if (strict_mode == kStrictMode) {
HandleScope scope;
Handle<String> key(name);
Handle<Object> holder(this);
value,
result->holder());
case INTERCEPTOR:
- return SetPropertyWithInterceptor(name, value, attributes, strict);
+ return SetPropertyWithInterceptor(name, value, attributes, strict_mode);
case CONSTANT_TRANSITION: {
// If the same constant function is being added we can simply
// transition to the target map.
MUST_USE_RESULT MaybeObject* SetProperty(String* key,
Object* value,
PropertyAttributes attributes,
- StrictModeFlag strict);
+ StrictModeFlag strict_mode);
MUST_USE_RESULT MaybeObject* SetProperty(LookupResult* result,
String* key,
Object* value,
PropertyAttributes attributes,
- StrictModeFlag strict);
+ StrictModeFlag strict_mode);
MUST_USE_RESULT MaybeObject* SetPropertyWithFailedAccessCheck(
LookupResult* result,
String* name,
String* name,
Object* value,
PropertyAttributes attributes,
- StrictModeFlag strict);
+ StrictModeFlag strict_mode);
MUST_USE_RESULT MaybeObject* SetPropertyPostInterceptor(
String* name,
Object* value,
PropertyAttributes attributes,
- StrictModeFlag strict);
+ StrictModeFlag strict_mode);
MUST_USE_RESULT MaybeObject* SetLocalPropertyIgnoreAttributes(
String* key,
Object* value,
Handle<Object> key,
Handle<Object> value,
PropertyAttributes attr,
- StrictModeFlag strict) {
+ StrictModeFlag strict_mode) {
HandleScope scope;
if (object->IsUndefined() || object->IsNull()) {
} else {
Handle<String> key_string = Handle<String>::cast(key);
key_string->TryFlatten();
- result = SetProperty(js_object, key_string, value, attr, strict);
+ result = SetProperty(js_object, key_string, value, attr, strict_mode);
}
if (result.is_null()) return Failure::Exception();
return *value;
// TODO(1220): Implement SetElement strict mode.
return js_object->SetElement(index, *value);
} else {
- return js_object->SetProperty(*name, *value, attr, strict);
+ return js_object->SetProperty(*name, *value, attr, strict_mode);
}
}
PropertyAttributes attributes =
static_cast<PropertyAttributes>(unchecked_attributes);
- StrictModeFlag strict = kNonStrictMode;
+ StrictModeFlag strict_mode = kNonStrictMode;
if (args.length() == 5) {
CONVERT_SMI_CHECKED(strict_unchecked, args[4]);
RUNTIME_ASSERT(strict_unchecked == kStrictMode ||
strict_unchecked == kNonStrictMode);
- strict = static_cast<StrictModeFlag>(strict_unchecked);
+ strict_mode = static_cast<StrictModeFlag>(strict_unchecked);
}
- return Runtime::SetObjectProperty(object, key, value, attributes, strict);
+ return Runtime::SetObjectProperty(object,
+ key,
+ value,
+ attributes,
+ strict_mode);
}
CONVERT_SMI_CHECKED(strict_unchecked, args[3]);
RUNTIME_ASSERT(strict_unchecked == kStrictMode ||
strict_unchecked == kNonStrictMode);
- StrictModeFlag strict = static_cast<StrictModeFlag>(strict_unchecked);
-
+ StrictModeFlag strict_mode = static_cast<StrictModeFlag>(strict_unchecked);
int index;
PropertyAttributes attributes;
// extension object itself.
if ((attributes & READ_ONLY) == 0 ||
(context_ext->GetLocalPropertyAttribute(*name) == ABSENT)) {
- RETURN_IF_EMPTY_HANDLE(SetProperty(context_ext, name, value, NONE, strict));
- } else if (strict == kStrictMode && (attributes & READ_ONLY) != 0) {
+ RETURN_IF_EMPTY_HANDLE(
+ SetProperty(context_ext, name, value, NONE, strict_mode));
+ } else if (strict_mode == kStrictMode && (attributes & READ_ONLY) != 0) {
// Setting read only property in strict mode.
Handle<Object> error =
- Factory::NewTypeError("strict_cannot_assign", HandleVector(&name, 1));
+ Factory::NewTypeError("strict_cannot_assign", HandleVector(&name, 1));
return Top::Throw(*error);
}
return *value;
Handle<Object> key,
Handle<Object> value,
PropertyAttributes attr,
- StrictModeFlag strict);
+ StrictModeFlag strict_mode);
MUST_USE_RESULT static MaybeObject* ForceSetObjectProperty(
Handle<JSObject> object,
JSObject* recv = JSObject::cast(args[0]);
String* name = String::cast(args[1]);
Object* value = args[2];
- StrictModeFlag strict =
+ StrictModeFlag strict_mode =
static_cast<StrictModeFlag>(Smi::cast(args[3])->value());
- ASSERT(strict == kStrictMode || strict == kNonStrictMode);
+ ASSERT(strict_mode == kStrictMode || strict_mode == kNonStrictMode);
ASSERT(recv->HasNamedInterceptor());
PropertyAttributes attr = NONE;
MaybeObject* result = recv->SetPropertyWithInterceptor(
- name, value, attr, strict);
+ name, value, attr, strict_mode);
return result;
}