mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 1461556 - Add member initializers to the function pointers in JS::AsmJSCacheOps so that JSRuntime::asmJSCacheOps, a js::UnprotectedData<JS::AsmJSCacheOps>, will have its members nulled out automatically when the JSRuntime field is initialized. r=jandem
--HG-- extra : rebase_source : affbfe4407abb456231e74633a6c0a10044a280f
This commit is contained in:
parent
37589d31cd
commit
890404de4b
@ -5894,11 +5894,11 @@ namespace JS {
|
||||
* CloseAsmJSCacheEntryForReadOp, passing the same base address, size and
|
||||
* handle.
|
||||
*/
|
||||
typedef bool
|
||||
(* OpenAsmJSCacheEntryForReadOp)(HandleObject global, const char16_t* begin, const char16_t* limit,
|
||||
size_t* size, const uint8_t** memory, intptr_t* handle);
|
||||
typedef void
|
||||
(* CloseAsmJSCacheEntryForReadOp)(size_t size, const uint8_t* memory, intptr_t handle);
|
||||
using OpenAsmJSCacheEntryForReadOp =
|
||||
bool (*)(HandleObject global, const char16_t* begin, const char16_t* limit, size_t* size,
|
||||
const uint8_t** memory, intptr_t* handle);
|
||||
using CloseAsmJSCacheEntryForReadOp =
|
||||
void (*)(size_t size, const uint8_t* memory, intptr_t handle);
|
||||
|
||||
/** The list of reasons why an asm.js module may not be stored in the cache. */
|
||||
enum AsmJSCacheResult
|
||||
@ -5926,19 +5926,18 @@ enum AsmJSCacheResult
|
||||
* to CloseAsmJSCacheEntryForWriteOp passing the same base address, size and
|
||||
* handle.
|
||||
*/
|
||||
typedef AsmJSCacheResult
|
||||
(* OpenAsmJSCacheEntryForWriteOp)(HandleObject global, const char16_t* begin,
|
||||
const char16_t* end, size_t size,
|
||||
uint8_t** memory, intptr_t* handle);
|
||||
typedef void
|
||||
(* CloseAsmJSCacheEntryForWriteOp)(size_t size, uint8_t* memory, intptr_t handle);
|
||||
using OpenAsmJSCacheEntryForWriteOp =
|
||||
AsmJSCacheResult (*)(HandleObject global, const char16_t* begin, const char16_t* end,
|
||||
size_t size, uint8_t** memory, intptr_t* handle);
|
||||
using CloseAsmJSCacheEntryForWriteOp =
|
||||
void (*)(size_t size, uint8_t* memory, intptr_t handle);
|
||||
|
||||
struct AsmJSCacheOps
|
||||
{
|
||||
OpenAsmJSCacheEntryForReadOp openEntryForRead;
|
||||
CloseAsmJSCacheEntryForReadOp closeEntryForRead;
|
||||
OpenAsmJSCacheEntryForWriteOp openEntryForWrite;
|
||||
CloseAsmJSCacheEntryForWriteOp closeEntryForWrite;
|
||||
OpenAsmJSCacheEntryForReadOp openEntryForRead = nullptr;
|
||||
CloseAsmJSCacheEntryForReadOp closeEntryForRead = nullptr;
|
||||
OpenAsmJSCacheEntryForWriteOp openEntryForWrite = nullptr;
|
||||
CloseAsmJSCacheEntryForWriteOp closeEntryForWrite = nullptr;
|
||||
};
|
||||
|
||||
extern JS_PUBLIC_API(void)
|
||||
|
@ -180,9 +180,6 @@ JSRuntime::JSRuntime(JSRuntime* parentRuntime)
|
||||
JS_COUNT_CTOR(JSRuntime);
|
||||
liveRuntimesCount++;
|
||||
|
||||
/* Initialize infallibly first, so we can goto bad and JS_DestroyRuntime. */
|
||||
|
||||
PodZero(&asmJSCacheOps);
|
||||
lcovOutput().init();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user