Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 12bda591c82421266895ef4ab4fe7b6cec7b2403..1821f500051ca75f8cebcd721b5a3a67e095bf28 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -2873,8 +2873,9 @@ MaybeObject* JSObject::DeleteElement(uint32_t index, DeleteMode mode) { |
// exception. dictionary->DeleteProperty will return false_value() |
// if a non-configurable property is being deleted. |
HandleScope scope; |
+ Handle<Object> self(this); |
Handle<Object> i = isolate->factory()->NewNumberFromUint(index); |
- Handle<Object> args[2] = { i, Handle<Object>(this) }; |
+ Handle<Object> args[2] = { i, self }; |
return isolate->Throw(*isolate->factory()->NewTypeError( |
"strict_delete_property", HandleVector(args, 2))); |
} |
@@ -7292,7 +7293,7 @@ MaybeObject* JSObject::GetElementWithCallback(Object* receiver, |
// api style callbacks. |
if (structure->IsAccessorInfo()) { |
- AccessorInfo* data = AccessorInfo::cast(structure); |
+ Handle<AccessorInfo> data(AccessorInfo::cast(structure)); |
Object* fun_obj = data->getter(); |
v8::AccessorGetter call_fun = v8::ToCData<v8::AccessorGetter>(fun_obj); |
HandleScope scope(isolate); |
@@ -7349,14 +7350,16 @@ MaybeObject* JSObject::SetElementWithCallback(Object* structure, |
if (structure->IsAccessorInfo()) { |
// api style callbacks |
- AccessorInfo* data = AccessorInfo::cast(structure); |
+ Handle<JSObject> self(this); |
+ Handle<JSObject> holder_handle(JSObject::cast(holder)); |
+ Handle<AccessorInfo> data(AccessorInfo::cast(structure)); |
Object* call_obj = data->setter(); |
v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj); |
if (call_fun == NULL) return value; |
Handle<Object> number = isolate->factory()->NewNumberFromUint(index); |
Handle<String> key(isolate->factory()->NumberToString(number)); |
- LOG(isolate, ApiNamedPropertyAccess("store", this, *key)); |
- CustomArguments args(isolate, data->data(), this, JSObject::cast(holder)); |
+ LOG(isolate, ApiNamedPropertyAccess("store", *self, *key)); |
+ CustomArguments args(isolate, data->data(), *self, *holder_handle); |
v8::AccessorInfo info(args.end()); |
{ |
// Leaving JavaScript. |
@@ -7558,8 +7561,8 @@ MaybeObject* JSObject::SetElementWithoutInterceptor(uint32_t index, |
// If put fails instrict mode, throw exception. |
if (!dictionary->ValueAtPut(entry, value) && |
strict_mode == kStrictMode) { |
- Handle<Object> number(isolate->factory()->NewNumberFromUint(index)); |
Handle<Object> holder(this); |
+ Handle<Object> number(isolate->factory()->NewNumberFromUint(index)); |
Handle<Object> args[2] = { number, holder }; |
return isolate->Throw( |
*isolate->factory()->NewTypeError("strict_read_only_property", |