Use JSObject::SetMapAndElements rather than set_map + set_elements.
authorverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 31 Mar 2014 16:21:20 +0000 (16:21 +0000)
committerverwaest@chromium.org <verwaest@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 31 Mar 2014 16:21:20 +0000 (16:21 +0000)
BUG=
R=ishell@chromium.org

Review URL: https://codereview.chromium.org/218583008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/api.cc

index ffddc79..9e24fee 100644 (file)
@@ -3736,8 +3736,7 @@ void PrepareExternalArrayElements(i::Handle<i::JSObject> object,
           object,
           GetElementsKindFromExternalArrayType(array_type));
 
-  object->set_map(*external_array_map);
-  object->set_elements(*array);
+  i::JSObject::SetMapAndElements(object, external_array_map, array);
 }
 
 }  // namespace