diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-16 22:19:46 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-16 22:19:46 +0000 |
commit | 4c2dee230417b865c089baef8792fe87ca911409 (patch) | |
tree | 5d80b37e94dbf44af854e399ccc60cf9918be695 /win8 | |
parent | a025b2f079c2e6bc3f734d1a650ac81e100ce7bc (diff) | |
download | chromium_src-4c2dee230417b865c089baef8792fe87ca911409.zip chromium_src-4c2dee230417b865c089baef8792fe87ca911409.tar.gz chromium_src-4c2dee230417b865c089baef8792fe87ca911409.tar.bz2 |
Fix a crash seen at times when chrome in desktop mode attempts to activate Chrome in Windows 8 mode. The crash
occurs because we attempt to initiate a navigation when there are no frame windows registered with the metro driver.
Fix is to ignore the navigation request in this case.
I also updated the ChromeUrlLaunchHandler::GetUrlFromLaunchArgs function to return the chrome://newtab url if the verb
coming in is opennewwindow. This should address bug http://code.google.com/p/chromium/issues/detail?id=135122
BUG=155281,135122
R=cpu
Review URL: https://codereview.chromium.org/11193007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162269 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'win8')
-rw-r--r-- | win8/metro_driver/chrome_url_launch_handler.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/win8/metro_driver/chrome_url_launch_handler.cc b/win8/metro_driver/chrome_url_launch_handler.cc index 7a9a607..897276a 100644 --- a/win8/metro_driver/chrome_url_launch_handler.cc +++ b/win8/metro_driver/chrome_url_launch_handler.cc @@ -102,6 +102,10 @@ void ChromeUrlLaunchHandler::HandleProtocolLaunch( // are encoded in |launch_args| they are ignored. string16 ChromeUrlLaunchHandler::GetUrlFromLaunchArgs( const string16& launch_args) { + if (launch_args == L"opennewwindow") { + VLOG(1) << "Returning new tab url"; + return L"chrome://newtab"; + } string16 dummy_command_line(L"dummy.exe "); dummy_command_line.append(launch_args); CommandLine command_line = CommandLine::FromString(dummy_command_line); @@ -179,6 +183,11 @@ void ChromeUrlLaunchHandler::InitiateNavigationOrSearchRequest( DVLOG(1) << (url ? url : L"NULL url"); DVLOG(1) << (search_string ? search_string : L"NULL search string"); + if (globals.host_windows.empty()) { + DVLOG(1) << "No chrome windows registered. Ignoring nav request"; + return; + } + // Custom registered message to navigate or search in chrome. WPARAM // points to the URL and LPARAM contains the search string. They are // mutually exclusive. |