| Index: src/handles.cc
|
| ===================================================================
|
| --- src/handles.cc (revision 6800)
|
| +++ src/handles.cc (working copy)
|
| @@ -280,16 +280,27 @@
|
| }
|
|
|
|
|
| -Handle<Object> IgnoreAttributesAndSetLocalProperty(
|
| +Handle<Object> SetLocalPropertyIgnoreAttributes(
|
| Handle<JSObject> object,
|
| Handle<String> key,
|
| Handle<Object> value,
|
| PropertyAttributes attributes) {
|
| CALL_HEAP_FUNCTION(object->
|
| - IgnoreAttributesAndSetLocalProperty(*key, *value, attributes), Object);
|
| + SetLocalPropertyIgnoreAttributes(*key, *value, attributes), Object);
|
| }
|
|
|
|
|
| +void SetLocalPropertyNoThrow(Handle<JSObject> object,
|
| + Handle<String> key,
|
| + Handle<Object> value,
|
| + PropertyAttributes attributes) {
|
| + ASSERT(!Top::has_pending_exception());
|
| + CHECK(!SetLocalPropertyIgnoreAttributes(
|
| + object, key, value, attributes).is_null());
|
| + CHECK(!Top::has_pending_exception());
|
| +}
|
| +
|
| +
|
| Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object,
|
| Handle<String> key,
|
| Handle<Object> value,
|
| @@ -422,6 +433,15 @@
|
| }
|
|
|
|
|
| +Handle<Object> SetOwnElement(Handle<JSObject> object,
|
| + uint32_t index,
|
| + Handle<Object> value) {
|
| + ASSERT(!object->HasPixelElements());
|
| + ASSERT(!object->HasExternalArrayElements());
|
| + CALL_HEAP_FUNCTION(object->SetElement(index, *value, false), Object);
|
| +}
|
| +
|
| +
|
| Handle<JSObject> Copy(Handle<JSObject> obj) {
|
| CALL_HEAP_FUNCTION(Heap::CopyJSObject(*obj), JSObject);
|
| }
|
| @@ -799,6 +819,7 @@
|
| ClearExceptionFlag flag) {
|
| // Compile the source information to a code object.
|
| ASSERT(info->IsOptimizing() || !info->shared_info()->is_compiled());
|
| + ASSERT(!Top::has_pending_exception());
|
| bool result = Compiler::CompileLazy(info);
|
| ASSERT(result != Top::has_pending_exception());
|
| if (!result && flag == CLEAR_EXCEPTION) Top::clear_pending_exception();
|
| @@ -864,7 +885,7 @@
|
| int expected_additional_properties,
|
| bool condition) {
|
| object_ = object;
|
| - if (condition && object_->HasFastProperties()) {
|
| + if (condition && object_->HasFastProperties() && !object->IsJSGlobalProxy()) {
|
| // Normalize the properties of object to avoid n^2 behavior
|
| // when extending the object multiple properties. Indicate the number of
|
| // properties to be added.
|
|
|