diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 057c4b56b711..08d2c6ceb2fd 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -851,7 +851,9 @@ class RunProgram(MachCommandBase): if not background and sys.platform == 'darwin': args.append('-foreground') - if '-profile' not in params and '-P' not in params and not noprofile: + no_profile_option_given = \ + all(p not in params for p in ['-profile', '--profile', '-P']) + if no_profile_option_given and not noprofile: path = os.path.join(self.topobjdir, 'tmp', 'scratch_user') if not os.path.isdir(path): os.makedirs(path) diff --git a/toolkit/xre/nsNativeAppSupportWin.cpp b/toolkit/xre/nsNativeAppSupportWin.cpp index d8f7155ab6b3..49d758904084 100644 --- a/toolkit/xre/nsNativeAppSupportWin.cpp +++ b/toolkit/xre/nsNativeAppSupportWin.cpp @@ -334,8 +334,8 @@ NS_IMPL_RELEASE_INHERITED(nsNativeAppSupportWin, nsNativeAppSupportBase) void nsNativeAppSupportWin::CheckConsole() { for ( int i = 1; i < gArgc; i++ ) { - if ( strcmp( "-console", gArgv[i] ) == 0 - || + if ( strcmp( "-console", gArgv[i] ) == 0 || + strcmp( "--console", gArgv[i] ) == 0 || strcmp( "/console", gArgv[i] ) == 0 ) { // Users wants to make sure we have a console. // Try to allocate one. diff --git a/webapprt/gtk/webapprt.cpp b/webapprt/gtk/webapprt.cpp index 3ea1f41b01b1..a8487485ec92 100644 --- a/webapprt/gtk/webapprt.cpp +++ b/webapprt/gtk/webapprt.cpp @@ -327,10 +327,10 @@ int main(int argc, char *argv[]) bool removeApp = false; for (int i = 1; i < argc; i++) { - if (!strcmp(argv[i], "-profile")) { + if (!strcmp(argv[i], "-profile") || !strcmp(argv[i], "--profile")) { isProfileOverridden = true; } - else if (!strcmp(argv[i], "-remove")) { + else if (!strcmp(argv[i], "-remove") || !strcmp(argv[i], "--remove")) { removeApp = true; } } diff --git a/webapprt/win/webapprt.cpp b/webapprt/win/webapprt.cpp index 9b7c404ecdd2..fe9685930699 100644 --- a/webapprt/win/webapprt.cpp +++ b/webapprt/win/webapprt.cpp @@ -446,7 +446,9 @@ main(int argc, char* argv[]) // Check if the runtime was executed with the "-profile" argument for (int i = 1; i < argc; i++) { - if (!strcmp(argv[i], "-profile")) { + if (!strcmp(argv[i], "-profile") || + !strcmp(argv[i], "--profile") || + !strcmp(argv[i], "/profile")) { isProfileOverridden = true; break; } diff --git a/widget/windows/winrt/MetroContracts.cpp b/widget/windows/winrt/MetroContracts.cpp index 60118eda54e3..02697c0a63f1 100644 --- a/widget/windows/winrt/MetroContracts.cpp +++ b/widget/windows/winrt/MetroContracts.cpp @@ -103,7 +103,10 @@ FrameworkView::LaunchActivated(ComPtr& aArgs, bool aS int argc; unsigned int length; LPWSTR* argv = CommandLineToArgvW(data.GetRawBuffer(&length), &argc); - if (aStartup && argc == 2 && !wcsicmp(argv[0], L"-url")) { + if (aStartup && argc == 2 && + (!wcsicmp(argv[0], L"-url") || + !wcsicmp(argv[0], L"--url") || + !wcsicmp(argv[0], L"/url"))) { WindowsCreateString(argv[1], wcslen(argv[1]), &sActivationURI); } else { // Some other command line or this is not a startup.