Add null check to prevent JS errors in getContentFrameURI() at startup

RESOLVED FIXED

Status

RESOLVED FIXED
16 years ago
14 years ago

People

(Reporter: bugs4hj, Assigned: caillon)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
Several mozdev projects are using a modified version of function
getReferrer(doc) in contentAreaUtils.js This function calls getContentFrameURI()
in the same file but this produces a JavaScript error on the JS console at
startup. This happens at startup only, because |aFocusedWindow| is still null.
The modified function is called from an overlay file of one of the projects.
MultiZilla is one of the projects that suffers from this 'bug'.

callion has a patch to fix this problem so I'll assign this bug to him.
Created attachment 103677 [details] [diff] [review]
Fix

Null window cannot be in the content area.
(Reporter)

Comment 2

16 years ago
Comment on attachment 103677 [details] [diff] [review]
Fix

That patch looks fine to me, and it also works. Thanks for the quick fix.
Attachment #103677 - Flags: review+
Comment on attachment 103677 [details] [diff] [review]
Fix

sr=bryner
Attachment #103677 - Flags: superreview+
(Reporter)

Comment 4

16 years ago
Comment on attachment 103677 [details] [diff] [review]
Fix

r=hj (forgot to add it)
This needs to get checked in.  It's been approved and is on the 1.2 list.
It already did get landed right after it got approved.  Thought I marked this
fixed....
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.