Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index 8cf74ad33836a191159334430bd6b8c71323f554..abfa477f690feaa051b644c33c511707d3d7a8a0 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -452,14 +452,17 @@ MaybeObject* JSProxy::GetElementWithHandler(Object* receiver, |
| } |
| -MaybeObject* JSProxy::SetElementWithHandler(JSReceiver* receiver, |
| - uint32_t index, |
| - Object* value, |
| - StrictModeFlag strict_mode) { |
| - String* name; |
| - MaybeObject* maybe = GetHeap()->Uint32ToString(index); |
| - if (!maybe->To<String>(&name)) return maybe; |
| - return SetPropertyWithHandler(receiver, name, value, NONE, strict_mode); |
| +Handle<Object> JSProxy::SetElementWithHandler(Handle<JSProxy> object, |
|
rossberg
2013/08/30 06:51:13
Nit: can we name this 'proxy'?
Michael Starzinger
2013/08/30 10:42:09
Done. Also renamed it for all other occurrences th
|
| + Handle<JSReceiver> receiver, |
| + uint32_t index, |
| + Handle<Object> value, |
| + StrictModeFlag strict_mode) { |
| + Isolate* isolate = object->GetIsolate(); |
| + Handle<String> name = isolate->factory()->Uint32ToString(index); |
| + CALL_HEAP_FUNCTION(isolate, |
| + object->SetPropertyWithHandler( |
| + *receiver, *name, *value, NONE, strict_mode), |
| + Object); |
| } |
| @@ -12111,18 +12114,17 @@ MUST_USE_RESULT MaybeObject* JSObject::SetFastDoubleElement( |
| } |
| -MaybeObject* JSReceiver::SetElement(uint32_t index, |
| - Object* value, |
| - PropertyAttributes attributes, |
| - StrictModeFlag strict_mode, |
| - bool check_proto) { |
| - if (IsJSProxy()) { |
| - return JSProxy::cast(this)->SetElementWithHandler( |
| - this, index, value, strict_mode); |
| - } else { |
| - return JSObject::cast(this)->SetElement( |
| - index, value, attributes, strict_mode, check_proto); |
| +Handle<Object> JSReceiver::SetElement(Handle<JSReceiver> object, |
| + uint32_t index, |
| + Handle<Object> value, |
| + PropertyAttributes attributes, |
| + StrictModeFlag strict_mode) { |
| + if (object->IsJSProxy()) { |
| + return JSProxy::SetElementWithHandler( |
| + Handle<JSProxy>::cast(object), object, index, value, strict_mode); |
| } |
| + return JSObject::SetElement( |
| + Handle<JSObject>::cast(object), index, value, attributes, strict_mode); |
| } |