Bug 1279633 - Define AsmJSCache_MIN in terms of AsmJSCacheSuccess, instead of the other way around; r=till
authorNick Fitzgerald <fitzgen@gmail.com>
Sun, 12 Jun 2016 08:04:48 -0700
changeset 301664 d1722ce2542a2dcc6d351da7481640aceb44f894
parent 301663 4073f541e59556b7f9a8e0d7078165dd74050863
child 301665 c7ddd550008cd59ccb7629247d9296b95cdb9925
push id78398
push usernfitzgerald@mozilla.com
push dateSun, 12 Jun 2016 15:05:14 +0000
treeherdermozilla-inbound@d1722ce2542a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstill
bugs1279633
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1279633 - Define AsmJSCache_MIN in terms of AsmJSCacheSuccess, instead of the other way around; r=till rust-bindgen will make an enum variant for the first definition it encounters, and then define duplicates as constants outside of the enum definition. This has the unfortunate effect of making AsmJSCache_MIN an enum variant and AsmJSCache_Success the constant definition outside of the enum in the case of the AsmJSCacheResult enumeration. This commit rectifies that. This upstreams the following commit from servo/mozjs: 50f47cf Bind AsmJSCache_Success rather than AsmJSCache_MIN
js/src/jsapi.h
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -5705,18 +5705,18 @@ 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);
 
 /** The list of reasons why an asm.js module may not be stored in the cache. */
 enum AsmJSCacheResult
 {
-    AsmJSCache_MIN,
-    AsmJSCache_Success = AsmJSCache_MIN,
+    AsmJSCache_Success,
+    AsmJSCache_MIN = AsmJSCache_Success,
     AsmJSCache_ModuleTooSmall,
     AsmJSCache_SynchronousScript,
     AsmJSCache_QuotaExceeded,
     AsmJSCache_StorageInitFailure,
     AsmJSCache_Disabled_Internal,
     AsmJSCache_Disabled_ShellFlags,
     AsmJSCache_Disabled_JitInspector,
     AsmJSCache_InternalError,