Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: chrome/app/client_util.cc

Issue 944283002: Consume EXCEPTION_INVALID_HANDLE on sandbox process shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: only eat exceptions on win10 Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/crash/app/breakpad_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <windows.h> 5 #include <windows.h>
6 #include <shlwapi.h> 6 #include <shlwapi.h>
7 7
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 if (!dll_) 228 if (!dll_)
229 return chrome::RESULT_CODE_MISSING_DATA; 229 return chrome::RESULT_CODE_MISSING_DATA;
230 230
231 scoped_ptr<base::Environment> env(base::Environment::Create()); 231 scoped_ptr<base::Environment> env(base::Environment::Create());
232 env->SetVar(chrome::kChromeVersionEnvVar, base::WideToUTF8(version)); 232 env->SetVar(chrome::kChromeVersionEnvVar, base::WideToUTF8(version));
233 233
234 OnBeforeLaunch(process_type_, file); 234 OnBeforeLaunch(process_type_, file);
235 DLL_MAIN chrome_main = 235 DLL_MAIN chrome_main =
236 reinterpret_cast<DLL_MAIN>(::GetProcAddress(dll_, "ChromeMain")); 236 reinterpret_cast<DLL_MAIN>(::GetProcAddress(dll_, "ChromeMain"));
237 int rc = chrome_main(instance, &sandbox_info); 237 int rc = chrome_main(instance, &sandbox_info);
238 return OnBeforeExit(rc, file); 238 rc = OnBeforeExit(rc, file);
239 // Sandboxed processes close some system DLL handles after lockdown so ignore
240 // EXCEPTION_INVALID_HANDLE generated on Windows 10 during shutdown of these
241 // processes.
242 // TODO(wfh): Check whether MS have fixed this in Win10 RTM. crbug.com/456193
243 if (base::win::GetVersion() >= base::win::VERSION_WIN10)
244 breakpad::ConsumeInvalidHandleExceptions();
245 return rc;
239 } 246 }
240 247
241 void MainDllLoader::RelaunchChromeBrowserWithNewCommandLineIfNeeded() { 248 void MainDllLoader::RelaunchChromeBrowserWithNewCommandLineIfNeeded() {
242 if (!dll_) 249 if (!dll_)
243 return; 250 return;
244 251
245 RelaunchChromeBrowserWithNewCommandLineIfNeededFunc relaunch_function = 252 RelaunchChromeBrowserWithNewCommandLineIfNeededFunc relaunch_function =
246 reinterpret_cast<RelaunchChromeBrowserWithNewCommandLineIfNeededFunc>( 253 reinterpret_cast<RelaunchChromeBrowserWithNewCommandLineIfNeededFunc>(
247 ::GetProcAddress(dll_, 254 ::GetProcAddress(dll_,
248 "RelaunchChromeBrowserWithNewCommandLineIfNeeded")); 255 "RelaunchChromeBrowserWithNewCommandLineIfNeeded"));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 311 }
305 }; 312 };
306 313
307 MainDllLoader* MakeMainDllLoader() { 314 MainDllLoader* MakeMainDllLoader() {
308 #if defined(GOOGLE_CHROME_BUILD) 315 #if defined(GOOGLE_CHROME_BUILD)
309 return new ChromeDllLoader(); 316 return new ChromeDllLoader();
310 #else 317 #else
311 return new ChromiumDllLoader(); 318 return new ChromiumDllLoader();
312 #endif 319 #endif
313 } 320 }
OLDNEW
« no previous file with comments | « no previous file | components/crash/app/breakpad_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698