Open Bug 580613 Opened 13 years ago Updated 6 months ago

Exception in nsContextMenu.js - anode is null (line 361)

Categories

(Firefox :: General, defect)

3.6 Branch
x86
Windows XP
defect

Tracking

()

UNCONFIRMED

People

(Reporter: skmail, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7

the setTarget function does not check if anode exists but

    if (aNode.namespaceURI == xulNS ||
        this.isTargetAFormControl(aNode)) {
      this.shouldDisplay = false;
    }

For me anode is null once per browser start

I suggest to change to:

    if (!aNode || aNode.namespaceURI == xulNS ||
        this.isTargetAFormControl(aNode)) {
      this.shouldDisplay = false;
    }

Reproducible: Always

Steps to Reproduce:
I think not easy to reproduce because it happens with an large addon environment.

I think since there obviously are cases where anode really is null, it should be fixed anyways.
Actual Results:  
Exception loggedto console (anode is null)

Expected Results:  
No exception polluting the otherwise clean logfile
Version: unspecified → 3.6 Branch
Reporter -> Are you still experiencing this issue? Have you tried safe mode or a new profile?
Reporter -> Any update? Is this still an issue?
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.