| Index: src/bootstrapper.cc
|
| ===================================================================
|
| --- src/bootstrapper.cc (revision 7031)
|
| +++ src/bootstrapper.cc (working copy)
|
| @@ -304,7 +304,7 @@
|
| prototype,
|
| call_code,
|
| is_ecma_native);
|
| - SetProperty(target, symbol, function, DONT_ENUM);
|
| + SetLocalPropertyNoThrow(target, symbol, function, DONT_ENUM);
|
| if (is_ecma_native) {
|
| function->shared()->set_instance_class_name(*symbol);
|
| }
|
| @@ -539,8 +539,11 @@
|
| Handle<JSObject> prototype =
|
| Handle<JSObject>(
|
| JSObject::cast(js_global_function->instance_prototype()));
|
| - SetProperty(prototype, FACTORY->constructor_symbol(),
|
| - Isolate::Current()->object_function(), NONE);
|
| + SetLocalPropertyNoThrow(
|
| + prototype,
|
| + FACTORY->constructor_symbol(),
|
| + Isolate::Current()->object_function(),
|
| + NONE);
|
| } else {
|
| Handle<FunctionTemplateInfo> js_global_constructor(
|
| FunctionTemplateInfo::cast(js_global_template->constructor()));
|
| @@ -643,8 +646,8 @@
|
| global_context()->set_security_token(*inner_global);
|
|
|
| Handle<String> object_name = Handle<String>(HEAP->Object_symbol());
|
| - SetProperty(inner_global, object_name,
|
| - Isolate::Current()->object_function(), DONT_ENUM);
|
| + SetLocalPropertyNoThrow(inner_global, object_name,
|
| + Isolate::Current()->object_function(), DONT_ENUM);
|
|
|
| Handle<JSObject> global = Handle<JSObject>(global_context()->global());
|
|
|
| @@ -812,7 +815,7 @@
|
| cons->SetInstanceClassName(*name);
|
| Handle<JSObject> json_object = FACTORY->NewJSObject(cons, TENURED);
|
| ASSERT(json_object->IsJSObject());
|
| - SetProperty(global, name, json_object, DONT_ENUM);
|
| + SetLocalPropertyNoThrow(global, name, json_object, DONT_ENUM);
|
| global_context()->set_json_object(*json_object);
|
| }
|
|
|
| @@ -842,12 +845,12 @@
|
| global_context()->set_arguments_boilerplate(*result);
|
| // Note: callee must be added as the first property and
|
| // length must be added as the second property.
|
| - SetProperty(result, FACTORY->callee_symbol(),
|
| - FACTORY->undefined_value(),
|
| - DONT_ENUM);
|
| - SetProperty(result, FACTORY->length_symbol(),
|
| - FACTORY->undefined_value(),
|
| - DONT_ENUM);
|
| + SetLocalPropertyNoThrow(result, FACTORY->callee_symbol(),
|
| + FACTORY->undefined_value(),
|
| + DONT_ENUM);
|
| + SetLocalPropertyNoThrow(result, FACTORY->length_symbol(),
|
| + FACTORY->undefined_value(),
|
| + DONT_ENUM);
|
|
|
| #ifdef DEBUG
|
| LookupResult lookup;
|
| @@ -1054,10 +1057,8 @@
|
| static const PropertyAttributes attributes =
|
| static_cast<PropertyAttributes>(READ_ONLY | DONT_DELETE);
|
| Handle<String> global_symbol = FACTORY->LookupAsciiSymbol("global");
|
| - SetProperty(builtins,
|
| - global_symbol,
|
| - Handle<Object>(global_context()->global()),
|
| - attributes);
|
| + Handle<Object> global_obj(global_context()->global());
|
| + SetLocalPropertyNoThrow(builtins, global_symbol, global_obj, attributes);
|
|
|
| // Setup the reference from the global object to the builtins object.
|
| JSGlobalObject::cast(global_context()->global())->set_builtins(*builtins);
|
| @@ -1449,17 +1450,17 @@
|
| if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) {
|
| Handle<String> natives_string =
|
| FACTORY->LookupAsciiSymbol(FLAG_expose_natives_as);
|
| - SetProperty(js_global, natives_string,
|
| - Handle<JSObject>(js_global->builtins()), DONT_ENUM);
|
| + SetLocalPropertyNoThrow(js_global, natives_string,
|
| + Handle<JSObject>(js_global->builtins()), DONT_ENUM);
|
| }
|
|
|
| Handle<Object> Error = GetProperty(js_global, "Error");
|
| if (Error->IsJSObject()) {
|
| Handle<String> name = FACTORY->LookupAsciiSymbol("stackTraceLimit");
|
| - SetProperty(Handle<JSObject>::cast(Error),
|
| - name,
|
| - Handle<Smi>(Smi::FromInt(FLAG_stack_trace_limit)),
|
| - NONE);
|
| + SetLocalPropertyNoThrow(Handle<JSObject>::cast(Error),
|
| + name,
|
| + Handle<Smi>(Smi::FromInt(FLAG_stack_trace_limit)),
|
| + NONE);
|
| }
|
|
|
| #ifdef ENABLE_DEBUGGER_SUPPORT
|
| @@ -1477,8 +1478,8 @@
|
|
|
| Handle<String> debug_string =
|
| FACTORY->LookupAsciiSymbol(FLAG_expose_debug_as);
|
| - SetProperty(js_global, debug_string,
|
| - Handle<Object>(debug->debug_context()->global_proxy()), DONT_ENUM);
|
| + Handle<Object> global_proxy(debug->debug_context()->global_proxy());
|
| + SetLocalPropertyNoThrow(js_global, debug_string, global_proxy, DONT_ENUM);
|
| }
|
| #endif
|
| }
|
| @@ -1655,7 +1656,7 @@
|
| Handle<String> key = Handle<String>(descs->GetKey(i));
|
| int index = descs->GetFieldIndex(i);
|
| Handle<Object> value = Handle<Object>(from->FastPropertyAt(index));
|
| - SetProperty(to, key, value, details.attributes());
|
| + SetLocalPropertyNoThrow(to, key, value, details.attributes());
|
| break;
|
| }
|
| case CONSTANT_FUNCTION: {
|
| @@ -1663,7 +1664,7 @@
|
| Handle<String> key = Handle<String>(descs->GetKey(i));
|
| Handle<JSFunction> fun =
|
| Handle<JSFunction>(descs->GetConstantFunction(i));
|
| - SetProperty(to, key, fun, details.attributes());
|
| + SetLocalPropertyNoThrow(to, key, fun, details.attributes());
|
| break;
|
| }
|
| case CALLBACKS: {
|
| @@ -1713,7 +1714,7 @@
|
| value = Handle<Object>(JSGlobalPropertyCell::cast(*value)->value());
|
| }
|
| PropertyDetails details = properties->DetailsAt(i);
|
| - SetProperty(to, key, value, details.attributes());
|
| + SetLocalPropertyNoThrow(to, key, value, details.attributes());
|
| }
|
| }
|
| }
|
|
|