diff options
author | Josh Matthews <josh@joshmatthews.net> | 2016-08-22 18:33:45 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2016-08-25 00:11:39 -0400 |
commit | 4961a513d4cb25eb0caa008dd5f662e67dfebf6d (patch) | |
tree | ea349cc5cbed878c6f7dcab62073e9d8bbf87ffc /tests/html/bindings_perf.html | |
parent | 2ad293ca64a3a7e513c0978f33b5e20cd55394ba (diff) | |
download | servo-4961a513d4cb25eb0caa008dd5f662e67dfebf6d.tar.gz servo-4961a513d4cb25eb0caa008dd5f662e67dfebf6d.zip |
Check for shadowing properties on DOM proxies. Fixes #12357.
Diffstat (limited to 'tests/html/bindings_perf.html')
-rw-r--r-- | tests/html/bindings_perf.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/html/bindings_perf.html b/tests/html/bindings_perf.html index d50cf940c32..123c53d6c00 100644 --- a/tests/html/bindings_perf.html +++ b/tests/html/bindings_perf.html @@ -1,6 +1,7 @@ <button onclick="void_method()">measure void method</button> <button onclick="int_getter()">measure int getter</button> <button onclick="firstChild_getter()">measure firstChild getter</button> +<button onclick="proxy_firstChild_getter()">measure proxy firstChild getter</button> <script> var t = 'TestBinding' in window ? (new TestBinding()) : (new TextEncoder()); function void_method() { @@ -33,4 +34,15 @@ function firstChild_getter() { var stop = new Date(); console.log('firstChild getter: ' + ((stop - start) / count * 1e6) + 'ns'); } + +function proxy_firstChild_getter() { + var n = document; + var start = new Date(); + var count = 1000000; + for (var i = 0; i < count; i++) { + var a = n.firstChild; + } + var stop = new Date(); + console.log('proxy firstChild getter: ' + ((stop - start) / count * 1e6) + 'ns'); +} </script> |