bug 961157. Don't append "metrobrowser" to our command lines. Don't expect "metrobrowser" on our command lines. r=jimm

This commit is contained in:
Tim Abraldes 2014-01-30 12:29:12 -08:00
Родитель c073614078
Коммит 25eb38555a
2 изменённых файлов: 12 добавлений и 5 удалений

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

@ -747,7 +747,7 @@ var Browser = {
Services.metro.pinTileAsync(this._currentPageTileID,
Browser.selectedBrowser.contentTitle, // short name
Browser.selectedBrowser.contentTitle, // display name
"metrobrowser -url " + Browser.selectedBrowser.currentURI.spec,
"-url " + Browser.selectedBrowser.currentURI.spec,
uriSpec, uriSpec);
},

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

@ -104,8 +104,8 @@ FrameworkView::LaunchActivated(ComPtr<ILaunchActivatedEventArgs>& aArgs, bool aS
int argc;
unsigned int length;
LPWSTR* argv = CommandLineToArgvW(data.GetRawBuffer(&length), &argc);
if (aStartup && argc == 3 && !wcsicmp(argv[1], L"-url")) {
mActivationURI = argv[2];
if (aStartup && argc == 2 && !wcsicmp(argv[0], L"-url")) {
mActivationURI = argv[1];
} else {
// Some other command line or this is not a startup.
// If it is startup we process it later when XPCOM is initialilzed.
@ -273,7 +273,11 @@ FrameworkView::PerformURILoad(HString& aURI)
}
nsAutoCString utf8data(NS_ConvertUTF16toUTF8(aURI.GetRawBuffer(&length)));
const char *argv[] = { "metrobrowser",
// NB: The first argument gets stripped by nsICommandLineRunner::Init,
// so it doesn't matter what we pass as the first argument, but we
// have to pass something.
const char *argv[] = { "", // This argument gets stripped
"-url",
utf8data.BeginReading() };
nsresult rv = cmdLine->Init(ArrayLength(argv),
@ -304,7 +308,10 @@ FrameworkView::PerformSearch(HString& aQuery)
parameter.Append(NS_ConvertUTF16toUTF8(aQuery.GetRawBuffer(&length)));
parameter.AppendLiteral("\"");
const char *argv[] = { "metrobrowser",
// NB: The first argument gets stripped by nsICommandLineRunner::Init,
// so it doesn't matter what we pass as the first argument, but we
// have to pass something.
const char *argv[] = { "", // This argument gets stripped
"-search",
parameter.BeginReading() };
nsresult rv = cmdLine->Init(ArrayLength(argv),