From b4e62863a084f133968b063dbc2840a76d9969ea Mon Sep 17 00:00:00 2001 From: Arthur Edelstein Date: Thu, 27 Mar 2014 17:02:27 -0700 Subject: [PATCH] Prevent new BrowserFeedWriter().close() exception from leaking absolute TBB path --- toolkit/mozapps/installer/packager.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/toolkit/mozapps/installer/packager.py b/toolkit/mozapps/installer/packager.py index ffc8eb0..846b146 100644 --- a/toolkit/mozapps/installer/packager.py +++ b/toolkit/mozapps/installer/packager.py @@ -297,7 +297,17 @@ def main(): key=is_native, reverse=True) if is_native(args.source): launcher.tooldir = args.source - elif not buildconfig.substs['CROSS_COMPILE']: + # Tor Browser patch for https://trac.torproject.org/projects/tor/ticket/9308 + # Previously, we had the following line here: + # `elif not buildconfig.substs['CROSS_COMPILE']:` + # which we have replaced with the following `else:`. + # The old line prevented launching an external process when the CROSS_COMPILE + # flag was set. But in the Tor Browser build, which cross compiles, we need + # to launch xpcshell to precompile the startup cache. The precompilation step + # is required to rewrite URIs in omni.ja, one of which, unrewritten, leaks + # the browser install path on OS X in an exception thrown in JavaScript by + # `new BrowserFeedWriter().close()`. + else: launcher.tooldir = buildconfig.substs['LIBXUL_DIST'] with errors.accumulate(): -- 1.8.3.4 (Apple Git-47)