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

Unified Diff: test/cctest/test-heap.cc

Issue 1009343002: Retain maps that have live prototypes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test Created 5 years, 9 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/heap/mark-compact.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index d46d59a9128553f96d0c709cd22cd8c5c237d9e8..65a1214af84008d79f4fb37a577034c80d3239ce 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -5101,6 +5101,11 @@ void CheckMapRetainingFor(int n) {
{
HandleScope inner_scope(isolate);
Handle<Map> map = Map::Create(isolate, 1);
+ v8::Local<v8::Value> result =
+ CompileRun("(function () { return {x : 10}; })();");
+ Handle<JSObject> proto =
+ v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(result));
+ map->set_prototype(*proto);
heap->AddRetainedMap(map);
weak_cell = inner_scope.CloseAndEscape(Map::WeakCellForMap(map));
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698