Bug 1404917 - Use request.mimeType instead of request.responseContent.content.mimeType. r=Honza
☠☠ backed out by 004b34f82c44 ☠ ☠
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 05 Oct 2017 17:42:51 +0200
changeset 391285 3d8a6d24cec9ae98ce8b5b50218c909243d6804b
parent 391284 2a26d588efdcd3704f4e8fc5e4570e029b87d4e5
child 391286 7dcfe8d12d6f4914d2eba8e5dcaab5660d3c6e61
push id97236
push userryanvm@gmail.com
push dateFri, 10 Nov 2017 21:14:41 +0000
treeherdermozilla-inbound@abc17e0eea77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1404917
milestone58.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 1404917 - Use request.mimeType instead of request.responseContent.content.mimeType. r=Honza MozReview-Commit-ID: EIaS1CFKzVn
devtools/client/netmonitor/src/request-list-context-menu.js
--- a/devtools/client/netmonitor/src/request-list-context-menu.js
+++ b/devtools/client/netmonitor/src/request-list-context-menu.js
@@ -121,18 +121,18 @@ RequestListContextMenu.prototype = {
       click: () => this.copyResponse(),
     });
 
     copySubmenu.push({
       id: "request-list-context-copy-image-as-data-uri",
       label: L10N.getStr("netmonitor.context.copyImageAsDataUri"),
       accesskey: L10N.getStr("netmonitor.context.copyImageAsDataUri.accesskey"),
       visible: !!(selectedRequest &&
-               selectedRequest.responseContent &&
-               selectedRequest.responseContent.content.mimeType.includes("image/")),
+               selectedRequest.mimeType &&
+               selectedRequest.mimeType.includes("image/")),
       click: () => this.copyImageAsDataUri(),
     });
 
     copySubmenu.push({
       type: "separator",
       visible: !!selectedRequest,
     });
 
@@ -159,18 +159,18 @@ RequestListContextMenu.prototype = {
       click: () => this.saveAllAsHar(),
     });
 
     menu.push({
       id: "request-list-context-save-image-as",
       label: L10N.getStr("netmonitor.context.saveImageAs"),
       accesskey: L10N.getStr("netmonitor.context.saveImageAs.accesskey"),
       visible: !!(selectedRequest &&
-               selectedRequest.responseContent &&
-               selectedRequest.responseContent.content.mimeType.includes("image/")),
+               selectedRequest.mimeType &&
+               selectedRequest.mimeType.includes("image/")),
       click: () => this.saveImageAs(),
     });
 
     menu.push({
       type: "separator",
       visible: !!(selectedRequest && !selectedRequest.isCustom),
     });
 
@@ -195,29 +195,29 @@ RequestListContextMenu.prototype = {
       click: () => this.openRequestInTab()
     });
 
     menu.push({
       id: "request-list-context-open-in-debugger",
       label: L10N.getStr("netmonitor.context.openInDebugger"),
       accesskey: L10N.getStr("netmonitor.context.openInDebugger.accesskey"),
       visible: !!(selectedRequest &&
-               selectedRequest.responseContent &&
-               selectedRequest.responseContent.content.mimeType.includes("javascript")),
+               selectedRequest.mimeType &&
+               selectedRequest.mimeType.includes("javascript")),
       click: () => this.openInDebugger()
     });
 
     menu.push({
       id: "request-list-context-open-in-style-editor",
       label: L10N.getStr("netmonitor.context.openInStyleEditor"),
       accesskey: L10N.getStr("netmonitor.context.openInStyleEditor.accesskey"),
       visible: !!(selectedRequest &&
-               selectedRequest.responseContent &&
                Services.prefs.getBoolPref("devtools.styleeditor.enabled") &&
-               selectedRequest.responseContent.content.mimeType.includes("css")),
+               selectedRequest.mimeType &&
+               selectedRequest.mimeType.includes("css")),
       click: () => this.openInStyleEditor()
     });
 
     menu.push({
       id: "request-list-context-perf",
       label: L10N.getStr("netmonitor.context.perfTools"),
       accesskey: L10N.getStr("netmonitor.context.perfTools.accesskey"),
       visible: this.sortedRequests.size > 0,