commit 9ecbfca98dc5488527495e3bfde0fabf75a8529a
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Wed Aug 30 16:58:52 2017 -0400
squash! Bug 19273: Avoid JavaScript patching of the external app helper dialog.
When handling an external URI or downloading a file, invoke Torbutton's
external app blocker component (which will present a download warning
dialog unless the user has checked the "Automatically download files
from now on" box).
For e10s …
[View More]compatibility, avoid using a modal dialog and instead use
a callback interface (nsIHelperAppWarningLauncher) to allow Torbutton
to indicate the user's desire to cancel or continue each request.
Other bugs fixed:
Bug 21766: Crash with e10s enabled while trying to download a file
Bug 21886: Download is stalled in non-e10s mode
Bug 22471: Downloading files via the PDF viewer download button is broken
Bug 22472: Fix FTP downloads when external helper app dialog is shown
Bug 22610: Avoid crashes when canceling external helper app downloads
Bug 22618: Downloading pdf file via file:/// is stalling
---
uriloader/exthandler/nsExternalHelperAppService.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/uriloader/exthandler/nsExternalHelperAppService.cpp b/uriloader/exthandler/nsExternalHelperAppService.cpp
index df08905304fb..1c0dd8ee66f7 100644
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp
@@ -606,7 +606,7 @@ public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIHELPERAPPWARNINGLAUNCHER
- nsExternalLoadURIHandler(nsIInterfaceRequestor * aWindowContext,
+ nsExternalLoadURIHandler(nsIInterfaceRequestor *aWindowContext,
nsIURI *aURI,
nsIHandlerInfo *aHandlerInfo);
@@ -669,7 +669,7 @@ NS_IMETHODIMP nsExternalLoadURIHandler::ContinueRequest()
bool alwaysAsk = true;
mHandlerInfo->GetAlwaysAskBeforeHandling(&alwaysAsk);
- // if we are not supposed to ask, and the preferred action is to use
+ // If we are not supposed to ask, and the preferred action is to use
// a helper app or the system default, we just launch the URI.
if (!alwaysAsk && (preferredAction == nsIHandlerInfo::useHelperApp ||
preferredAction == nsIHandlerInfo::useSystemDefault))
@@ -1786,7 +1786,7 @@ NS_IMETHODIMP nsExternalAppHandler::OnStartRequest(nsIRequest *request, nsISuppo
NS_IMETHODIMP nsExternalAppHandler::ContinueRequest()
{
// Break our reference cycle with the download warning dialog (set up in
- // OnStartRequest)
+ // OnStartRequest).
mWarningDialog = nullptr;
// now that the temp file is set up, find out if we need to invoke a dialog
@@ -1908,7 +1908,7 @@ NS_IMETHODIMP nsExternalAppHandler::ContinueRequest()
NS_IMETHODIMP nsExternalAppHandler::CancelRequest(nsresult aReason)
{
// Break our reference cycle with the download warning dialog (set up in
- // OnStartRequest)
+ // OnStartRequest).
mWarningDialog = nullptr;
return Cancel(aReason);
[View Less]
commit 8e5e391c71d6c5f3ae80c88e45d1e8522f981214
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Wed Aug 30 12:06:24 2017 -0400
fixup! Bug 19273: Avoid JavaScript patching of the external app helper dialog.
Improve the overview/summary comment in external-app-blocker.js.
---
src/components/external-app-blocker.js | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/components/external-app-blocker.js b/src/components/external-app-blocker.js
…
[View More]index ca86580..1f88fc7 100644
--- a/src/components/external-app-blocker.js
+++ b/src/components/external-app-blocker.js
@@ -8,9 +8,8 @@
* due to Firefox Bug https://bugzilla.mozilla.org/show_bug.cgi?id=440892
*
* An instance of this module is created each time the browser starts to
- * download a file that may be opened by another or application and when
- * an external application may be invoked to handle an URL (e.g., when the
- * user clicks on a mailto: URL).
+ * download a file and when an external application may be invoked to
+ * handle an URL (e.g., when the user clicks on a mailto: URL).
*************************************************************************/
const Cc = Components.classes;
[View Less]
commit a120bb02f4dbcb3e26fe0c031d383a9a8681678a
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Wed Aug 30 10:43:34 2017 -0400
Bug 22232: fix typo in README-BOOTSTRAP.
---
README-BOOTSTRAP | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README-BOOTSTRAP b/README-BOOTSTRAP
index 8bc2a76..a5354e7 100644
--- a/README-BOOTSTRAP
+++ b/README-BOOTSTRAP
@@ -35,7 +35,7 @@ mBootstrapErrorOccurred (Boolean) This is set to true when a
mIsBootstrapDone is set to …
[View More]true as well as after the user makes
changes to their settings (after a SAVECONF is done).
-The PROGRESS field of the STATUS_CLIENT messages are used directly
+The PROGRESS field within each STATUS_CLIENT message is used directly
to display the completion percentage (progress bar).
The TAG= keywords within the STATUS_CLIENT messages are used for
[View Less]
commit da7485a0b8f89b9ee2278d6132fc7bb53d5220e8
Author: Nicolas Vigier <boklm(a)torproject.org>
Date: Wed Aug 30 14:45:07 2017 +0200
README: mention that rbm is included as a git submodule
---
README | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/README b/README
index 4381074..10cadec 100644
--- a/README
+++ b/README
@@ -46,6 +46,10 @@ If you are running Debian or Ubuntu, you can install them with:
libdigest-sha-perl libdata-uuid-perl libdata-dump-perl \…
[View More]
libfile-copy-recursive-perl git libgtk2.0-dev curl runc
+The build system is based on rbm, which is included as a git submodule
+in the rbm/ directory. You can fetch the rbm git submodule by running
+'make submodule-update'.
+
Starting a build
----------------
[View Less]
commit 26d284e3835ddd5b283b732278b7b5b740bace6e
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Mon Aug 14 16:09:47 2017 -0400
Bug 23240: retrieve current bootstrap progress before showing progress bar
To avoid showing an incorrect progress value, keep the progress bar
hidden until after we have retrieved the current bootstrap progress value.
---
src/chrome/content/progress.js | 28 +++++++++++++++++++++++++++-
src/chrome/content/progress.xul | 5 +++--
2 …
[View More]files changed, 30 insertions(+), 3 deletions(-)
diff --git a/src/chrome/content/progress.js b/src/chrome/content/progress.js
index 48362e7..f7bcaff 100644
--- a/src/chrome/content/progress.js
+++ b/src/chrome/content/progress.js
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, The Tor Project, Inc.
+// Copyright (c) 2017, The Tor Project, Inc.
// See LICENSE for licensing information.
//
// vim: set sw=2 sts=2 ts=8 et syntax=javascript:
@@ -81,6 +81,16 @@ function initDialog()
if (pleaseWait)
pleaseWait.removeAttribute("hidden");
}
+
+ // To avoid showing an incorrect progress value, we keep the progress bar
+ // hidden until a TorBootstrapStatus notification is received. We request
+ // the most recent bootstrap status info (which should cause such a
+ // notification to be generated) and also start a fail-safe timer to ensure
+ // that the progress bar is displayed within 2 seconds in all cases.
+ let protocolSvc = Cc["@torproject.org/torlauncher-protocol-service;1"]
+ .getService(Ci.nsISupports).wrappedJSObject;
+ protocolSvc.TorRetrieveBootstrapStatus();
+ window.setTimeout(function() { showProgressMeterIfNoError(); }, 2000);
}
@@ -158,6 +168,17 @@ function stopTorBootstrap()
}
+function showProgressMeterIfNoError()
+{
+ let meter = document.getElementById("progressMeter");
+ if (meter &&
+ !document.documentElement.hasAttribute("bootstrapErrorOccurred"))
+ {
+ meter.style.visibility = "visible";
+ }
+}
+
+
var gObserver = {
// nsIObserver implementation.
observe: function(aSubject, aTopic, aParam)
@@ -184,7 +205,10 @@ var gObserver = {
var meter = document.getElementById("progressMeter");
if (meter)
+ {
meter.value = percentComplete;
+ showProgressMeterIfNoError();
+ }
var bootstrapDidComplete = (percentComplete >= 100);
if (percentComplete >= 100)
@@ -199,6 +223,8 @@ var gObserver = {
if (s)
labelText = s;
+ document.documentElement.setAttribute("bootstrapErrorOccurred", true);
+
if (meter)
meter.setAttribute("hidden", true);
diff --git a/src/chrome/content/progress.xul b/src/chrome/content/progress.xul
index 473dab9..5b26110 100644
--- a/src/chrome/content/progress.xul
+++ b/src/chrome/content/progress.xul
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- - Copyright (c) 2014, The Tor Project, Inc.
+ - Copyright (c) 2017, The Tor Project, Inc.
- See LICENSE for licensing information.
- vim: set sw=2 sts=2 ts=8 et syntax=xml:
-->
@@ -37,7 +37,8 @@
<description id="progressDesc" />
</vbox>
</hbox>
- <progressmeter id="progressMeter" mode="determined" value="0" />
+ <progressmeter id="progressMeter" mode="determined" value="0"
+ style="visibility:hidden" />
<description id="progressPleaseWait"
hidden="true">&torprogress.pleaseWait;</description>
</vbox>
[View Less]
commit ab8e081f3007f45e98171e163f080fea8caad964
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Tue Aug 29 15:55:21 2017 -0400
Bug 22232: gather info on use of bootstrap status messages
---
README-BOOTSTRAP | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/README-BOOTSTRAP b/README-BOOTSTRAP
new file mode 100644
index 0000000..8bc2a76
--- /dev/null
+++ b/README-BOOTSTRAP
@@ -0,0 +1,68 @@
+HOW TOR LAUNCHER USES …
[View More]BOOTSTRAP STATUS MESSAGES
+
+(This information was originally recorded in
+https://trac.torproject.org/projects/tor/ticket/22232)
+
+To start monitoring events, Tor Launcher issues the following Tor
+control port command:
+ SETEVENTS STATUS_CLIENT NOTICE WARN ERR
+Tor Launcher then looks for 650 responses.
+
+When one of the following responses is received, it is logged to
+the browser console and added to an in-memory log buffer (which is
+used to implement "Copy Tor Log To Clipboard"):
+ WARN, ERR, DEBUG, INFO, NOTICE
+
+Tor Launcher also issues a GETINFO status/bootstrap-phase command
+soon after the control port connection has been established.
+
+When a STATUS_CLIENT message is received, Tor Launcher uses the
+info contained within the message to detect bootstrap errors and
+to show progress. The GETINFO status/bootstrap-phase response is
+used for this same purpose (both kinds of response messages are
+parsed and processed by the same code).
+
+Tor Launcher maintains two important pieces of internal state
+information about the bootstrap process:
+
+mIsBootstrapDone (Boolean) This is set to true when a STATUS_CLIENT
+ BOOTSTRAP event with PROGRESS=100 is received. It is set to false
+ when any other STATUS_CLIENT BOOTSTRAP event is received.
+
+mBootstrapErrorOccurred (Boolean) This is set to true when a
+ STATUS_CLIENT BOOTSTRAP event with a severity of WARN or ERR, and
+ RECOMMENDATION of warn is received. It is set to false when
+ mIsBootstrapDone is set to true as well as after the user makes
+ changes to their settings (after a SAVECONF is done).
+
+The PROGRESS field of the STATUS_CLIENT messages are used directly
+to display the completion percentage (progress bar).
+
+The TAG= keywords within the STATUS_CLIENT messages are used for
+two purposes:
+
+1. The values are mapped to localized strings and displayed in the
+progress window. If Tor Launcher cannot map the TAG to a localized
+string, it displays the SUMMARY text instead (otherwise, the SUMMARY
+field is not used).
+
+2. The TAG value along with REASON is used to suppress repeated
+errors. When Tor Launcher sets mBootstrapErrorOccurred to true (see
+above), an error is shown to the user unless the previous error
+displayed had the same TAG and REASON values.
+
+The "Copy Tor Log To Clipboard" button is displayed with the warning
+icon when Tor Launcher detects a bootstrap error (see
+mBootstrapErrorOccurred above) or when it receives a log message
+event with severity of WARN or ERR.
+
+The severity value within a STATUS_CLIENT BOOTSTRAP event is used
+to detect bootstrap errors (as described above) and also to determine
+the level for local logging.
+
+When displaying errors, Tor Launcher tries to map the REASON values
+to localized strings. If this fails, the WARNING text is displayed
+instead. HOSTADDR is appended to the error text when it is present.
+
+RECOMMENDATION is part of the information that is used to determine
+if a bootstrap error has occurred (as described above).
[View Less]
commit 46233937c4e59edf873f6a709549732280067c13
Author: Georg Koppen <gk(a)torproject.org>
Date: Tue Aug 29 12:15:33 2017 +0000
Typo fixes in README
---
README | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/README b/README
index de79d35..4381074 100644
--- a/README
+++ b/README
@@ -12,9 +12,9 @@ Version 0.1.1 of runc is required (which is the version available in
Debian stretch and jessie-backports). It is not yet working with runc
version 1.0.0:…
[View More]https://trac.torproject.org/projects/tor/ticket/23039
-Your user account should have access sudo access, which is required to
-be able to extract container file systems, start containers and copy
-files to and from containers.
+Your user account should have sudo access, which is required to be able
+to extract container file systems, start containers and copy files to and
+from containers.
The sources of most components are downloaded using git, which needs to
be installed. The sources of webrtc are downloaded using gclient, which
@@ -117,7 +117,7 @@ Or set the debug option to 0 in the rbm.local.conf file.
If you want to select the output directory, you can use rbm's --output-dir
option. You can look at the Makefile to find the rbm command for what
-you want to build, and add the --output-dir option. For example if you
+you want to build, and add the --output-dir option. For example, if you
want to build Tor Browser nightly for linux-x86_64:
./rbm/rbm build release --output-dir=/var/builds/nightly/2017-01-23 \
@@ -168,7 +168,7 @@ Copy the tools/tor-browser-builds-boklm file and edit it to change the
$ vim tools/tor-browser-builds-$user
You can now run ./tools/tor-browser-builds-$user to start the build, and
-add it to you crontab.
+add it to your crontab.
The html build reports will be available in the reports/ directory, and
the build files in the tor-browser-builds/ directory (unless you changed
@@ -192,7 +192,7 @@ Cleaning obsolete files and containers images
You can run 'make clean' to clean old build files and containers that
are no longer used in current builds. Before doing that, you need to
configure the branches and build targets you are using in the
-rbm.local.conf file. The cleaning script will checkout all the configured
+rbm.local.conf file. The cleaning script will check out all the configured
branches to create a list of used build files, and delete the files
from the 'out' directory that are not used. If you want to see the list
of files and containers that would be removed without doing it, you can
[View Less]