Closed Bug 777293 Opened 8 years ago Closed 8 years ago

Remove NS_NewCSSStyleSheet

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
No description provided.
Attachment #645698 - Flags: review?(dbaron)
Comment on attachment 645698 [details] [diff] [review]
Patch v1

>-nsresult
>-NS_NewCSSStyleSheet(nsCSSStyleSheet** aInstancePtrResult)
>-{
>-  *aInstancePtrResult = nsnull;
>-  nsCSSStyleSheet  *it = new nsCSSStyleSheet();
>-
>-  if (!it) {
>-    return NS_ERROR_OUT_OF_MEMORY;
>-  }
>-
>-  NS_ADDREF(it);
>-
>-  if (!it->mInner || !it->mInner->mPrincipal) {
>-    NS_RELEASE(it);
>-    return NS_ERROR_OUT_OF_MEMORY;
>-  }
>-  
>-  *aInstancePtrResult = it;
>-  return NS_OK;
>-}

Because of the it->mInner->mPrincipal check here, you need to change nsCSSStyleSheetInner::nsCSSStyleSheetInner to NS_RUNTIMEABORT if mPrincipal is null after the do_CreateInstance call.

r=dbaron with that
Attachment #645698 - Flags: review?(dbaron) → review+
Assignee: nobody → Ms2ger
https://hg.mozilla.org/mozilla-central/rev/dc145011431f
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Backed out with the mass tree revert to get rid of the OS X M5 orange:
https://hg.mozilla.org/mozilla-central/rev/c801b99d726f
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://hg.mozilla.org/mozilla-central/rev/4027e2283d98
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.