Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | // |jit-test| error:ReferenceError |
michael@0 | 2 | |
michael@0 | 3 | // Binary: cache/js-dbg-64-d3215d1e985a-linux |
michael@0 | 4 | // Flags: -m -n -a |
michael@0 | 5 | // |
michael@0 | 6 | function ygTreeView(id) { |
michael@0 | 7 | this.init(id) |
michael@0 | 8 | } |
michael@0 | 9 | ygTreeView.prototype.init = function (id) { |
michael@0 | 10 | this.root = new ygRootNode(this) |
michael@0 | 11 | }; |
michael@0 | 12 | function ygNode() {} |
michael@0 | 13 | ygNode.prototype.init = function (_32, _33, _34) { |
michael@0 | 14 | this.children = [] |
michael@0 | 15 | this.expanded = _34 |
michael@0 | 16 | if (_33) _33.appendChild(this) |
michael@0 | 17 | }; |
michael@0 | 18 | ygNode.prototype.appendChild = function (_35) { |
michael@0 | 19 | this.children[this.children.length] = _35 |
michael@0 | 20 | }; |
michael@0 | 21 | ygNode.prototype.hasChildren = function () { |
michael@0 | 22 | return this.children.length > 0; |
michael@0 | 23 | }; |
michael@0 | 24 | ygNode.prototype.getHtml = function () { |
michael@0 | 25 | var sb = []; |
michael@0 | 26 | if (this.hasChildren(true) && this.expanded) sb[sb.length] = this.renderChildren() |
michael@0 | 27 | }; |
michael@0 | 28 | ygNode.prototype.renderChildren = function () { |
michael@0 | 29 | this.completeRender() |
michael@0 | 30 | }; |
michael@0 | 31 | ygNode.prototype.completeRender = function () { |
michael@0 | 32 | for (var i = 0;;) sb[sb.length] = this.children[i].getHtml() |
michael@0 | 33 | }; |
michael@0 | 34 | ygRootNode.prototype = new ygNode; |
michael@0 | 35 | |
michael@0 | 36 | function ygRootNode(_48) { |
michael@0 | 37 | this.init(null, null, true) |
michael@0 | 38 | } |
michael@0 | 39 | ygTextNode.prototype = new ygNode; |
michael@0 | 40 | function ygTextNode(_49, _50, _51) { |
michael@0 | 41 | this.init(_49, _50, _51) |
michael@0 | 42 | } |
michael@0 | 43 | function buildUserTree() { |
michael@0 | 44 | userTree = new ygTreeView("userTree") |
michael@0 | 45 | addMenuNode(userTree, "N", "navheader") |
michael@0 | 46 | } |
michael@0 | 47 | function addMenuNode(tree, label, styleClass) { |
michael@0 | 48 | new ygTextNode({}, tree.root, false) |
michael@0 | 49 | } |
michael@0 | 50 | buildUserTree(); |
michael@0 | 51 | userTree.root.getHtml() |