Last Comment Bug 777293 - Remove NS_NewCSSStyleSheet
: Remove NS_NewCSSStyleSheet
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla17
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-25 03:52 PDT by :Ms2ger (⌚ UTC+1/+2)
Modified: 2012-08-04 18:40 PDT (History)
1 user (show)
ryanvm: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (6.82 KB, patch)
2012-07-25 03:52 PDT, :Ms2ger (⌚ UTC+1/+2)
dbaron: review+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2012-07-25 03:52:01 PDT
Created attachment 645698 [details] [diff] [review]
Patch v1
Comment 1 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2012-07-27 15:14:25 PDT
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
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-08-04 01:58:31 PDT
https://hg.mozilla.org/mozilla-central/rev/dc145011431f
Comment 3 Ed Morley [:emorley] 2012-08-04 11:28:24 PDT
Backed out with the mass tree revert to get rid of the OS X M5 orange:
https://hg.mozilla.org/mozilla-central/rev/c801b99d726f
Comment 4 Ryan VanderMeulen [:RyanVM] 2012-08-04 14:50:51 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/4027e2283d98
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-08-04 18:40:30 PDT
https://hg.mozilla.org/mozilla-central/rev/4027e2283d98

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