Closed Bug 59281 Opened 24 years ago Closed 24 years ago

Need null ptr check in nsDocShell::SetupNewViewer

Categories

(Core :: DOM: Navigation, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: jband_mozilla, Assigned: jband_mozilla)

Details

(Keywords: crash)

Attachments

(2 files)

I saw a crash from a call to GetMainWidget in nsDocShell::SetupNewViewer that does not check the resulting pointer for null. This pointer is later passed into code that later crashes. I've only seen this crash once. I can't repeat it. Does anyone actually *own* nsDocShell.cpp? I'll attach a stack and proposed fix (which assumes that early failure after call to GetMainWidget is best).
Attached file stack at crash (deleted) —
sspitzer thought this was adam lock's module
Assignee: asa → adamlock
Component: Browser-General → XP Apps
Keywords: approval, crash, patch, review
QA Contact: doronr → sairuh
over to docshell.
Component: XP Apps → Embedding: Docshell
QA Contact: sairuh → adamlock
I'm the nominal owner of this module :) The patch looks good to me so r=adamlock. Reassigning to jband.
Assignee: adamlock → jband
NS_ERROR("foo") is the somewhat less verbose equivalent to NS_ASSERTION(0, "foo"). You can change it if you want, the basic idea looks fine. sr=waterson
checked into trunk
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: