javascript error in nsContextMenu.js



18 years ago
14 years ago


(Reporter: bugzilla, Assigned: paulkchen)


Windows 2000

Firefox Tracking Flags

(Not tracked)




18 years ago
My console says:

missing ) after condition
Source File: chrome://communicator/content/nsContextMenu.js
Line: 266, Column: 43
Source Code:
       _content.HTTPIndex instanceof Components.interfaces.nsIHTTPIndex ) {

build 20010402 on win2k
bizarre: this isn't something i can reproduce, and it doesn't follow from JS's
well-known grammar.  What's really going on?  Henrik, can you reproduce this in
a reduced testcase in your build?


Comment 2

18 years ago
timeless/jag/blake (can't remember who) saw this a couple of months ago, and
blamed me because I was the last one to change that line. IIRC, it wasn't
reproducable for anyone else, and closing/reopening mozilla fixed it. I'll see
if I can dig out my IRC logs when I get home, but I think we ended up ignoring
It sounds like the JS version is being set to something other than default or a
non-default value >= 1.4 (instanceof was added as a meaningful reserved word in
1.4).  We need to make this reproducible, then debug it.

Henrik, do you by any chance load content (chrome or not) that contains script
tags with explicit LANGUAGE=JavaScript1.2 or similar attributes or MIME type
version parameters?

sairuh, not sure why you're QA contact, but if you can play around with such
content, see whether there's any correlation?


Comment 4

18 years ago
I've seen this twice now on with builds 20010417xx and
20010418xx.  I'll try to narrow down some exact way to reproduce it, but what
roughly, what I was doing was, I selected some text on the page and
right-clicked that selection.  However, after the first time this enormous menu
pops up, it doesn't happen again.

In the JS console, I see the following:

Error: uncaught exception: [Exception... "<no message>"  code: "-2142568438"
nsresult: "0x804b000a (<unknown>)"  location:
"chrome://communicator/content/nsContextMenu.js Line: 358"]

Error: contextMenu has no properties
Source File: chrome://cookie/content/cookieContextOverlay.xul
Line: 94

Error: contextMenu has no properties

Comment 5

18 years ago
Further testing shows that it doesn't happen on just any page; I think it only
happens on a page that invokes Javascript.  Also, if you've already invoked the
context menu at all during the current instance of Mozilla, the bug won't appear
(I think).  So the way to reproduce is to close down all instances of Mozilla,
then start it up again.  Go straight away to a problem page, and simply
right-click on the page (such as  I didn't have to select
any text to get it to happen.

Comment 6

18 years ago I think that that is bug 74019, which I think have a fix

Comment 7

18 years ago
I actually thought it was bug 76587, but that one points to here, which is why I
put my comments here.  Also, when I saw the problem, it didn't seem to have
anything to do with links (that I could tell).

Comment 8

18 years ago I can't reproduce that, but it should be fixed by the patch
I'm about to attach to bug 74019. If you can, please mention how in that bug.
from bug 76587, i get the following console output when the big context menu
appears in the ftp view:

JavaScript error:
chrome://communicator/content/nsContextMenu.js line 277: root.getAttribute is
not a function

JavaScript error:
chrome://cookie/content/cookieContextOverlay.xul line 94: contextMenu has no

JavaScript error:
line 0: contextMenu has no properties

JavaScript error:
chrome://communicator/content/directory/directory.js line 228:
tree.database.RemoveDatasource is not a function

Comment 10

18 years ago
*** Bug 74538 has been marked as a duplicate of this bug. ***
This is probably a dupe, but mark it as a dependancy.
Depends on: 96562
I say this is fixed, because it was a dup of 96562, as bbaetz asserts.  Who is
with me?  If there's nothing else here worth keeping open, pchen should close
this report (mark it a dup, finally).  If there is something else, I can't help
much -- I did my part!  Sorry I didn't diagnose that bug sooner.

/me shrugs

It was never reliably reproducable, anyway, and I haven't seen it for ages. So
it should probably be duped, unless someone can repro it.

Comment 14

17 years ago
I am certainly not one to disappoint brendan if I can avoid it. ;-) Dup it is!

*** This bug has been marked as a duplicate of 96562 ***
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
mass verification of duplicate bugs: to find all bugspam pertaining to this, set
your search string to "DuplicateBugsBelongInZahadum".

if you think this particular bug is *not* a duplicate, please provide a
compelling reason, as well as check a recent *trunk* build (on the appropriate
platform[s]), before reopening.
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.