testing/talos/talos/tests/perf-reftest-singletons/id-getter-4.html
author Butkovits Atila <abutkovits@mozilla.com>
Sat, 13 Aug 2022 12:21:24 +0300
changeset 627090 cbd753d186199d816e1d097631573f601932b96e
parent 425702 ed26ab52032ea0a2f1420236e50b6f37824e9c8b
permissions -rw-r--r--
Merge autoland to mozilla-central. a=merge

<!doctype html>
<script src="util.js"></script>
<script>
onload = function() {
  var count = 20000000;
  var el = document.createElement("span");
  // The longest string we can fit in an autostring buffer (63 chars).
  el.id = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
  var getter = Object.getOwnPropertyDescriptor(Element.prototype, "id").get;
  perf_start();
  for (var i = 0; i < count; ++i) {
    getter.call(el);
  }
  perf_finish();
};
</script>