Last Comment Bug 783206 - replace NULL with nullptr in intl except to OS API usages
: replace NULL with nullptr in intl except to OS API usages
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Internationalization (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla17
Assigned To: Makoto Kato [:m_kato]
:
: Makoto Kato [:m_kato]
Mentors:
Depends on:
Blocks: 784739
  Show dependency treegraph
 
Reported: 2012-08-16 02:42 PDT by Makoto Kato [:m_kato]
Modified: 2012-08-24 20:03 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (99.61 KB, patch)
2012-08-16 02:43 PDT, Makoto Kato [:m_kato]
smontagu: review+
Details | Diff | Splinter Review

Description Makoto Kato [:m_kato] 2012-08-16 02:42:41 PDT

    
Comment 1 Makoto Kato [:m_kato] 2012-08-16 02:43:34 PDT
Created attachment 652376 [details] [diff] [review]
fix
Comment 2 Simon Montagu :smontagu 2012-08-19 20:21:28 PDT
Comment on attachment 652376 [details] [diff] [review]
fix

Review of attachment 652376 [details] [diff] [review]:
-----------------------------------------------------------------

::: intl/locale/src/mac/nsCollationMacUC.cpp
@@ +12,5 @@
>  
>  nsCollationMacUC::nsCollationMacUC() 
>    : mInit(false)
>    , mHasCollator(false)
>    , mLocale(NULL)

why do this and mCollator(NULL) below not get changed?

::: intl/locale/src/nsLocaleService.cpp
@@ +314,5 @@
>    int countLang = 0;
>    char	acceptLanguageList[NSILOCALE_MAX_ACCEPT_LANGUAGE][NSILOCALE_MAX_ACCEPT_LENGTH];
>    nsresult	result;
>  
> +  nsAutoArrayPtr<char> input(new char[strlen(acceptLanguage)+1]);

This change and the similar one in  nsUnicodeDecodeHelper::CreateFastTable below don't really belong in this patch, but they're small enough that I don't think it matters.
Comment 3 :Ehsan Akhgari 2012-08-22 11:43:53 PDT
Can we land this before somebody works on bug 784739?
Comment 4 Makoto Kato [:m_kato] 2012-08-23 21:17:29 PDT
(In reply to Simon Montagu from comment #2)
> Comment on attachment 652376 [details] [diff] [review]
> fix
> 
> Review of attachment 652376 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: intl/locale/src/mac/nsCollationMacUC.cpp
> @@ +12,5 @@
> >  
> >  nsCollationMacUC::nsCollationMacUC() 
> >    : mInit(false)
> >    , mHasCollator(false)
> >    , mLocale(NULL)
> 
> why do this and mCollator(NULL) below not get changed?

This uses OS API handle (LocaleRef and CollatorRef).
Comment 6 Ryan VanderMeulen [:RyanVM] 2012-08-24 20:03:58 PDT
https://hg.mozilla.org/mozilla-central/rev/ede84a1a43cf

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