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

Unified Diff: test/mjsunit/allocation-site-info.js

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: Ports, and turned off flag 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
« src/ia32/code-stubs-ia32.cc ('K') | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/allocation-site-info.js
diff --git a/test/mjsunit/allocation-site-info.js b/test/mjsunit/allocation-site-info.js
index d85ce3ef533a3743b99373e536588e8c9e595fa9..21e0cfd2949b6c4d4627b59695c422b9c9b661de 100644
--- a/test/mjsunit/allocation-site-info.js
+++ b/test/mjsunit/allocation-site-info.js
@@ -284,5 +284,19 @@ if (support_smi_only_arrays) {
assertKind(elements_kind.fast, obj);
obj = newarraycase_list_smiobj(2);
assertKind(elements_kind.fast, obj);
+
+ // Verify that cross context calls work
+ var realmA = Realm.current();
+ var realmB = Realm.create();
+ assertEquals(0, realmA);
+ assertEquals(1, realmB);
+
+ var realmBArray = Realm.eval(realmB, "Array");
+ assertTrue(new Array() instanceof Array);
+ assertTrue(new Array(5) instanceof Array);
+ assertTrue(new Array(1,2,3) instanceof Array);
+ assertTrue(new realmBArray() instanceof realmBArray);
+ assertTrue(new realmBArray(5) instanceof realmBArray);
+ assertTrue(new realmBArray(1,2,3) instanceof realmBArray);
Toon Verwaest 2013/05/07 11:02:06 Please add another test that checks the optimized
mvstanton 2013/05/07 12:40:50 Done.
}
}
« src/ia32/code-stubs-ia32.cc ('K') | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698