browser/devtools/debugger/test/doc_closure-optimized-out.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/devtools/debugger/test/doc_closure-optimized-out.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +  <head>
     1.7 +    <meta charset='utf-8'/>
     1.8 +    <title>Debugger Test for Inspecting Optimized-Out Variables</title>
     1.9 +    <!-- Any copyright is dedicated to the Public Domain.
    1.10 +         http://creativecommons.org/publicdomain/zero/1.0/ -->
    1.11 +    <script type="text/javascript">
    1.12 +      window.addEventListener("load", function onload() {
    1.13 +        window.removeEventListener("load", onload);
    1.14 +        function clickHandler(event) {
    1.15 +          button.removeEventListener("click", clickHandler, false);
    1.16 +          function outer(arg) {
    1.17 +            var upvar = arg * 2;
    1.18 +            // The inner lambda only aliases arg, so the frontend alias analysis decides
    1.19 +            // that upvar is not aliased and is not in the CallObject.
    1.20 +            return function () {
    1.21 +              arg += 2;
    1.22 +            };
    1.23 +          }
    1.24 +
    1.25 +          var f = outer(42);
    1.26 +          f();
    1.27 +        }
    1.28 +        var button = document.querySelector("button");
    1.29 +        button.addEventListener("click", clickHandler, false);
    1.30 +      });
    1.31 +    </script>
    1.32 +
    1.33 +  </head>
    1.34 +  <body>
    1.35 +    <button>Click me!</button>
    1.36 +  </body>
    1.37 +</html>

mercurial