diff --git a/js/src/jsapi.h b/js/src/jsapi.h index 2a12403a8065..e090d5c3c12f 100644 --- a/js/src/jsapi.h +++ b/js/src/jsapi.h @@ -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) diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index 6c9c090f32a7..d5fffa0cba6b 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -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(); }