зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1415644: Follow-up: Fix assertion in debug builds. r=bustage CLOSED TREE
MozReview-Commit-ID: 1AzZ7X31jAs --HG-- extra : amend_source : 2c3908432283fb2124f1fae4d602e02c3d2aae08
This commit is contained in:
Родитель
6646900815
Коммит
c8125c8fa5
|
@ -303,14 +303,14 @@ namespace {
|
|||
{}
|
||||
|
||||
private:
|
||||
mutable Maybe<AtomSet> mAtomSet;
|
||||
mutable RefPtr<AtomSet> mAtomSet;
|
||||
const char* mPref;
|
||||
};
|
||||
|
||||
const AtomSet&
|
||||
AtomSetPref::Get() const
|
||||
{
|
||||
if (mAtomSet.isNothing()) {
|
||||
if (!mAtomSet) {
|
||||
nsAutoCString eltsString;
|
||||
Unused << Preferences::GetCString(mPref, eltsString);
|
||||
|
||||
|
@ -319,17 +319,17 @@ namespace {
|
|||
elts.AppendElement(NS_ConvertUTF8toUTF16(elt));
|
||||
elts.LastElement().StripWhitespace();
|
||||
}
|
||||
mAtomSet.emplace(elts);
|
||||
mAtomSet = new AtomSet(elts);
|
||||
}
|
||||
|
||||
return mAtomSet.ref();
|
||||
return *mAtomSet;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
AtomSetPref::Observe(nsISupports *aSubject, const char *aTopic,
|
||||
const char16_t *aData)
|
||||
{
|
||||
mAtomSet.reset();
|
||||
mAtomSet = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче