Bug 1134923 - Remove NS_Alloc/NS_Realloc/NS_Free. r=nfroyd

They are kept around for the sake of the standalone glue, which is used
for e.g. webapprt, which doesn't have direct access to jemalloc, and thus
still needs a wrapper to go through the xpcom function list and get to
jemalloc from there.
This commit is contained in:
Mike Hommey
2015-04-01 14:29:55 +09:00
parent 2525cf8a39
commit 4d93988786
104 changed files with 226 additions and 241 deletions

View File

@@ -2054,7 +2054,7 @@ WebSocketChannel::PrimeNewOutgoingMessage()
return;
}
mask = * reinterpret_cast<uint32_t *>(buffer);
NS_Free(buffer);
free(buffer);
} while (!mask);
NetworkEndian::writeUint32(payload - sizeof(uint32_t), mask);
@@ -2492,7 +2492,7 @@ WebSocketChannel::SetupRequest()
rv = mRandomGenerator->GenerateRandomBytes(16, &secKey);
NS_ENSURE_SUCCESS(rv, rv);
char* b64 = PL_Base64Encode((const char *)secKey, 16, nullptr);
NS_Free(secKey);
free(secKey);
if (!b64)
return NS_ERROR_OUT_OF_MEMORY;
secKeyString.Assign(b64);