michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: * Contributors: Gary Kwong and Jason Orendorff michael@0: */ michael@0: michael@0: var savedEval = eval; michael@0: var x = [0]; michael@0: eval(); michael@0: michael@0: x.__proto__ = this; // x has non-dictionary scope michael@0: try { michael@0: DIE; michael@0: } catch(e) { michael@0: } michael@0: michael@0: delete eval; // force dictionary scope for global michael@0: gc(); michael@0: eval = savedEval; michael@0: var f = eval("(function () { return /x/; })"); michael@0: x.watch('x', f); // clone property from global to x, including SPROP_IN_DICTIONARY flag michael@0: michael@0: reportCompare("ok", "ok", "bug 533876");