Closed Bug 1135181 Opened 6 years ago Closed 6 years ago
CSSRule Processor::Startup() infallible
nsCSSRuleProcessor::Startup has a return-type of nsresult (and its caller, nsLayoutStatics::Initialize, has code to handle failure). But it always returns NS_OK. So it should just return void, and we should drop the failure-handling code.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86_64 → All
Historical notes: * It looks like this ::Startup method used to return void, but it was made fallible (w/ return type nsresult) here: http://hg.mozilla.org/mozilla-central/rev/d03d64716ccd#l2.106 to allow for the "NS_ENSURE_TRUE(gPrivateBrowsingObserver, NS_ERROR_OUT_OF_MEMORY);" line there. This NS_ENSURE_TRUE line and the nsresult return-type were briefly removed in http://hg.mozilla.org/mozilla-central/rev/9786ae3984b3#l2.105 , but that cset was backed out in http://hg.mozilla.org/mozilla-central/rev/81086dc562b0 . Later on, the NS_ENSURE_TRUE line was removed again, in http://hg.mozilla.org/mozilla-central/rev/cf941140cded#l1.98 , and that stuck -- but we didn't update the function-signature to make it return void this time.
Attachment #8567247 - Flags: review?(cam) → review+
You need to log in before you can comment on or make changes to this bug.