mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 06:09:19 +00:00
Bug 1906260: Remove the -no-remote command line argument. r=glandium,webdriver-reviewers,perftest-reviewers,application-update-reviewers,taskgraph-reviewers,nalexander,bhearsum,jdescottes,sparky
Differential Revision: https://phabricator.services.mozilla.com/D217569
This commit is contained in:
parent
e88868b534
commit
4f9bc460c7
@ -208,6 +208,12 @@ const startupPhases = {
|
||||
read: 1,
|
||||
close: 1,
|
||||
},
|
||||
{
|
||||
// This is the startup lock used to restrict only one Firefox startup at a time.
|
||||
path: "TmpD:firefox-default/parent.lock",
|
||||
condition: WIN,
|
||||
stat: 1,
|
||||
},
|
||||
],
|
||||
|
||||
"before opening first browser window": [
|
||||
|
@ -20,7 +20,7 @@ async function runFirefox(args) {
|
||||
"headless_test_screenshot_profile"
|
||||
);
|
||||
const prefsPath = PathUtils.join(profilePath, mochiPrefsName);
|
||||
const firefoxArgs = ["-profile", profilePath, "-no-remote"];
|
||||
const firefoxArgs = ["-profile", profilePath];
|
||||
|
||||
await IOUtils.makeDirectory(profilePath);
|
||||
await IOUtils.copy(mochiPrefsPath, prefsPath);
|
||||
|
@ -65,7 +65,7 @@ followed by the command line you'd like to run, like this:
|
||||
|
||||
.. code:: bash
|
||||
|
||||
$ lldb -- obj-ff-dbg/dist/Nightly.app/Contents/MacOS/firefox -no-remote -profile /path/to/profile
|
||||
$ lldb -- obj-ff-dbg/dist/Nightly.app/Contents/MacOS/firefox -profile /path/to/profile
|
||||
|
||||
Then set breakpoints you need and start the process:
|
||||
|
||||
|
@ -148,8 +148,7 @@ These steps were last updated for Xcode 15:
|
||||
debugging purposes" below. Select the "Arguments" tab in the scheme
|
||||
editor, and click the '+' below the "Arguments passed on launch"
|
||||
field. Add "-P *profilename*", where *profilename* is the name of a
|
||||
profile you created previously. Repeat that to also add the argument
|
||||
"-no-remote".
|
||||
profile you created previously.
|
||||
#. Also in the "Arguments" panel, you may want to add an environment
|
||||
variable MOZ_DEBUG_CHILD_PROCESS set to the value 1 to help with
|
||||
debugging e10s.
|
||||
|
@ -262,18 +262,7 @@ Running two instances of Mozilla simultaneously
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
You can run two instances of Mozilla (e.g. debug and optimized)
|
||||
simultaneously by setting the environment variable ``MOZ_NO_REMOTE``:
|
||||
|
||||
.. code::
|
||||
|
||||
set MOZ_NO_REMOTE=1
|
||||
|
||||
Or, starting with Firefox 2 and other Gecko 1.8.1-based applications,
|
||||
you can use the ``-no-remote`` command-line switch instead (implemented
|
||||
in
|
||||
`bug 325509 <https://bugzilla.mozilla.org/show_bug.cgi?id=325509>`__).
|
||||
|
||||
You can also specify the profile to use with the ``-P profile_name``
|
||||
simultaneously by specifying the profile to use with the ``-P profile_name``
|
||||
command-line argument.
|
||||
|
||||
Debugging JavaScript
|
||||
|
@ -73,7 +73,7 @@ export MOZ_DISABLE_CONTENT_SANDBOX=1
|
||||
|
||||
Run the Firefox browser
|
||||
```
|
||||
~/mozilla-central/obj-opt64/dist/bin/firefox -no-remote -profile ~/mozilla-central/obj-opt64/tmp/profile-default &
|
||||
~/mozilla-central/obj-opt64/dist/bin/firefox -profile ~/mozilla-central/obj-opt64/tmp/profile-default &
|
||||
```
|
||||
|
||||
Navigate to the test case, but do not start it yet. Then hover over the tab to get the content process PID.
|
||||
|
@ -121,7 +121,7 @@ simultaneous capture of non-heap data.
|
||||
|
||||
To start a trace session, launching a new Firefox instance:
|
||||
|
||||
`xperf -on base xperf -start heapsession -heap -PidNewProcess "./firefox.exe -P test -no-remote" -stackwalk HeapAlloc+HeapRealloc -BufferSize 512 -MinBuffers 128 -MaxBuffers 512`
|
||||
`xperf -on base xperf -start heapsession -heap -PidNewProcess "./firefox.exe -P test" -stackwalk HeapAlloc+HeapRealloc -BufferSize 512 -MinBuffers 128 -MaxBuffers 512`
|
||||
|
||||
To stop a session and merge the resulting files:
|
||||
|
||||
|
@ -435,7 +435,7 @@ class RemoteReftest(RefTest):
|
||||
startTime = datetime.datetime.now()
|
||||
status = 0
|
||||
profileDirectory = self.remoteProfile + "/"
|
||||
cmdargs.extend(("-no-remote", "-profile", profileDirectory))
|
||||
cmdargs.extend(("-profile", profileDirectory))
|
||||
|
||||
pid = rpm.launch(
|
||||
binary,
|
||||
|
@ -1404,12 +1404,6 @@ def _get_desktop_run_parser():
|
||||
group.add_argument(
|
||||
"--app", help="Path to executable to run (default: output of ./mach build)"
|
||||
)
|
||||
group.add_argument(
|
||||
"--remote",
|
||||
"-r",
|
||||
action="store_true",
|
||||
help="Do not pass the --no-remote argument by default.",
|
||||
)
|
||||
group.add_argument(
|
||||
"--background",
|
||||
"-b",
|
||||
@ -1934,7 +1928,6 @@ def _run_desktop(
|
||||
params,
|
||||
packaged,
|
||||
app,
|
||||
remote,
|
||||
background,
|
||||
noprofile,
|
||||
disable_e10s,
|
||||
@ -2019,9 +2012,6 @@ def _run_desktop(
|
||||
if params:
|
||||
args.extend(params)
|
||||
|
||||
if not remote:
|
||||
args.append("-no-remote")
|
||||
|
||||
if not background and sys.platform == "darwin":
|
||||
args.append("-foreground")
|
||||
|
||||
@ -3153,7 +3143,7 @@ def repackage_snap_install(command_context, snap_file, snap_name, sudo=None):
|
||||
logging.INFO,
|
||||
"repackage-snap-install-howto-run",
|
||||
{},
|
||||
"Example usage: snap run {} --no-remote".format(snap_name),
|
||||
"Example usage: snap run {}".format(snap_name),
|
||||
)
|
||||
|
||||
return 0
|
||||
|
@ -59,7 +59,7 @@ describe('Firefox', () => {
|
||||
it('should launch a Firefox browser', async () => {
|
||||
const userDataDir = path.join(tmpDir, 'profile');
|
||||
function getArgs(): string[] {
|
||||
const firefoxArguments = ['--no-remote'];
|
||||
const firefoxArguments = [];
|
||||
switch (os.platform()) {
|
||||
case 'darwin':
|
||||
firefoxArguments.push('--foreground');
|
||||
|
@ -217,7 +217,7 @@ export class FirefoxLauncher extends ProductLauncher {
|
||||
userDataDir = null,
|
||||
} = options;
|
||||
|
||||
const firefoxArguments = ['--no-remote'];
|
||||
const firefoxArguments = [];
|
||||
|
||||
switch (os.platform()) {
|
||||
case 'darwin':
|
||||
|
@ -405,7 +405,6 @@ describe('Launcher specs', function () {
|
||||
);
|
||||
} else if (isFirefox) {
|
||||
expect(puppeteer.defaultArgs()).toContain('--headless');
|
||||
expect(puppeteer.defaultArgs()).toContain('--no-remote');
|
||||
if (os.platform() === 'darwin') {
|
||||
expect(puppeteer.defaultArgs()).toContain('--foreground');
|
||||
} else {
|
||||
@ -461,8 +460,8 @@ describe('Launcher specs', function () {
|
||||
const defaultArgs = puppeteer.defaultArgs();
|
||||
const {browser, close} = await launch(
|
||||
Object.assign({}, defaultBrowserOptions, {
|
||||
// Ignore first and third default argument.
|
||||
ignoreDefaultArgs: [defaultArgs[0]!, defaultArgs[2]],
|
||||
// Ignore the second default argument.
|
||||
ignoreDefaultArgs: [defaultArgs[1]],
|
||||
})
|
||||
);
|
||||
try {
|
||||
@ -470,9 +469,8 @@ describe('Launcher specs', function () {
|
||||
if (!spawnargs) {
|
||||
throw new Error('spawnargs not present');
|
||||
}
|
||||
expect(spawnargs.indexOf(defaultArgs[0]!)).toBe(-1);
|
||||
expect(spawnargs.indexOf(defaultArgs[1]!)).not.toBe(-1);
|
||||
expect(spawnargs.indexOf(defaultArgs[2]!)).toBe(-1);
|
||||
expect(spawnargs.indexOf(defaultArgs[0]!)).not.toBe(-1);
|
||||
expect(spawnargs.indexOf(defaultArgs[1]!)).toBe(-1);
|
||||
} finally {
|
||||
await close();
|
||||
}
|
||||
@ -485,8 +483,8 @@ describe('Launcher specs', function () {
|
||||
const defaultArgs = puppeteer.defaultArgs();
|
||||
const {browser, close} = await launch(
|
||||
Object.assign({}, defaultBrowserOptions, {
|
||||
// Only the first argument is fixed, others are optional.
|
||||
ignoreDefaultArgs: [defaultArgs[0]!],
|
||||
// All arguments are optional.
|
||||
ignoreDefaultArgs: [],
|
||||
})
|
||||
);
|
||||
try {
|
||||
@ -494,8 +492,7 @@ describe('Launcher specs', function () {
|
||||
if (!spawnargs) {
|
||||
throw new Error('spawnargs not present');
|
||||
}
|
||||
expect(spawnargs.indexOf(defaultArgs[0]!)).toBe(-1);
|
||||
expect(spawnargs.indexOf(defaultArgs[1]!)).not.toBe(-1);
|
||||
expect(spawnargs.indexOf(defaultArgs[0]!)).not.toBe(-1);
|
||||
} finally {
|
||||
await close();
|
||||
}
|
||||
|
@ -369,7 +369,6 @@ def mozharness_test_on_generic_worker(config, job, taskdesc):
|
||||
"artifact-reference": "<build/public/build/mozharness.zip>"
|
||||
},
|
||||
"MOZILLA_BUILD_URL": {"task-reference": installer},
|
||||
"MOZ_NO_REMOTE": "1",
|
||||
"NEED_XVFB": "false",
|
||||
"XPCOM_DEBUG_BREAK": "warn",
|
||||
"NO_FAIL_ON_TEST_ERRORS": "1",
|
||||
|
@ -400,7 +400,7 @@ class GeckoInstance(object):
|
||||
args = {
|
||||
"binary": self.binary,
|
||||
"profile": self.profile,
|
||||
"cmdargs": ["-no-remote", "-marionette"] + self.app_args,
|
||||
"cmdargs": ["-marionette"] + self.app_args,
|
||||
"env": env,
|
||||
"symbols_path": self.symbols_path,
|
||||
"process_args": process_args,
|
||||
|
@ -365,7 +365,7 @@ class MochiRemote(MochitestDesktop):
|
||||
profileDirectory = self.remoteProfile + "/"
|
||||
args = []
|
||||
args.extend(extraArgs)
|
||||
args.extend(("-no-remote", "-profile", profileDirectory))
|
||||
args.extend(("-profile", profileDirectory))
|
||||
|
||||
pid = rpm.launch(
|
||||
app,
|
||||
|
@ -38,9 +38,6 @@ class GeckoRuntimeRunner(BaseRunner):
|
||||
# its execution.
|
||||
self.cmdargs.append("--wait-for-browser")
|
||||
|
||||
# allows you to run an instance of Firefox separately from any other instances
|
||||
self.env["MOZ_NO_REMOTE"] = "1"
|
||||
|
||||
# Disable crash reporting dialogs that interfere with debugging
|
||||
self.env["GNOME_DISABLE_CRASH_DIALOG"] = "1"
|
||||
self.env["XRE_NO_WINDOWS_CRASH_DIALOG"] = "1"
|
||||
|
@ -160,12 +160,9 @@ impl FirefoxRunner {
|
||||
/// i.e. _/Applications/Firefox.app_, as well as to an executable program
|
||||
/// such as _/Applications/Firefox.app/Content/MacOS/firefox_.
|
||||
pub fn new(path: &Path, profile: Option<Profile>) -> FirefoxRunner {
|
||||
let mut envs: HashMap<OsString, OsString> = HashMap::new();
|
||||
envs.insert("MOZ_NO_REMOTE".into(), "1".into());
|
||||
|
||||
FirefoxRunner {
|
||||
path: path.to_path_buf(),
|
||||
envs,
|
||||
envs: HashMap::new(),
|
||||
profile,
|
||||
args: vec![],
|
||||
stdout: None,
|
||||
|
@ -158,12 +158,6 @@ def run_tests(config, browser_config):
|
||||
else:
|
||||
browser_config["extra_args"] = []
|
||||
|
||||
# pass --no-remote to firefox launch, if --develop is specified
|
||||
# we do that to allow locally the user to have another running firefox
|
||||
# instance
|
||||
if browser_config["develop"]:
|
||||
browser_config["extra_args"].append("--no-remote")
|
||||
|
||||
# Pass subtests filter argument via a preference
|
||||
if browser_config["subtests"]:
|
||||
browser_config["preferences"]["talos.subtests"] = browser_config["subtests"]
|
||||
|
@ -49,7 +49,6 @@ class TPSTestRunner(object):
|
||||
"MOZ_CRASHREPORTER_DISABLE": "1",
|
||||
"GNOME_DISABLE_CRASH_DIALOG": "1",
|
||||
"XRE_NO_WINDOWS_CRASH_DIALOG": "1",
|
||||
"MOZ_NO_REMOTE": "1",
|
||||
"XPCOM_DEBUG_BREAK": "warn",
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ add_task(async function test_backgroundtask_automatic_restart() {
|
||||
|
||||
// Test restart functionality.
|
||||
let exitCode = await do_backgroundtask("automaticrestart", {
|
||||
extraArgs: [`-no-wait`, path, `-attach-console`, `-no-remote`],
|
||||
extraArgs: [`-no-wait`, path, `-attach-console`],
|
||||
onStdoutLine: line => stdoutLines.push(line),
|
||||
});
|
||||
Assert.equal(0, exitCode);
|
||||
|
@ -4439,8 +4439,6 @@ function createAppInfo(aID, aName, aVersion, aPlatformVersion) {
|
||||
* would otherwise pollute the xpcshell log.
|
||||
*
|
||||
* Command line arguments used when launching the application:
|
||||
* -no-remote prevents shell integration from being affected by an existing
|
||||
* application process.
|
||||
* -test-process-updates makes the application exit after being relaunched by
|
||||
* the updater.
|
||||
* the platform specific string defined by PIPE_TO_NULL to output both stdout
|
||||
@ -4481,7 +4479,7 @@ function getProcessArgs(aExtraArgs) {
|
||||
scriptContents += "export XRE_PROFILE_PATH=" + profilePath + "\n";
|
||||
scriptContents +=
|
||||
appBinPath +
|
||||
" -no-remote -test-process-updates " +
|
||||
" -test-process-updates " +
|
||||
aExtraArgs.join(" ") +
|
||||
" " +
|
||||
PIPE_TO_NULL;
|
||||
@ -4498,7 +4496,6 @@ function getProcessArgs(aExtraArgs) {
|
||||
appBinPath,
|
||||
"-profile",
|
||||
profilePath,
|
||||
"-no-remote",
|
||||
"-test-process-updates",
|
||||
"-wait-for-browser",
|
||||
]
|
||||
|
@ -318,7 +318,6 @@ extern const char gToolkitBuildID[];
|
||||
static nsIProfileLock* gProfileLock;
|
||||
#if defined(MOZ_HAS_REMOTE)
|
||||
static nsRemoteService* gRemoteService;
|
||||
bool gRestartWithoutRemote = false;
|
||||
#endif
|
||||
|
||||
int gRestartArgc;
|
||||
@ -2096,8 +2095,6 @@ static void DumpHelp() {
|
||||
" --origin-to-force-quic-on <origin>\n"
|
||||
" Force to use QUIC for the specified origin.\n"
|
||||
#ifdef MOZ_HAS_REMOTE
|
||||
" --no-remote Do not accept or send remote commands; implies\n"
|
||||
" --new-instance.\n"
|
||||
" --new-instance Open new instance, not a new window in running "
|
||||
"instance.\n"
|
||||
#endif
|
||||
@ -2517,12 +2514,6 @@ nsresult LaunchChild(bool aBlankCommandLine, bool aTryExec) {
|
||||
gRestartArgv[gRestartArgc] = nullptr;
|
||||
}
|
||||
|
||||
#if defined(MOZ_HAS_REMOTE)
|
||||
if (gRestartWithoutRemote) {
|
||||
SaveToEnv("MOZ_NO_REMOTE=1");
|
||||
}
|
||||
#endif
|
||||
|
||||
SaveToEnv("MOZ_LAUNCHED_CHILD=1");
|
||||
#if defined(MOZ_LAUNCHER_PROCESS)
|
||||
SaveToEnv("MOZ_LAUNCHER_PROCESS=1");
|
||||
@ -3705,7 +3696,6 @@ class XREMain {
|
||||
nsAutoCString mOriginToForceQUIC;
|
||||
#if defined(MOZ_HAS_REMOTE)
|
||||
bool mDisableRemoteClient = false;
|
||||
bool mDisableRemoteServer = false;
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -4333,20 +4323,12 @@ int XREMain::XRE_mainInit(bool* aExitFlag) {
|
||||
CrashReporter::RegisterAnnotationBool(CrashReporter::Annotation::SafeMode,
|
||||
&gSafeMode);
|
||||
|
||||
#if defined(MOZ_HAS_REMOTE)
|
||||
// Handle --no-remote and --new-instance command line arguments. Setup
|
||||
// the environment to better accommodate other components and various
|
||||
// restart scenarios.
|
||||
ar = CheckArg("no-remote");
|
||||
if (ar == ARG_FOUND || EnvHasValue("MOZ_NO_REMOTE")) {
|
||||
mDisableRemoteClient = true;
|
||||
mDisableRemoteServer = true;
|
||||
gRestartWithoutRemote = true;
|
||||
// We don't want to propagate MOZ_NO_REMOTE to potential child
|
||||
// process.
|
||||
SaveToEnv("MOZ_NO_REMOTE=");
|
||||
}
|
||||
// Strip the now unsupported no-remote command line argument.
|
||||
CheckArg("no-remote");
|
||||
|
||||
#if defined(MOZ_HAS_REMOTE)
|
||||
// Handle the --new-instance command line arguments. Setup the environment to
|
||||
// better accommodate other components and various restart scenarios.
|
||||
ar = CheckArg("new-instance");
|
||||
if (ar == ARG_FOUND || EnvHasValue("MOZ_NEW_INSTANCE")) {
|
||||
mDisableRemoteClient = true;
|
||||
@ -4354,7 +4336,6 @@ int XREMain::XRE_mainInit(bool* aExitFlag) {
|
||||
#else
|
||||
// These arguments do nothing in platforms with no remoting support but we
|
||||
// should remove them from the command line anyway.
|
||||
CheckArg("no-remote");
|
||||
CheckArg("new-instance");
|
||||
#endif
|
||||
|
||||
@ -4737,7 +4718,6 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
|
||||
#ifdef MOZ_HAS_REMOTE
|
||||
if (gfxPlatform::IsHeadless()) {
|
||||
mDisableRemoteClient = true;
|
||||
mDisableRemoteServer = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -4858,7 +4838,7 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
|
||||
#if defined(MOZ_HAS_REMOTE)
|
||||
// handle --remote now that xpcom is fired up
|
||||
mRemoteService = new nsRemoteService(gAppData->remotingName);
|
||||
if (mRemoteService && !mDisableRemoteServer) {
|
||||
if (mRemoteService) {
|
||||
mRemoteService->LockStartup();
|
||||
gRemoteService = mRemoteService;
|
||||
}
|
||||
@ -5721,7 +5701,7 @@ nsresult XREMain::XRE_mainRun() {
|
||||
#if defined(MOZ_HAS_REMOTE)
|
||||
// if we have X remote support, start listening for requests on the
|
||||
// proxy window.
|
||||
if (mRemoteService && !mDisableRemoteServer) {
|
||||
if (mRemoteService) {
|
||||
mRemoteService->StartupServer();
|
||||
mRemoteService->UnlockStartup();
|
||||
gRemoteService = nullptr;
|
||||
@ -6065,7 +6045,7 @@ int XREMain::XRE_main(int argc, char* argv[], const BootstrapConfig& aConfig) {
|
||||
// Shut down the remote service. We must do this before calling LaunchChild
|
||||
// if we're restarting because otherwise the new instance will attempt to
|
||||
// remote to this instance.
|
||||
if (mRemoteService && !mDisableRemoteServer) {
|
||||
if (mRemoteService) {
|
||||
mRemoteService->ShutdownServer();
|
||||
}
|
||||
#endif /* MOZ_WIDGET_GTK */
|
||||
|
@ -238,7 +238,6 @@ function run_test() {
|
||||
|
||||
let testTry = function testTry() {
|
||||
let shell = wrapLaunchInShell(getFirefoxExecutableFile(), [
|
||||
"-no-remote",
|
||||
"-test-launch-without-hang",
|
||||
]);
|
||||
info("Try attempt #" + triesStarted);
|
||||
|
Loading…
x
Reference in New Issue
Block a user