Bug 1500710 - Add default MIME type definition for .wasm as 'application/wasm' r=bzbarsky
authorKershaw Chang <kershaw@mozilla.com>
Fri, 01 Feb 2019 22:16:17 +0000
changeset 456538 de93460e55c469f93834a87d5820d9d94c3d386e
parent 456515 cb5ed33ae30da0deceb984932ec69a1a02b0e88b
child 456539 03c5c501ca198591712dd507f764b4fb3e9ac714
push id35489
push userrmaries@mozilla.com
push dateSat, 02 Feb 2019 21:36:03 +0000
treeherdermozilla-central@63348118ef1d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs1500710
milestone67.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 1500710 - Add default MIME type definition for .wasm as 'application/wasm' r=bzbarsky Add {"application/wasm", "wasm"} mapping in extraMimeEntries Differential Revision: https://phabricator.services.mozilla.com/D18189
netwerk/mime/nsMimeTypes.h
uriloader/exthandler/nsExternalHelperAppService.cpp
--- a/netwerk/mime/nsMimeTypes.h
+++ b/netwerk/mime/nsMimeTypes.h
@@ -71,16 +71,17 @@
 #define APPLICATION_XML "application/xml"
 #define APPLICATION_XHTML_XML "application/xhtml+xml"
 #define APPLICATION_XSLT_XML "application/xslt+xml"
 #define APPLICATION_MATHML_XML "application/mathml+xml"
 #define APPLICATION_RDF_XML "application/rdf+xml"
 #define APPLICATION_WAPXHTML_XML "application/vnd.wap.xhtml+xml"
 #define APPLICATION_PACKAGE "application/package"
 #define APPLICATION_JAVASCRIPT_BINAST "application/javascript-binast"
+#define APPLICATION_WASM "application/wasm"
 
 #define AUDIO_BASIC "audio/basic"
 #define AUDIO_OGG "audio/ogg"
 #define AUDIO_WAV "audio/x-wav"
 #define AUDIO_WEBM "audio/webm"
 #define AUDIO_MP3 "audio/mpeg"
 #define AUDIO_MP4 "audio/mp4"
 #define AUDIO_AMR "audio/amr"
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -552,17 +552,18 @@ static const nsExtraMimeTypeEntry extraM
     {AUDIO_WEBM, "webm", "Web Media Audio"},
     {AUDIO_MP3, "mp3", "MPEG Audio"},
     {VIDEO_MP4, "mp4", "MPEG-4 Video"},
     {AUDIO_MP4, "m4a", "MPEG-4 Audio"},
     {VIDEO_RAW, "yuv", "Raw YUV Video"},
     {AUDIO_WAV, "wav", "Waveform Audio"},
     {VIDEO_3GPP, "3gpp,3gp", "3GPP Video"},
     {VIDEO_3GPP2, "3g2", "3GPP2 Video"},
-    {AUDIO_MIDI, "mid", "Standard MIDI Audio"}};
+    {AUDIO_MIDI, "mid", "Standard MIDI Audio"},
+    {APPLICATION_WASM, "wasm", "WebAssembly Module"}};
 
 #undef MAC_TYPE
 
 /**
  * File extensions for which decoding should be disabled.
  * NOTE: These MUST be lower-case and ASCII.
  */
 static const nsDefaultMimeTypeEntry nonDecodableExtensions[] = {