Chromium Code Reviews| 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.
|
| } |
| } |