730441-1.xul 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?xml version="1.0"?>
  2. <!--
  3. Program received signal SIGSEGV, Segmentation fault.
  4. 0xb6457185 in nsIContent::SetAttr (this=0x0, aNameSpaceID=0, aName=0xb0cb064c, aValue=..., aNotify=1) at ../../dist/include/nsIContent.h:285
  5. 285 return SetAttr(aNameSpaceID, aName, nsnull, aValue, aNotify);
  6. (gdb) p this
  7. $6 = (nsIContent * const) 0x0
  8. (gdb) bt 3
  9. #0 0xb6457185 in nsIContent::SetAttr (this=0x0, aNameSpaceID=0, aName=0xb0cb064c, aValue=..., aNotify=1) at ../../dist/include/nsIContent.h:285
  10. #1 0xb6b72072 in nsTreeColumns::RestoreNaturalOrder (this=0xaaf83cc0) at layout/xul/base/src/tree/src/nsTreeColumns.cpp:605
  11. #2 0xb736c76f in NS_InvokeByIndex_P () at xpcom/reflect/xptcall/md/unix/xptcinvoke_gcc_x86_unix.cpp:69
  12. (More stack frames follow...)
  13. (gdb) frame 1
  14. #1 0xb6b72072 in nsTreeColumns::RestoreNaturalOrder (this=0xaaf83cc0) at layout/xul/base/src/tree/src/nsTreeColumns.cpp:605
  15. 605 child->SetAttr(kNameSpaceID_None, nsGkAtoms::ordinal, ordinal, PR_TRUE);
  16. (gdb) list
  17. 600 PRUint32 numChildren = colsContent->GetChildCount();
  18. 601 for (PRUint32 i = 0; i < numChildren; ++i) {
  19. 602 nsIContent *child = colsContent->GetChildAt(i);
  20. 603 nsAutoString ordinal;
  21. 604 ordinal.AppendInt(i);
  22. 605 child->SetAttr(kNameSpaceID_None, nsGkAtoms::ordinal, ordinal, PR_TRUE);
  23. 606 }
  24. (gdb) p child
  25. $7 = (nsIContent *) 0x0
  26. First loop iteration: |child->SetAttr()| dispatches "DOMAttrModified" event.
  27. Event listener removes next column. Second loop iteration: |colsContent->GetChildAt(i)|
  28. returns null. Then we have |null->SetAttr()|.
  29. -->
  30. <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  31. onload="run();">
  32. <tree id="tree">
  33. <treecols>
  34. <treecol id="col1"/>
  35. <treecol id="col2"/>
  36. </treecols>
  37. <treechildren/>
  38. </tree>
  39. <script type="text/javascript"><![CDATA[
  40. function listener() {
  41. var col2 = document.getElementById("col2");
  42. col2.parentNode.removeChild(col2);
  43. }
  44. function run() {
  45. var col1 = document.getElementById("col1");
  46. col1.addEventListener("DOMAttrModified", listener, true);
  47. var tree = document.getElementById("tree");
  48. tree.columns.restoreNaturalOrder();
  49. }
  50. ]]></script>
  51. </window>