Closed Bug 53836 Opened 24 years ago Closed 24 years ago

JS errors on page loading: reference to undefined property window._content.HTTPIndex

Categories

(SeaMonkey :: General, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 55798

People

(Reporter: rubydoo123, Assigned: nhottanscp)

References

Details

Loading web pages (e.g. http://news.bbc.co.uk), I see lots of these errors:

JavaScript strict warning:
chrome://navigator/content/navigator.js line 1970: reference to undefined proper
ty window._content.HTTPIndex
I think ben can handle this better. I let you decide.
Assignee: radha → don
Yep.  More correctness fun for Ben.

Ben, do we really need to fix this stuff before RTM?
Assignee: don → ben
The culprit here is the checkForDirectoryListing() function, which nhotta added. 
CCing him.
There is another bug filed for this. The bug 53470 which was resolved as a dup 
of 51211.
This is really really annoying since it totally floods the console with errors!
OS: Windows NT → All
Reassign to nhotta. nhotta: i looked at the other bugs, and none of them 
addressed the JS error specifically, so this should stay open for that.

I'm also worried about the amount of times we're calling a JS function that is 
only there to detect directory listings. Can't this be optimized?
Assignee: ben → nhotta
The amount of times this to be called to be fixed by bug 51211. I applied the 
patch of 51211 then I only saw one warning per page load.
And here is a patch for the warning.

Index: browser/resources/content/navigator.js
===================================================================
RCS file: /cvsroot/mozilla/xpfe/browser/resources/content/navigator.js,v
retrieving revision 1.233
diff -c -r1.233 navigator.js
*** navigator.js	2000/09/20 12:23:49	1.233
--- navigator.js	2000/09/27 20:39:04
***************
*** 1967,1973 ****
  }
  
  function checkForDirectoryListing() {
!     if ( window._content.HTTPIndex == "[xpconnect wrapped nsIHTTPIndex]"
           &&
           typeof window._content.HTTPIndex == "object"
           &&
--- 1967,1974 ----
  }
  
  function checkForDirectoryListing() {
!     if ( "HTTPIndex" in window._content && 
!          window._content.HTTPIndex == "[xpconnect wrapped nsIHTTPIndex]"
           &&
           typeof window._content.HTTPIndex == "object"
           &&
Status: NEW → ASSIGNED
adding "approval" keyword, bug has a potential patch.
Keywords: approval
*** Bug 55381 has been marked as a duplicate of this bug. ***
r=sfraser on the patch.
*** Bug 55381 has been marked as a duplicate of this bug. ***
Ftang - Doesn't this need to be marked as [RTM Need Info]?

Adding FTang to cc: list.
Target Milestone: --- → M22
nominating for mozilla0.9, if you think this should go into rtm, please nominate.
Keywords: mozilla0.9, patch

*** This bug has been marked as a duplicate of 55798 ***
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.