mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1474701: Fix shutdown profile-save (fix imbalance) and add JSONWriter assertions r=mstange,njn
This commit is contained in:
parent
d60c68ce16
commit
85a1661cdc
@ -93,6 +93,7 @@
|
||||
#define mozilla_JSONWriter_h
|
||||
|
||||
#include "double-conversion/double-conversion.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
#include "mozilla/Sprintf.h"
|
||||
@ -326,6 +327,7 @@ protected:
|
||||
// Adds the whitespace and closing char necessary to end a collection.
|
||||
void EndCollection(const char* aEndChar)
|
||||
{
|
||||
MOZ_ASSERT(mDepth > 0);
|
||||
if (mNeedNewlines[mDepth]) {
|
||||
mWriter->Write("\n");
|
||||
mDepth--;
|
||||
|
@ -1779,8 +1779,8 @@ StreamMetaJSCustomObject(PSLockRef aLock, SpliceableJSONWriter& aWriter,
|
||||
}
|
||||
aWriter.EndArray();
|
||||
}
|
||||
aWriter.EndObject();
|
||||
}
|
||||
aWriter.EndObject();
|
||||
}
|
||||
|
||||
#if defined(GP_OS_android)
|
||||
|
Loading…
Reference in New Issue
Block a user