author | Christoph Kerschbaumer <mozilla@christophkerschbaumer.com> |
Mon, 30 Nov 2015 20:23:55 -0800 | |
changeset 274854 | 458edd4f55231476adb480433cdea71509bcc81b |
parent 274853 | 7e775b3742d9c3b2b24c434d36acbc87ed5d6541 |
child 274855 | 433bb82665c2f67c9d166d15913df99aa7f57231 |
push id | 29739 |
push user | cbook@mozilla.com |
push date | Tue, 01 Dec 2015 14:26:30 +0000 |
treeherder | mozilla-central@974fe614d529 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | sicking |
bugs | 1225355 |
milestone | 45.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
|
toolkit/components/aboutmemory/content/aboutMemory.js | file | annotate | diff | comparison | revisions |
--- a/toolkit/components/aboutmemory/content/aboutMemory.js +++ b/toolkit/components/aboutmemory/content/aboutMemory.js @@ -29,16 +29,17 @@ const KIND_OTHER = Ci.nsIMem const UNITS_BYTES = Ci.nsIMemoryReporter.UNITS_BYTES; const UNITS_COUNT = Ci.nsIMemoryReporter.UNITS_COUNT; const UNITS_COUNT_CUMULATIVE = Ci.nsIMemoryReporter.UNITS_COUNT_CUMULATIVE; const UNITS_PERCENTAGE = Ci.nsIMemoryReporter.UNITS_PERCENTAGE; Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); +Cu.import("resource://gre/modules/NetUtil.jsm"); XPCOMUtils.defineLazyGetter(this, "nsBinaryStream", () => CC("@mozilla.org/binaryinputstream;1", "nsIBinaryInputStream", "setInputStream")); XPCOMUtils.defineLazyGetter(this, "nsFile", () => CC("@mozilla.org/file/local;1", "nsIFile", "initWithPath")); @@ -665,23 +666,21 @@ function loadMemoryReportsFromFile(aFile reader.readAsText(new Blob(this.data)); } catch (ex) { handleException(ex); } } }, null); let file = new nsFile(aFilename); - let fileChan = Services.io.newChannelFromURI2(Services.io.newFileURI(file), - null, // aLoadingNode - Services.scriptSecurityManager.getSystemPrincipal(), - null, // aTriggeringPrincipal - Ci.nsILoadInfo.SEC_NORMAL, - Ci.nsIContentPolicy.TYPE_OTHER); - fileChan.asyncOpen(converter, null); + let fileChan = NetUtil.newChannel({ + uri: Services.io.newFileURI(file), + loadUsingSystemPrincipal: true + }); + fileChan.asyncOpen2(converter); } catch (ex) { handleException(ex); } } /** * Like updateAboutMemoryFromReporters(), but gets its data from a file instead