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

Unified Diff: src/heap.cc

Issue 14846017: Becuase of cross-context calls, hydrogen-based Array constructor needs to ensure (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Enable optimize_constructed_arrays Created 7 years, 7 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/flag-definitions.h ('k') | src/hydrogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index c58424aea5ccef29f6e0d01a34f521a0b73bd93c..dcb1c8c417016fa9f0e89bcaf1747f11f09c38ca 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -4340,8 +4340,7 @@ MaybeObject* Heap::AllocateJSObjectWithAllocationSite(JSFunction* constructor,
ElementsKind to_kind = static_cast<ElementsKind>(smi->value());
AllocationSiteMode mode = TRACK_ALLOCATION_SITE;
if (to_kind != initial_map->elements_kind()) {
- MaybeObject* maybe_new_map = constructor->GetElementsTransitionMap(
- isolate(), to_kind);
+ MaybeObject* maybe_new_map = initial_map->AsElementsKind(to_kind);
if (!maybe_new_map->To(&initial_map)) return maybe_new_map;
// Possibly alter the mode, since we found an updated elements kind
// in the type info cell.
« no previous file with comments | « src/flag-definitions.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698