Last Comment Bug 634936 - Crash [@ nsFocusManager::Init ]
: Crash [@ nsFocusManager::Init ]
: crash
Product: Core
Classification: Components
Component: General (show other bugs)
: Trunk
: x86 Linux
-- normal (vote)
: mozilla6
Assigned To: Ed Morley [:emorley]
Depends on:
  Show dependency treegraph
Reported: 2011-02-17 09:17 PST by Josh Matthews [:jdm]
Modified: 2011-06-09 14:58 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch v1 (2.39 KB, patch)
2011-04-09 11:08 PDT, Ed Morley [:emorley]
jst: review+
Details | Diff | Splinter Review

Description User image Josh Matthews [:jdm] 2011-02-17 09:17:35 PST
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:
Comment 2 User image Ed Morley [:emorley] 2011-04-09 05:12:35 PDT
Should the nsFocusManager instance return NS_ERROR_FAILURE or just if(prefBranch) ?
Comment 3 User image Josh Matthews [:jdm] 2011-04-09 07:33:59 PDT
I think a straight |if (prefBranch)| will be fine.
Comment 4 User image Ed Morley [:emorley] 2011-04-09 11:08:25 PDT
Created attachment 524869 [details] [diff] [review]
Patch v1


Ideas for who to review?
Comment 5 User image Josh Matthews [:jdm] 2011-04-09 13:30:19 PDT
Comment on attachment 524869 [details] [diff] [review]
Patch v1

I think jst's a good candidate here.
Comment 6 User image Josh Matthews [:jdm] 2011-04-14 14:28:49 PDT
Thanks, Johnny.
Comment 7 User image :Ms2ger (⌚ UTC+1/+2) 2011-04-16 05:44:31 PDT
And thanks, Ed!
Comment 8 User image Ed Morley [:emorley] 2011-04-18 10:20:20 PDT
No worries, thanks for the checkin :-)
Comment 9 User image Ed Morley [:emorley] 2011-05-02 17:09:15 PDT
All instances of:
...null check prefBranch.

-> Verified.

Note You need to log in before you can comment on or make changes to this bug.