Bug 1107013 - Clear Browser Toolbox cache for local builds. r=bgrins

This commit is contained in:
J. Ryan Stinnett 2014-12-08 16:26:09 -06:00
Родитель e50b778554
Коммит e966106d94
1 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -203,6 +203,17 @@ BrowserToolboxProcess.prototype = {
dumpn("Running chrome debugging process.");
let args = ["-no-remote", "-foreground", "-profile", this._dbgProfilePath, "-chrome", xulURI];
// During local development, incremental builds can trigger the main process
// to clear its startup cache with the "flag file" .purgecaches, but this
// file is removed during app startup time, so we aren't able to know if it
// was present in order to also clear the child profile's startup cache as
// well.
//
// As an approximation of "isLocalBuild", check for an unofficial build.
if (!Services.appinfo.isOfficial) {
args.push("-purgecaches");
}
process.runwAsync(args, args.length, { observe: () => this.close() });
this._telemetry.toolOpened("jsbrowserdebugger");