mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
GC profiling.
* Closes #6968. * Test case for GC profiling thanks to @jdm!
This commit is contained in:
parent
d2ba81ead2
commit
7cb4d77c74
3 changed files with 79 additions and 1 deletions
21
tests/html/make-garbage.html
Normal file
21
tests/html/make-garbage.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<script>
|
||||
var i = 0, j;
|
||||
function K() {
|
||||
window.gc();
|
||||
window.onload = [];
|
||||
i += 1;
|
||||
for (j = 0; j <= i; ++j) {
|
||||
window.onload[window.onload.length] = {
|
||||
x: window.onload,
|
||||
i: j,
|
||||
toString: function() {
|
||||
return "{x:" + window.onload + ", i: " + j + "}";
|
||||
}
|
||||
};
|
||||
}
|
||||
if (i <= 999999) {
|
||||
setTimeout(K, 0);
|
||||
}
|
||||
}
|
||||
window.onload = K;
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue