Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: src/api.cc

Issue 150813004: In-heap small typed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for review Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/accessors.cc ('k') | src/bootstrapper.cc » ('j') | src/flag-definitions.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 2c7db3be1656f10d475dd8e1de71a89ed374cdd6..502aa342c13fb97b7cd70dd647959f9f459b0e9f 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5927,7 +5927,9 @@ i::Handle<i::JSTypedArray> NewTypedArray(
isolate->factory()->NewExternalArray(
static_cast<int>(length), array_type,
static_cast<uint8_t*>(buffer->backing_store()) + byte_offset);
- obj->set_elements(*elements);
+ i::Handle<i::Map> map =
+ i::JSObject::GetElementsTransitionMap(obj, elements_kind);
+ obj->set_map_and_elements(*map, *elements);
return obj;
}
« no previous file with comments | « src/accessors.cc ('k') | src/bootstrapper.cc » ('j') | src/flag-definitions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698