Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index eba17a19437b86de7c502faf8f1f3d99cf2ba8f8..35bda84d83a168331eb5d2fac900a7aa0a203ba8 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -303,8 +303,7 @@ MUST_USE_RESULT static MaybeHandle<Object> CreateObjectLiteralBoilerplate( |
const char* str = DoubleToCString(num, buffer); |
Handle<String> name = isolate->factory()->NewStringFromAsciiChecked(str); |
maybe_result = JSObject::SetOwnPropertyIgnoreAttributes( |
- boilerplate, name, value, NONE, |
- value_type, mode); |
+ boilerplate, name, value, NONE, value_type, mode); |
} |
// If setting the property on the boilerplate throws an |
// exception, the exception is converted to an empty handle in |
@@ -2396,10 +2395,7 @@ RUNTIME_FUNCTION(Runtime_InitializeConstGlobal) { |
if (!lookup.IsFound()) { |
HandleScope handle_scope(isolate); |
Handle<GlobalObject> global(isolate->context()->global_object()); |
- RETURN_FAILURE_ON_EXCEPTION( |
- isolate, |
- JSObject::SetOwnPropertyIgnoreAttributes(global, name, value, |
- attributes)); |
+ JSObject::AddProperty(global, name, value, attributes); |
return *value; |
} |
@@ -8124,8 +8120,8 @@ RUNTIME_FUNCTION(Runtime_FunctionBindArguments) { |
static_cast<PropertyAttributes>(DONT_DELETE | DONT_ENUM | READ_ONLY); |
RETURN_FAILURE_ON_EXCEPTION( |
isolate, |
- JSObject::SetOwnPropertyIgnoreAttributes(bound_function, length_string, |
- new_length, attr)); |
+ JSObject::SetOwnPropertyIgnoreAttributes( |
+ bound_function, length_string, new_length, attr)); |
return *bound_function; |
} |
@@ -13800,18 +13796,10 @@ RUNTIME_FUNCTION(Runtime_GetLanguageTagVariants) { |
} |
Handle<JSObject> result = factory->NewJSObject(isolate->object_function()); |
- RETURN_FAILURE_ON_EXCEPTION(isolate, |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- result, |
- maximized, |
- factory->NewStringFromAsciiChecked(base_max_locale), |
- NONE)); |
- RETURN_FAILURE_ON_EXCEPTION(isolate, |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- result, |
- base, |
- factory->NewStringFromAsciiChecked(base_locale), |
- NONE)); |
+ Handle<String> value = factory->NewStringFromAsciiChecked(base_max_locale); |
+ JSObject::AddProperty(result, maximized, value, NONE); |
+ value = factory->NewStringFromAsciiChecked(base_locale); |
+ JSObject::AddProperty(result, base, value, NONE); |
output->set(i, *result); |
} |
@@ -13928,12 +13916,10 @@ RUNTIME_FUNCTION(Runtime_CreateDateTimeFormat) { |
local_object->SetInternalField(0, reinterpret_cast<Smi*>(date_format)); |
- RETURN_FAILURE_ON_EXCEPTION(isolate, |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- local_object, |
- isolate->factory()->NewStringFromStaticAscii("dateFormat"), |
- isolate->factory()->NewStringFromStaticAscii("valid"), |
- NONE)); |
+ Factory* factory = isolate->factory(); |
+ Handle<String> key = factory->NewStringFromStaticAscii("dateFormat"); |
+ Handle<String> value = factory->NewStringFromStaticAscii("valid"); |
+ JSObject::AddProperty(local_object, key, value, NONE); |
// Make object handle weak so we can delete the data format once GC kicks in. |
Handle<Object> wrapper = isolate->global_handles()->Create(*local_object); |
@@ -14027,12 +14013,10 @@ RUNTIME_FUNCTION(Runtime_CreateNumberFormat) { |
local_object->SetInternalField(0, reinterpret_cast<Smi*>(number_format)); |
- RETURN_FAILURE_ON_EXCEPTION(isolate, |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- local_object, |
- isolate->factory()->NewStringFromStaticAscii("numberFormat"), |
- isolate->factory()->NewStringFromStaticAscii("valid"), |
- NONE)); |
+ Factory* factory = isolate->factory(); |
+ Handle<String> key = factory->NewStringFromStaticAscii("numberFormat"); |
+ Handle<String> value = factory->NewStringFromStaticAscii("valid"); |
+ JSObject::AddProperty(local_object, key, value, NONE); |
Handle<Object> wrapper = isolate->global_handles()->Create(*local_object); |
GlobalHandles::MakeWeak(wrapper.location(), |
@@ -14135,12 +14119,10 @@ RUNTIME_FUNCTION(Runtime_CreateCollator) { |
local_object->SetInternalField(0, reinterpret_cast<Smi*>(collator)); |
- RETURN_FAILURE_ON_EXCEPTION(isolate, |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- local_object, |
- isolate->factory()->NewStringFromStaticAscii("collator"), |
- isolate->factory()->NewStringFromStaticAscii("valid"), |
- NONE)); |
+ Factory* factory = isolate->factory(); |
+ Handle<String> key = factory->NewStringFromStaticAscii("collator"); |
+ Handle<String> value = factory->NewStringFromStaticAscii("valid"); |
+ JSObject::AddProperty(local_object, key, value, NONE); |
Handle<Object> wrapper = isolate->global_handles()->Create(*local_object); |
GlobalHandles::MakeWeak(wrapper.location(), |
@@ -14241,12 +14223,10 @@ RUNTIME_FUNCTION(Runtime_CreateBreakIterator) { |
// Make sure that the pointer to adopted text is NULL. |
local_object->SetInternalField(1, reinterpret_cast<Smi*>(NULL)); |
- RETURN_FAILURE_ON_EXCEPTION(isolate, |
- JSObject::SetOwnPropertyIgnoreAttributes( |
- local_object, |
- isolate->factory()->NewStringFromStaticAscii("breakIterator"), |
- isolate->factory()->NewStringFromStaticAscii("valid"), |
- NONE)); |
+ Factory* factory = isolate->factory(); |
+ Handle<String> key = factory->NewStringFromStaticAscii("breakIterator"); |
+ Handle<String> value = factory->NewStringFromStaticAscii("valid"); |
+ JSObject::AddProperty(local_object, key, value, NONE); |
// Make object handle weak so we can delete the break iterator once GC kicks |
// in. |