Bug 1569682: Fix GetSerialNumber to not destroy the just added serial number record. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D39777

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dave Townsend 2019-07-29 20:52:04 +00:00
parent 3076806612
commit 9d647b266c

View File

@ -489,7 +489,7 @@ static intptr_t GetSerialNumber(void* aPtr, bool aCreate) {
"it.");
}
auto record = entry.OrInsert([]() { return new SerialNumberRecord(); });
auto& record = entry.OrInsert([]() { return new SerialNumberRecord(); });
WalkTheStackSavingLocations(record->allocationStack);
if (gLogJSStacks) {
record->SaveJSStack();