Bug 955890 - Part 2: Fix some undefined property warnings in DevTools JS. r=rcampbell

This commit is contained in:
Chris Peterson 2013-12-31 20:18:13 -08:00
parent c5937fbed4
commit 4780db17f8
2 changed files with 5 additions and 2 deletions

View File

@ -247,7 +247,7 @@ WebConsoleActor.prototype =
* @type boolean
*/
get saveRequestAndResponseBodies()
this._prefs["NetworkMonitor.saveRequestAndResponseBodies"],
this._prefs["NetworkMonitor.saveRequestAndResponseBodies"] || null,
actorPrefix: "console",

View File

@ -52,6 +52,8 @@
* Mihai Sucan (Mozilla Corp.)
*/
"use strict";
const {components, Cc, Ci, Cu} = require("chrome");
loader.lazyImporter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm");
@ -428,7 +430,8 @@ let NetworkHelper = {
return true;
}
switch (this.mimeCategoryMap[aMimeType]) {
let category = this.mimeCategoryMap[aMimeType] || null;
switch (category) {
case "txt":
case "js":
case "json":