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
--- 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"]