blob: c2103f32f66bc2d2bd04c0e4335ac151c007c4a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// JSOP_NEWOBJECT should respect the metadata hook, even if
// it's set with scripts on the stack.
function f() {
for (var i=0; i<100; i++) {
if (i === 20)
enableShellAllocationMetadataBuilder();
var o = {x: 1};
if (i >= 20) {
var md = getAllocationMetadata(o);
assertEq(typeof md === "object" && md !== null, true);
assertEq(typeof md.index, "number");
}
}
}
f();
|