Merge mozilla-inbound to mozilla-central. a=merge
authorDaniel Varga <dvarga@mozilla.com>
Tue, 30 Oct 2018 11:40:57 +0200
changeset 443469 c3f01d72374b19dab985700e9b839bb7fa956e77
parent 443468 a7332ea46f0f0058d16b558b2753f2b7ee36c2e1 (current diff)
parent 443444 6babd3b956aa5dbbf3d93208c48efc593cec0ce6 (diff)
child 443470 02072f94342e8a1557a585da54cfd9c1241b4c00
child 443533 ba133f47e42b637ac94184f56a35bc717defac6b
child 443599 fd2afb2034d1fed4d5f64d25ccf5f8b7b9194ebc
push id109380
push userdvarga@mozilla.com
push dateTue, 30 Oct 2018 09:49:11 +0000
treeherdermozilla-inbound@c3f01d72374b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone65.0a1
first release with
nightly linux32
c3f01d72374b / 65.0a1 / 20181030100414 / files
nightly linux64
c3f01d72374b / 65.0a1 / 20181030100414 / files
nightly mac
c3f01d72374b / 65.0a1 / 20181030100414 / files
nightly win32
c3f01d72374b / 65.0a1 / 20181030100414 / files
nightly win64
c3f01d72374b / 65.0a1 / 20181030100414 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-inbound to mozilla-central. a=merge
dom/locales/en-US/chrome/dom/dom.properties
testing/web-platform/meta/FileAPI/reading-data-section/filereader_abort.html.ini
--- a/dom/base/nsDeprecatedOperationList.h
+++ b/dom/base/nsDeprecatedOperationList.h
@@ -8,40 +8,35 @@
 /*
  * This file contains the list of deprecated DOM operations.  It is
  * designed to be used as input to the C preprocessor *only*.
  */
 
 DEPRECATED_OPERATION(EnablePrivilege)
 DEPRECATED_OPERATION(MutationEvent)
 DEPRECATED_OPERATION(Components)
-DEPRECATED_OPERATION(PrefixedVisibilityAPI)
 DEPRECATED_OPERATION(NodeIteratorDetach)
 DEPRECATED_OPERATION(LenientThis)
 DEPRECATED_OPERATION(MozGetAsFile)
 DEPRECATED_OPERATION(UseOfCaptureEvents)
 DEPRECATED_OPERATION(UseOfReleaseEvents)
 DEPRECATED_OPERATION(UseOfDOM3LoadMethod)
 DEPRECATED_OPERATION(ChromeUseOfDOM3LoadMethod)
 DEPRECATED_OPERATION(ShowModalDialog)
 DEPRECATED_OPERATION(SyncXMLHttpRequest)
 DEPRECATED_OPERATION(Window_Cc_ontrollers)
 DEPRECATED_OPERATION(ImportXULIntoContent)
-DEPRECATED_OPERATION(PannerNodeDoppler)
 DEPRECATED_OPERATION(NavigatorGetUserMedia)
 DEPRECATED_OPERATION(WebrtcDeprecatedPrefix)
 DEPRECATED_OPERATION(RTCPeerConnectionGetStreams)
 DEPRECATED_OPERATION(AppCache)
 DEPRECATED_OPERATION(AppCacheInsecure)
 DEPRECATED_OPERATION(PrefixedImageSmoothingEnabled)
-DEPRECATED_OPERATION(PrefixedFullscreenAPI)
 DEPRECATED_OPERATION(LenientSetter)
-DEPRECATED_OPERATION(FileLastModifiedDate)
 DEPRECATED_OPERATION(ImageBitmapRenderingContext_TransferImageBitmap)
-DEPRECATED_OPERATION(URLCreateObjectURL_MediaStream)
 DEPRECATED_OPERATION(XMLBaseAttribute)
 DEPRECATED_OPERATION(WindowContentUntrusted)
 DEPRECATED_OPERATION(RegisterProtocolHandlerInsecure)
 DEPRECATED_OPERATION(MixedDisplayObjectSubrequest)
 DEPRECATED_OPERATION(MotionEvent)
 DEPRECATED_OPERATION(OrientationEvent)
 DEPRECATED_OPERATION(ProximityEvent)
 DEPRECATED_OPERATION(AmbientLightEvent)
--- a/dom/file/FileReader.cpp
+++ b/dom/file/FileReader.cpp
@@ -83,16 +83,43 @@ public:
   {}
 
   ~FileReaderDecreaseBusyCounter()
   {
     mFileReader->DecreaseBusyCounter();
   }
 };
 
+class FileReader::AsyncWaitRunnable final : public CancelableRunnable
+{
+public:
+  explicit AsyncWaitRunnable(FileReader* aReader)
+    : CancelableRunnable("FileReader::AsyncWaitRunnable")
+    , mReader(aReader)
+  {}
+
+  NS_IMETHOD
+  Run() override
+  {
+    if (mReader) {
+      mReader->InitialAsyncWait();
+    }
+    return NS_OK;
+  }
+
+  void
+  Abort()
+  {
+    mReader = nullptr;
+  }
+
+public:
+  RefPtr<FileReader> mReader;
+};
+
 void
 FileReader::RootResultArrayBuffer()
 {
   mozilla::HoldJSObjects(this);
 }
 
 //FileReader constructors/initializers
 
@@ -441,24 +468,39 @@ FileReader::ReadFileContent(Blob& aBlob,
 
     if (!mFileData) {
       NS_WARNING("Preallocation failed for ReadFileData");
       aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
       return;
     }
   }
 
-  aRv = DoAsyncWait();
+  mAsyncWaitRunnable = new AsyncWaitRunnable(this);
+  aRv = NS_DispatchToCurrentThread(mAsyncWaitRunnable);
   if (NS_WARN_IF(aRv.Failed())) {
     FreeFileData();
     return;
   }
 
   //FileReader should be in loading state here
   mReadyState = LOADING;
+}
+
+void
+FileReader::InitialAsyncWait()
+{
+  mAsyncWaitRunnable = nullptr;
+
+  nsresult rv = DoAsyncWait();
+  if (NS_WARN_IF(NS_FAILED(rv))) {
+    mReadyState = EMPTY;
+    FreeFileData();
+    return;
+  }
+
   DispatchProgressEvent(NS_LITERAL_STRING(LOADSTART_STR));
 }
 
 nsresult
 FileReader::GetAsText(Blob *aBlob,
                       const nsACString &aCharset,
                       const char *aFileData,
                       uint32_t aDataLen,
@@ -769,26 +811,43 @@ FileReader::Abort()
   if (mReadyState == EMPTY || mReadyState == DONE) {
     return;
   }
 
   MOZ_ASSERT(mReadyState == LOADING);
 
   ClearProgressEventTimer();
 
+  if (mAsyncWaitRunnable) {
+    mAsyncWaitRunnable->Abort();
+    mAsyncWaitRunnable = nullptr;
+  }
+
   mReadyState = DONE;
 
   // XXX The spec doesn't say this
   mError = DOMException::Create(NS_ERROR_DOM_ABORT_ERR);
 
   // Revert status and result attributes
   SetDOMStringToNull(mResult);
   mResultArrayBuffer = nullptr;
 
-  mAsyncStream = nullptr;
+  if (mAsyncStream) {
+    if (mBusyCount) {
+      // This will abort any pending reading. See nsIAsyncInputStream.idl.
+      mAsyncStream->AsyncWait(/* callback */ nullptr,
+                              /* aFlags*/ 0,
+                              /* aRequestedCount */ 0,
+                              mTarget);
+      DecreaseBusyCounter();
+      MOZ_ASSERT(mBusyCount == 0);
+    }
+    mAsyncStream = nullptr;
+  }
+
   mBlob = nullptr;
 
   //Clean up memory buffer
   FreeFileData();
 
   // Dispatch the events
   DispatchProgressEvent(NS_LITERAL_STRING(ABORT_STR));
   DispatchProgressEvent(NS_LITERAL_STRING(LOADEND_STR));
@@ -826,16 +885,21 @@ FileReader::DecreaseBusyCounter()
   }
 }
 
 void
 FileReader::Shutdown()
 {
   mReadyState = DONE;
 
+  if (mAsyncWaitRunnable) {
+    mAsyncWaitRunnable->Abort();
+    mAsyncWaitRunnable = nullptr;
+  }
+
   if (mAsyncStream) {
     mAsyncStream->Close();
     mAsyncStream = nullptr;
   }
 
   FreeFileData();
   mResultArrayBuffer = nullptr;
 
--- a/dom/file/FileReader.h
+++ b/dom/file/FileReader.h
@@ -123,16 +123,18 @@ public:
     FILE_AS_BINARY,
     FILE_AS_TEXT,
     FILE_AS_DATAURL
   };
 
   eDataFormat DataFormat() const { return mDataFormat; }
   const nsString& Result() const { return mResult; }
 
+  void InitialAsyncWait();
+
 private:
   virtual ~FileReader();
 
   // This must be in sync with dom/webidl/FileReader.webidl
   enum eReadyState {
     EMPTY = 0,
     LOADING = 1,
     DONE = 2
@@ -202,16 +204,20 @@ private:
   // This is set if FileReader is created on workers, but it is null if the
   // worker is shutting down. The null value is checked in ReadFileContent()
   // before starting any reading.
   RefPtr<WeakWorkerRef> mWeakWorkerRef;
 
   // This value is set when the reading starts in order to keep the worker alive
   // during the process.
   RefPtr<StrongWorkerRef> mStrongWorkerRef;
+
+  // Runnable to start the reading asynchronous.
+  class AsyncWaitRunnable;
+  RefPtr<AsyncWaitRunnable> mAsyncWaitRunnable;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(FileReader, FILEREADER_ID)
 
 } // dom namespace
 } // mozilla namespace
 
 #endif // mozilla_dom_FileReader_h
--- a/dom/file/tests/common_fileReader.js
+++ b/dom/file/tests/common_fileReader.js
@@ -252,17 +252,17 @@ function test_readAsText(blob, text) {
 
     r.addEventListener("load", () => { onloadHasRun = true });
     r.addEventListener("loadstart", () => { onloadStartHasRun = true });
 
     r.readAsText(blob);
 
     is(r.readyState, FileReader.LOADING, "correct loading text readyState");
     is(onloadHasRun, false, "text loading must be async");
-    is(onloadStartHasRun, true, "text loadstart should fire sync");
+    is(onloadStartHasRun, false, "text loadstart should fire async");
   });
 }
 
 function test_readAsBinaryString(blob, text) {
   return new Promise(resolve => {
     let onloadHasRun = false;
     let onloadStartHasRun = false;
 
@@ -275,17 +275,17 @@ function test_readAsBinaryString(blob, t
     r.readAsBinaryString(blob);
 
     r.onload = event => {
       loadEventHandler_string(event, resolve, r, text, text.length, "readAsBinaryString");
     }
 
     is(r.readyState, FileReader.LOADING, "correct loading binary readyState");
     is(onloadHasRun, false, "binary loading must be async");
-    is(onloadStartHasRun, true, "binary loadstart should fire sync");
+    is(onloadStartHasRun, false, "binary loadstart should fire async");
   });
 }
 
 function test_readAsArrayBuffer(blob, text) {
   return new Promise(resolve => {
     let onloadHasRun = false;
     let onloadStartHasRun = false;
 
@@ -298,17 +298,17 @@ function test_readAsArrayBuffer(blob, te
     r.readAsArrayBuffer(blob);
 
     r.onload = event => {
       loadEventHandler_arrayBuffer(event, resolve, r, text, "readAsArrayBuffer");
     }
 
     is(r.readyState, FileReader.LOADING, "correct loading arrayBuffer readyState");
     is(onloadHasRun, false, "arrayBuffer loading must be async");
-    is(onloadStartHasRun, true, "arrayBuffer loadstart should fire sync");
+    is(onloadStartHasRun, false, "arrayBuffer loadstart should fire sync");
   });
 }
 
 // Test a variety of encodings, and make sure they work properly
 function test_readAsTextWithEncoding(blob, text, length, charset) {
   return new Promise(resolve => {
     let r = new FileReader();
     r.onload = event => {
--- a/dom/locales/en-US/chrome/dom/dom.properties
+++ b/dom/locales/en-US/chrome/dom/dom.properties
@@ -151,17 +151,16 @@ MediaEMENoCodecsDeprecatedWarning=Calling navigator.requestMediaKeySystemAccess() (at %S) passing a candidate MediaKeySystemConfiguration containing audioCapabilities or videoCapabilities without a contentType with a “codecs” string is deprecated and will soon become unsupported.
 MutationEventWarning=Use of Mutation Events is deprecated. Use MutationObserver instead.
 BlockAutoplayError=Autoplay is only allowed when approved by the user, the site is activated by the user, or media is muted.
 # LOCALIZATION NOTE: Do not translate "Components"
 ComponentsWarning=The Components object is deprecated. It will soon be removed.
 PluginHangUITitle=Warning: Unresponsive plugin
 PluginHangUIMessage=%S may be busy, or it may have stopped responding. You can stop the plugin now, or you can continue to see if the plugin will complete.
 PluginHangUIWaitButton=Continue
 PluginHangUIStopButton=Stop plugin
-PrefixedFullscreenAPIWarning=Prefixed Fullscreen API is deprecated. Please use unprefixed API for fullscreen. For more help https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API
 # LOCALIZATION NOTE: Do not translate "NodeIterator" or "detach()".
 NodeIteratorDetachWarning=Calling detach() on a NodeIterator no longer has an effect.
 # LOCALIZATION NOTE: Do not translate "LenientThis" and "this"
 LenientThisWarning=Ignoring get or set of property that has [LenientThis] because the “this” object is incorrect.
 # LOCALIZATION NOTE: Do not translate "mozGetAsFile" or "toBlob"
 MozGetAsFileWarning=The non-standard mozGetAsFile method is deprecated and will soon be removed.  Use the standard toBlob method instead.
 # LOCALIZATION NOTE: Do not translate "captureEvents()" or "addEventListener()"
 UseOfCaptureEventsWarning=Use of captureEvents() is deprecated. To upgrade your code, use the DOM 2 addEventListener() method. For more help http://developer.mozilla.org/en/docs/DOM:element.addEventListener
@@ -179,18 +178,16 @@ Window_Cc_ontrollersWarning=window.contr
 ImportXULIntoContentWarning=Importing XUL nodes into a content document is deprecated. This functionality may be removed soon.
 XMLDocumentLoadPrincipalMismatch=Use of document.load forbidden on Documents that come from other Windows. Only the Window in which a Document was created is allowed to call .load on that Document. Preferably, use XMLHttpRequest instead.
 # LOCALIZATION NOTE: Do not translate "IndexedDB".
 IndexedDBTransactionAbortNavigation=An IndexedDB transaction that was not yet complete has been aborted due to page navigation.
 # LOCALIZATION NOTE: Do not translate Will-change, %1$S,%2$S are numbers.
 IgnoringWillChangeOverBudgetWarning=Will-change memory consumption is too high. Budget limit is the document surface area multiplied by %1$S (%2$S px). Occurrences of will-change over the budget will be ignored.
 # LOCALIZATION NOTE: Do not translate "Worker".
 HittingMaxWorkersPerDomain2=A Worker could not be started immediately because other documents in the same origin are already using the maximum number of workers. The Worker is now queued and will be started after some of the other workers have completed.
-# LOCALIZATION NOTE: Do not translate "setVelocity", "PannerNode", "AudioListener", "speedOfSound" and "dopplerFactor"
-PannerNodeDopplerWarning=Use of setVelocity on the PannerNode and AudioListener, and speedOfSound and dopplerFactor on the AudioListener are deprecated and those members will be removed. For more help https://developer.mozilla.org/en-US/docs/Web/API/AudioListener#Deprecated_features
 # LOCALIZATION NOTE: Do not translate "Application Cache API", "AppCache" and "ServiceWorker".
 AppCacheWarning=The Application Cache API (AppCache) is deprecated and will be removed at a future date.  Please consider using ServiceWorker for offline support.
 # LOCALIZATION NOTE: Do not translate "Application Cache API", "AppCache".
 AppCacheInsecureWarning=Use of the Application Cache API (AppCache) for insecure connections will be removed in version 62.
 # LOCALIZATION NOTE: Do not translate "Worker".
 EmptyWorkerSourceWarning=Attempting to create a Worker from an empty source. This is probably unintentional.
 WebrtcDeprecatedPrefixWarning=WebRTC interfaces with the “moz” prefix (mozRTCPeerConnection, mozRTCSessionDescription, mozRTCIceCandidate) have been deprecated.
 NavigatorGetUserMediaWarning=navigator.mozGetUserMedia has been replaced by navigator.mediaDevices.getUserMedia
@@ -294,17 +291,17 @@ PushMessageBadRecordSize=The ServiceWorker for scope ‘%1$S’ failed to decrypt a push message. The ‘rs‘ parameter of the ‘Encryption‘ header must be between %2$S and 2^36-31, or omitted entirely. See https://tools.ietf.org/html/draft-ietf-httpbis-encryption-encoding-02#section-3.1 for more information.
 PushMessageBadPaddingError=The ServiceWorker for scope ‘%1$S’ failed to decrypt a push message. A record in the encrypted message was not padded correctly. See https://tools.ietf.org/html/draft-ietf-httpbis-encryption-encoding-02#section-2 for more information.
 # LOCALIZATION NOTE: This error is reported when push message decryption fails
 # and no specific error info is available. Do not translate "ServiceWorker".
 # %1$S is the ServiceWorker scope URL.
 PushMessageBadCryptoError=The ServiceWorker for scope ‘%1$S’ failed to decrypt a push message. For help with encryption, please see https://developer.mozilla.org/docs/Web/API/Push_API/Using_the_Push_API#Encryption
 # LOCALIZATION NOTE: %1$S is the type of a DOM event. 'passive' is a literal parameter from the DOM spec.
 PreventDefaultFromPassiveListenerWarning=Ignoring ‘preventDefault()’ call on event of type ‘%1$S’ from a listener registered as ‘passive’.
 # LOCALIZATION NOTE: 'ImageBitmapRenderingContext.transferImageBitmap' and 'ImageBitmapRenderingContext.transferFromImageBitmap' should not be translated
-ImageBitmapRenderingContext_TransferImageBitmap=ImageBitmapRenderingContext.transferImageBitmap is deprecated and will be removed soon. Use ImageBitmapRenderingContext.transferFromImageBitmap instead.
+ImageBitmapRenderingContext_TransferImageBitmapWarning=ImageBitmapRenderingContext.transferImageBitmap is deprecated and will be removed soon. Use ImageBitmapRenderingContext.transferFromImageBitmap instead.
 IIRFilterChannelCountChangeWarning=IIRFilterNode channel count changes may produce audio glitches.
 BiquadFilterChannelCountChangeWarning=BiquadFilterNode channel count changes may produce audio glitches.
 # LOCALIZATION NOTE: Do not translate ".jpeg"
 GenericImageNameJPEG=image.jpeg
 # LOCALIZATION NOTE: Do not translate ".gif"
 GenericImageNameGIF=image.gif
 # LOCALIZATION NOTE: Do not translate ".png"
 GenericImageNamePNG=image.png
@@ -315,18 +312,16 @@ LargeAllocationSuccess=This page was loa
 LargeAllocationNonGetRequest=A Large-Allocation header was ignored due to the load being triggered by a non-GET request.
 # LOCALIZATION NOTE: Do not translate "Large-Allocation", as it is a literal header name. Do not translate `window.opener`.
 LargeAllocationNotOnlyToplevelInTabGroup=A Large-Allocation header was ignored due to the presence of windows which have a reference to this browsing context through the frame hierarchy or window.opener.
 # LOCALIZATION NOTE: Do not translate "Large-Allocation", as it is a literal header name
 LargeAllocationNonE10S=A Large-Allocation header was ignored due to the document not being loaded out of process.
 GeolocationInsecureRequestIsForbidden=A Geolocation request can only be fulfilled in a secure context.
 # LOCALIZATION NOTE: Do not translate "Large-Allocation", as it is a literal header name.
 LargeAllocationNonWin32=This page would be loaded in a new process due to a Large-Allocation header, however Large-Allocation process creation is disabled on non-Win32 platforms.
-# LOCALIZATION NOTE: Do not translate URL.createObjectURL(MediaStream).
-URLCreateObjectURL_MediaStreamWarning=URL.createObjectURL(MediaStream) is deprecated and will be removed soon.
 # LOCALIZATION NOTE: Do not translate xml:base.
 XMLBaseAttributeWarning=Use of xml:base attribute is deprecated and will be removed soon. Please remove any use of it.
 # LOCALIZATION NOTE: Do not translate "content", "Window", and "window.top"
 WindowContentUntrustedWarning=The ‘content’ attribute of Window objects is deprecated.  Please use ‘window.top’ instead.
 # LOCALIZATION NOTE: The first %S is the tag name of the element that starts the loop, the second %S is the element's ID.
 SVGRefLoopWarning=The SVG <%S> with ID “%S” has a reference loop.
 # LOCALIZATION NOTE: The first %S is the tag name of the element in the chain where the chain was broken, the second %S is the element's ID.
 SVGRefChainLengthExceededWarning=An SVG <%S> reference chain which is too long was abandoned at the element with ID “%S”.
--- a/dom/url/tests/test_url.html
+++ b/dom/url/tests/test_url.html
@@ -479,15 +479,13 @@
     // we don't implement a spec-compliant parser yet.
     // make sure we are bug compatible with existing implementations.
     url = new URL("data:text/html,<a href=\"http://example.org/?q\">Link</a>");
     is(url.href, "data:text/html,<a href=\"http://example.org/?q\">Link</a>");
   </script>
 
   <script>
     var u = new URL('http://www.example.org');
-    // XXX: Switched to from ok() to todo_is() in Bug 1467712. Follow up in 1500962
-    // This would work with `http://www.example.org/` (trailing "/")
-    todo_is(u.toJSON(), 'http://www.example.org', "URL.toJSON()");
+    is(u.toJSON(), 'http://www.example.org/', "URL.toJSON()");
     is(JSON.stringify(u), "\"http://www.example.org/\"", "JSON.stringify(u) works");
   </script>
 </body>
 </html>
--- a/js/public/GCAPI.h
+++ b/js/public/GCAPI.h
@@ -328,82 +328,82 @@ typedef void
 struct JSStringFinalizer {
     void (*finalize)(const JSStringFinalizer* fin, char16_t* chars);
 };
 
 namespace JS {
 
 #define GCREASONS(D)                            \
     /* Reasons internal to the JS engine */     \
-    D(API)                                      \
-    D(EAGER_ALLOC_TRIGGER)                      \
-    D(DESTROY_RUNTIME)                          \
-    D(ROOTS_REMOVED)                            \
-    D(LAST_DITCH)                               \
-    D(TOO_MUCH_MALLOC)                          \
-    D(ALLOC_TRIGGER)                            \
-    D(DEBUG_GC)                                 \
-    D(COMPARTMENT_REVIVED)                      \
-    D(RESET)                                    \
-    D(OUT_OF_NURSERY)                           \
-    D(EVICT_NURSERY)                            \
-    D(DELAYED_ATOMS_GC)                         \
-    D(SHARED_MEMORY_LIMIT)                      \
-    D(IDLE_TIME_COLLECTION)                     \
-    D(INCREMENTAL_TOO_SLOW)                     \
-    D(ABORT_GC)                                 \
-    D(FULL_WHOLE_CELL_BUFFER)                   \
-    D(FULL_GENERIC_BUFFER)                      \
-    D(FULL_VALUE_BUFFER)                        \
-    D(FULL_CELL_PTR_BUFFER)                     \
-    D(FULL_SLOT_BUFFER)                         \
-    D(FULL_SHAPE_BUFFER)                        \
-    D(TOO_MUCH_WASM_MEMORY)                     \
+    D(API,                       0)             \
+    D(EAGER_ALLOC_TRIGGER,       1)             \
+    D(DESTROY_RUNTIME,           2)             \
+    D(ROOTS_REMOVED,             3)             \
+    D(LAST_DITCH,                4)             \
+    D(TOO_MUCH_MALLOC,           5)             \
+    D(ALLOC_TRIGGER,             6)             \
+    D(DEBUG_GC,                  7)             \
+    D(COMPARTMENT_REVIVED,       8)             \
+    D(RESET,                     9)             \
+    D(OUT_OF_NURSERY,           10)             \
+    D(EVICT_NURSERY,            11)             \
+    D(DELAYED_ATOMS_GC,         12)             \
+    D(SHARED_MEMORY_LIMIT,      13)             \
+    D(IDLE_TIME_COLLECTION,     14)             \
+    D(INCREMENTAL_TOO_SLOW,     15)             \
+    D(ABORT_GC,                 16)             \
+    D(FULL_WHOLE_CELL_BUFFER,   17)             \
+    D(FULL_GENERIC_BUFFER,      18)             \
+    D(FULL_VALUE_BUFFER,        19)             \
+    D(FULL_CELL_PTR_BUFFER,     20)             \
+    D(FULL_SLOT_BUFFER,         21)             \
+    D(FULL_SHAPE_BUFFER,        22)             \
+    D(TOO_MUCH_WASM_MEMORY,     23)             \
                                                 \
     /* These are reserved for future use. */    \
-    D(RESERVED0)                                \
-    D(RESERVED1)                                \
-    D(RESERVED2)                                \
-    D(RESERVED3)                                \
-    D(RESERVED4)                                \
-    D(RESERVED5)                                \
-    D(RESERVED6)                                \
-    D(RESERVED7)                                \
-    D(RESERVED8)                                \
+    D(RESERVED0,                24)             \
+    D(RESERVED1,                25)             \
+    D(RESERVED2,                26)             \
+    D(RESERVED3,                27)             \
+    D(RESERVED4,                28)             \
+    D(RESERVED5,                29)             \
+    D(RESERVED6,                30)             \
+    D(RESERVED7,                31)             \
+    D(RESERVED8,                32)             \
                                                 \
     /* Reasons from Firefox */                  \
-    D(DOM_WINDOW_UTILS)                         \
-    D(COMPONENT_UTILS)                          \
-    D(MEM_PRESSURE)                             \
-    D(CC_WAITING)                               \
-    D(CC_FORCED)                                \
-    D(LOAD_END)                                 \
-    D(POST_COMPARTMENT)                         \
-    D(PAGE_HIDE)                                \
-    D(NSJSCONTEXT_DESTROY)                      \
-    D(SET_NEW_DOCUMENT)                         \
-    D(SET_DOC_SHELL)                            \
-    D(DOM_UTILS)                                \
-    D(DOM_IPC)                                  \
-    D(DOM_WORKER)                               \
-    D(INTER_SLICE_GC)                           \
-    D(UNUSED1)                                  \
-    D(FULL_GC_TIMER)                            \
-    D(SHUTDOWN_CC)                              \
-    D(UNUSED2)                                  \
-    D(USER_INACTIVE)                            \
-    D(XPCONNECT_SHUTDOWN)                       \
-    D(DOCSHELL)                                 \
-    D(HTML_PARSER)
+    D(DOM_WINDOW_UTILS,         33)             \
+    D(COMPONENT_UTILS,          34)             \
+    D(MEM_PRESSURE,             35)             \
+    D(CC_WAITING,               36)             \
+    D(CC_FORCED,                37)             \
+    D(LOAD_END,                 38)             \
+    D(POST_COMPARTMENT,         39)             \
+    D(PAGE_HIDE,                40)             \
+    D(NSJSCONTEXT_DESTROY,      41)             \
+    D(SET_NEW_DOCUMENT,         42)             \
+    D(SET_DOC_SHELL,            43)             \
+    D(DOM_UTILS,                44)             \
+    D(DOM_IPC,                  45)             \
+    D(DOM_WORKER,               46)             \
+    D(INTER_SLICE_GC,           47)             \
+    D(UNUSED1,                  48)             \
+    D(FULL_GC_TIMER,            49)             \
+    D(SHUTDOWN_CC,              50)             \
+    D(UNUSED2,                  51)             \
+    D(USER_INACTIVE,            52)             \
+    D(XPCONNECT_SHUTDOWN,       53)             \
+    D(DOCSHELL,                 54)             \
+    D(HTML_PARSER,              55)
 
 namespace gcreason {
 
 /* GCReasons will end up looking like JSGC_MAYBEGC */
 enum Reason {
-#define MAKE_REASON(name) name,
+#define MAKE_REASON(name, val) name = val,
     GCREASONS(MAKE_REASON)
 #undef MAKE_REASON
     NO_REASON,
     NUM_REASONS,
 
     /*
      * For telemetry, we want to keep a fixed max bucket size over time so we
      * don't have to switch histograms. 100 is conservative; as of this writing
--- a/js/src/gc/GCEnum.h
+++ b/js/src/gc/GCEnum.h
@@ -34,55 +34,55 @@ enum class MarkColor : uint32_t
     D(Decommit)
 enum class State {
 #define MAKE_STATE(name) name,
     GCSTATES(MAKE_STATE)
 #undef MAKE_STATE
 };
 
 // Reasons we reset an ongoing incremental GC or perform a non-incremental GC.
-#define GC_ABORT_REASONS(D) \
-    D(None) \
-    D(NonIncrementalRequested) \
-    D(AbortRequested) \
-    D(Unused1) \
-    D(IncrementalDisabled) \
-    D(ModeChange) \
-    D(MallocBytesTrigger) \
-    D(GCBytesTrigger) \
-    D(ZoneChange) \
-    D(CompartmentRevived) \
-    D(GrayRootBufferingFailed)
+#define GC_ABORT_REASONS(D)            \
+    D(None,                         0) \
+    D(NonIncrementalRequested,      1) \
+    D(AbortRequested,               2) \
+    D(Unused1,                      3) \
+    D(IncrementalDisabled,          4) \
+    D(ModeChange,                   5) \
+    D(MallocBytesTrigger,           6) \
+    D(GCBytesTrigger,               7) \
+    D(ZoneChange,                   8) \
+    D(CompartmentRevived,           9) \
+    D(GrayRootBufferingFailed,     10)
 enum class AbortReason {
-#define MAKE_REASON(name) name,
+#define MAKE_REASON(name, num) name = num,
     GC_ABORT_REASONS(MAKE_REASON)
 #undef MAKE_REASON
 };
 
-#define JS_FOR_EACH_ZEAL_MODE(D)         \
-    D(RootsChange, 1)                    \
-    D(Alloc, 2)                          \
-    D(VerifierPre, 4)                    \
-    D(GenerationalGC, 7)                 \
-    D(YieldBeforeMarking, 8)             \
-    D(YieldBeforeSweeping, 9)            \
-    D(IncrementalMultipleSlices, 10)     \
-    D(IncrementalMarkingValidator, 11)   \
-    D(ElementsBarrier, 12)               \
-    D(CheckHashTablesOnMinorGC, 13)      \
-    D(Compact, 14)                       \
-    D(CheckHeapAfterGC, 15)              \
-    D(CheckNursery, 16)                  \
-    D(YieldBeforeSweepingAtoms, 17)      \
-    D(CheckGrayMarking, 18)              \
-    D(YieldBeforeSweepingCaches, 19)     \
-    D(YieldBeforeSweepingTypes, 20)      \
-    D(YieldBeforeSweepingObjects, 21)    \
-    D(YieldBeforeSweepingNonObjects, 22) \
-    D(YieldBeforeSweepingShapeTrees, 23)
+#define JS_FOR_EACH_ZEAL_MODE(D)           \
+    D(RootsChange,                      1) \
+    D(Alloc,                            2) \
+    D(VerifierPre,                      4) \
+    D(GenerationalGC,                   7) \
+    D(YieldBeforeMarking,               8) \
+    D(YieldBeforeSweeping,              9) \
+    D(IncrementalMultipleSlices,       10) \
+    D(IncrementalMarkingValidator,     11) \
+    D(ElementsBarrier,                 12) \
+    D(CheckHashTablesOnMinorGC,        13) \
+    D(Compact,                         14) \
+    D(CheckHeapAfterGC,                15) \
+    D(CheckNursery,                    16) \
+    D(YieldBeforeSweepingAtoms,        17) \
+    D(CheckGrayMarking,                18) \
+    D(YieldBeforeSweepingCaches,       19) \
+    D(YieldBeforeSweepingTypes,        20) \
+    D(YieldBeforeSweepingObjects,      21) \
+    D(YieldBeforeSweepingNonObjects,   22) \
+    D(YieldBeforeSweepingShapeTrees,   23)
 
 enum class ZealMode {
 #define ZEAL_MODE(name, value) name = value,
     JS_FOR_EACH_ZEAL_MODE(ZEAL_MODE)
 #undef ZEAL_MODE
     Count,
     Limit = Count - 1
 };
--- a/js/src/gc/Statistics.cpp
+++ b/js/src/gc/Statistics.cpp
@@ -67,32 +67,32 @@ js::gcstats::ExplainInvocationKind(JSGCI
          return "Shrinking";
     }
 }
 
 JS_PUBLIC_API(const char*)
 JS::gcreason::ExplainReason(JS::gcreason::Reason reason)
 {
     switch (reason) {
-#define SWITCH_REASON(name)                         \
+#define SWITCH_REASON(name, _)                    \
         case JS::gcreason::name:                    \
           return #name;
         GCREASONS(SWITCH_REASON)
 
         default:
           MOZ_CRASH("bad GC reason");
 #undef SWITCH_REASON
     }
 }
 
 const char*
 js::gcstats::ExplainAbortReason(gc::AbortReason reason)
 {
     switch (reason) {
-#define SWITCH_REASON(name)                         \
+#define SWITCH_REASON(name, _)                      \
         case gc::AbortReason::name:                 \
           return #name;
         GC_ABORT_REASONS(SWITCH_REASON)
 
         default:
           MOZ_CRASH("bad GC abort reason");
 #undef SWITCH_REASON
     }
deleted file mode 100644
--- a/testing/web-platform/meta/FileAPI/reading-data-section/filereader_abort.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[filereader_abort.html]
-  [Aborting after read]
-    expected: FAIL
-