The default bug view has changed. See this FAQ.

Crash [@ nsFocusManager::Init ]

VERIFIED FIXED in mozilla6

Status

()

Core
General
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: jdm, Assigned: emorley)

Tracking

({crash})

Trunk
mozilla6
x86
Linux
crash
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(crash signature)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
There are consumers of nsContentUtils::GetPrefBranch which don't null-check the result.  This is bad, as nsContentUtils::Init explicitly states that a null pref service is allowed.  484de288-23dc-4490-ad28-8eff22110217 is an example of a crash because of this.

Consumers requiring fixing:
http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsImageFrame.cpp#1904
http://mxr.mozilla.org/mozilla-central/source/dom/base/nsFocusManager.cpp#197
(Reporter)

Comment 1

6 years ago
https://crash-stats.mozilla.com/report/index/484de288-23dc-4490-ad28-8eff22110217
(Reporter)

Updated

6 years ago
Whiteboard: [good first bug]
Should the nsFocusManager instance return NS_ERROR_FAILURE or just if(prefBranch) ?
(Reporter)

Comment 3

6 years ago
I think a straight |if (prefBranch)| will be fine.
Created attachment 524869 [details] [diff] [review]
Patch v1

Thanks.

Ideas for who to review?
Assignee: nobody → bmo
Status: NEW → ASSIGNED
(Reporter)

Comment 5

6 years ago
Comment on attachment 524869 [details] [diff] [review]
Patch v1

I think jst's a good candidate here.
Attachment #524869 - Flags: review?(jst)
Version: unspecified → Trunk

Updated

6 years ago
Attachment #524869 - Flags: review?(jst) → review+
(Reporter)

Comment 6

6 years ago
Thanks, Johnny.
Keywords: checkin-needed
And thanks, Ed!

http://hg.mozilla.org/mozilla-central/rev/1c62fb90d4dd
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla6
No worries, thanks for the checkin :-)
Whiteboard: [good first bug]
All instances of:
http://mxr.mozilla.org/mozilla-central/search?string=nsContentUtils::GetPrefBranch%28%29
...null check prefBranch.

-> Verified.
Status: RESOLVED → VERIFIED
Crash Signature: [@ nsFocusManager::Init ]
You need to log in before you can comment on or make changes to this bug.