Bug 1397365: Part 5 - Load a data: protocol URL to quit the browser in PGO profile script. r?ted draft
authorZibi Braniecki <zbraniecki@mozilla.com>
Wed, 13 Sep 2017 01:22:06 -0700
changeset 664679 2414f024dedd41d4b2eb15ad2a6d315d4c937525
parent 664678 50f32ee8d9ec3e91e97c318c07f1687b6ba32d53
child 664680 6b7289e0eff418a22910326f93ea7d94bfae5837
push id79760
push userbmo:gandalf@aviary.pl
push dateThu, 14 Sep 2017 08:02:46 +0000
reviewersted
bugs1397365
milestone57.0a1
Bug 1397365: Part 5 - Load a data: protocol URL to quit the browser in PGO profile script. r?ted With the change to nodefaultsrc for the initialBrowser, we now need a real document to load javascript into. MozReview-Commit-ID: 5CwOMKUkbHB
build/pgo/profileserver.py
--- a/build/pgo/profileserver.py
+++ b/build/pgo/profileserver.py
@@ -68,21 +68,22 @@ if __name__ == '__main__':
                 if e not in env:
                     continue
 
                 vcdir = os.path.abspath(os.path.join(env[e], '../../VC/bin'))
                 if os.path.exists(vcdir):
                     env['PATH'] = '%s;%s' % (vcdir, env['PATH'])
                     break
 
+        quitterHTML = 'data:text/html,<html><head><script>Quitter.quit();</script></head></html>'
         # Run Firefox a first time to initialize its profile
         runner = FirefoxRunner(profile=profile,
                                binary=build.get_binary_path(
                                    where="staged-package"),
-                               cmdargs=['javascript:Quitter.quit()'],
+                               cmdargs=[quitterHTML],
                                env=env)
         runner.start()
         runner.wait()
 
         jarlog = os.getenv("JARLOG_FILE")
         if jarlog:
             env["MOZ_JAR_LOG_FILE"] = os.path.abspath(jarlog)
             print "jarlog: %s" % env["MOZ_JAR_LOG_FILE"]