Closed Bug 456333 Opened 16 years ago Closed 16 years ago

Exception: (NS_ERROR_INVALID_POINTER) in sorttable.js when no results were found [@ nsIDOMHTMLTableSectionElement.appendChild]

Categories

(Bugzilla :: Query/Bug List, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 438004

People

(Reporter: whimboo, Unassigned)

References

()

Details

When you start an advanced search on Bugzilla and search for terms were no results can be found, the following exception is thrown:

Error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMHTMLTableSectionElement.appendChild]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"  location: "JS frame :: https://bugzilla.mozilla.org/js/sorttable.js :: anonymous :: line 50"  data: no]
Source File: https://bugzilla.mozilla.org/js/sorttable.js
Line: 50

Source:

/* 
   * Prepares the table so that it can be sorted
   *
   */
  makeSortable: function(table) {
    if (table.getElementsByTagName('thead').length == 0) {
      // table doesn't have a tHead. Since it should have, create one and
      // put the first table row in it.
      the = document.createElement('thead');
 =>   the.appendChild(table.rows[0]);
      table.insertBefore(the,table.firstChild);
    }


Steps to reproduce:
1. Enable JS stricts warnings and show in console
2. Open following URL: http://tinyurl.com/4s5vjq

Probably a regression against 3.0 branch?
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.