blob: 7ebaa433a1218b677df8ec6a416ddd1149e11e2e [file] [log] [blame]
if (platformSupportsSamplingProfiler()) {
load("./sampling-profiler/samplingProfiler.js");
function foo() {
let o = {};
for (let i = 0; i < 100; i++) {
o[i + "p"] = i;
}
}
function bar() {
let o = {};
for (let i = 0; i < 100; i++) {
o[i + "p"] = i;
}
}
let boundFoo = foo.bind(null);
let boundBar = bar.bind(null);
let baz = function() {
boundFoo();
boundBar();
}
runTest(baz, ["foo", "bound foo", "baz"]);
runTest(baz, ["bar", "bound bar", "baz"]);
}