Richard Pospesel pushed to branch tor-browser-102.5.0esr-12.5-1 at The Tor Project / Applications / Tor Browser
Commits:
-
81c5119b
by Pier Angelo Vendrame at 2022-12-13T16:27:53+01:00
1 changed file:
Changes:
| ... | ... | @@ -22,9 +22,9 @@ const kRequestUpdateMessageName = "FetchUpdateData"; |
| 22 | 22 | * implementation.
|
| 23 | 23 | */
|
| 24 | 24 | class AboutTBUpdateParent extends JSWindowActorParent {
|
| 25 | - receiveMessage(aMessage) {
|
|
| 25 | + async receiveMessage(aMessage) {
|
|
| 26 | 26 | if (aMessage.name == kRequestUpdateMessageName) {
|
| 27 | - return this.releaseNoteInfo;
|
|
| 27 | + return this.getReleaseNoteInfo();
|
|
| 28 | 28 | }
|
| 29 | 29 | return undefined;
|
| 30 | 30 | }
|
| ... | ... | @@ -51,7 +51,7 @@ class AboutTBUpdateParent extends JSWindowActorParent { |
| 51 | 51 | // On Mac OS, when building with --enable-tor-browser-data-outside-app-dir
|
| 52 | 52 | // to support Gatekeeper signing, the ChangeLog.txt file is located in
|
| 53 | 53 | // TorBrowser.app/Contents/Resources/TorBrowser/Docs/.
|
| 54 | - get releaseNoteInfo() {
|
|
| 54 | + async getReleaseNoteInfo() {
|
|
| 55 | 55 | let info = { moreInfoURL: this.moreInfoURL };
|
| 56 | 56 | |
| 57 | 57 | try {
|
| ... | ... | @@ -74,12 +74,7 @@ class AboutTBUpdateParent extends JSWindowActorParent { |
| 74 | 74 | f.append("Docs");
|
| 75 | 75 | f.append("ChangeLog.txt");
|
| 76 | 76 | |
| 77 | - let fs = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(
|
|
| 78 | - Ci.nsIFileInputStream
|
|
| 79 | - );
|
|
| 80 | - fs.init(f, -1, 0, 0);
|
|
| 81 | - let s = NetUtil.readInputStreamToString(fs, fs.available());
|
|
| 82 | - fs.close();
|
|
| 77 | + let s = await IOUtils.readUTF8(f.path);
|
|
| 83 | 78 | |
| 84 | 79 | // Truncate at the first empty line.
|
| 85 | 80 | s = s.replace(/[\r\n][\r\n][\s\S]*$/m, "");
|