Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | <!-- |
michael@0 | 3 | Program received signal SIGSEGV, Segmentation fault. |
michael@0 | 4 | 0xb6b720a6 in nsTreeColumns::RestoreNaturalOrder (this=0xa947a580) at layout/xul/base/src/tree/src/nsTreeColumns.cpp:610 |
michael@0 | 5 | 610 mTree->Invalidate(); |
michael@0 | 6 | (gdb) bt 3 |
michael@0 | 7 | #0 0xb6b720a6 in nsTreeColumns::RestoreNaturalOrder (this=0xa947a580) at layout/xul/base/src/tree/src/nsTreeColumns.cpp:610 |
michael@0 | 8 | #1 0xb736c76f in NS_InvokeByIndex_P () at xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp:69 |
michael@0 | 9 | #2 0xb6171901 in XPCWrappedNative::CallMethod (ccx=..., mode=XPCWrappedNative::CALL_METHOD) |
michael@0 | 10 | at js/src/xpconnect/src/xpcwrappednative.cpp:2722 |
michael@0 | 11 | (More stack frames follow...) |
michael@0 | 12 | (gdb) list |
michael@0 | 13 | 605 child->SetAttr(kNameSpaceID_None, nsGkAtoms::ordinal, ordinal, PR_TRUE); |
michael@0 | 14 | 606 } |
michael@0 | 15 | 607 |
michael@0 | 16 | 608 nsTreeColumns::InvalidateColumns(); |
michael@0 | 17 | 609 |
michael@0 | 18 | 610 mTree->Invalidate(); |
michael@0 | 19 | 611 |
michael@0 | 20 | 612 return NS_OK; |
michael@0 | 21 | 613 } |
michael@0 | 22 | 614 |
michael@0 | 23 | (gdb) p mTree |
michael@0 | 24 | $9 = (nsITreeBoxObject *) 0x0 |
michael@0 | 25 | |
michael@0 | 26 | |child->SetAttr()| dispatches "DOMAttrModified" event. Event listener removes |
michael@0 | 27 | whole tree, |mTree| is being set to null. Then we have |null->Invalidate()|. |
michael@0 | 28 | --> |
michael@0 | 29 | <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
michael@0 | 30 | onload="run();"> |
michael@0 | 31 | <tree id="tree"> |
michael@0 | 32 | <treecols> |
michael@0 | 33 | <treecol id="col"/> |
michael@0 | 34 | </treecols> |
michael@0 | 35 | <treechildren/> |
michael@0 | 36 | </tree> |
michael@0 | 37 | <script type="text/javascript"><![CDATA[ |
michael@0 | 38 | var tree = null; |
michael@0 | 39 | |
michael@0 | 40 | function listener() { |
michael@0 | 41 | tree.parentNode.removeChild(tree); |
michael@0 | 42 | } |
michael@0 | 43 | |
michael@0 | 44 | function run() { |
michael@0 | 45 | col = document.getElementById("col"); |
michael@0 | 46 | col.addEventListener("DOMAttrModified", listener, true); |
michael@0 | 47 | tree = document.getElementById("tree"); |
michael@0 | 48 | tree.columns.restoreNaturalOrder(); |
michael@0 | 49 | } |
michael@0 | 50 | ]]></script> |
michael@0 | 51 | </window> |
michael@0 | 52 |