Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 1482c4ca69ba5e9eead21010cd3506d55b588b1d..398213412cf36ce33be12fa4489d430660bb8696 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -2646,7 +2646,7 @@ MUST_USE_RESULT MaybeObject* JSProxy::DeletePropertyWithHandler( |
String* name_raw, DeleteMode mode) { |
Isolate* isolate = GetIsolate(); |
HandleScope scope(isolate); |
- Handle<Object> receiver(this); |
+ Handle<JSProxy> receiver(this); |
Handle<Object> name(name_raw); |
Handle<Object> args[] = { name }; |
@@ -2656,8 +2656,9 @@ MUST_USE_RESULT MaybeObject* JSProxy::DeletePropertyWithHandler( |
Object* bool_result = result->ToBoolean(); |
if (mode == STRICT_DELETION && bool_result == GetHeap()->false_value()) { |
+ Handle<Object> handler(receiver->handler()); |
Handle<String> trap_name = isolate->factory()->LookupAsciiSymbol("delete"); |
- Handle<Object> args[] = { Handle<Object>(handler()), trap_name }; |
+ Handle<Object> args[] = { handler, trap_name }; |
Handle<Object> error = isolate->factory()->NewTypeError( |
"handler_failed", HandleVector(args, ARRAY_SIZE(args))); |
isolate->Throw(*error); |
@@ -9672,8 +9673,9 @@ MaybeObject* JSObject::SetElement(uint32_t index, |
// Don't allow element properties to be redefined for external arrays. |
if (HasExternalArrayElements() && set_mode == DEFINE_PROPERTY) { |
Isolate* isolate = GetHeap()->isolate(); |
+ Handle<Object> receiver(this); |
Handle<Object> number = isolate->factory()->NewNumberFromUint(index); |
- Handle<Object> args[] = { Handle<Object>(this), number }; |
+ Handle<Object> args[] = { receiver, number }; |
Handle<Object> error = isolate->factory()->NewTypeError( |
"redef_external_array_element", HandleVector(args, ARRAY_SIZE(args))); |
return isolate->Throw(*error); |