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

Side by Side Diff: chrome_elf/blacklist/blacklist.cc

Issue 154653002: Breakpad coverage for chrome_elf start up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More breakpad, less base Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome_elf/blacklist/blacklist.h" 5 #include "chrome_elf/blacklist/blacklist.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome_elf/blacklist/blacklist_interceptions.h" 10 #include "chrome_elf/blacklist/blacklist_interceptions.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 274 }
275 return false; 275 return false;
276 } 276 }
277 277
278 bool Initialize(bool force) { 278 bool Initialize(bool force) {
279 #if defined(_WIN64) 279 #if defined(_WIN64)
280 // TODO(robertshield): Implement 64-bit support by providing 64-bit 280 // TODO(robertshield): Implement 64-bit support by providing 64-bit
281 // interceptors. 281 // interceptors.
282 return false; 282 return false;
283 #endif 283 #endif
284
285 // Check to see that we found the functions we need in ntdll. 284 // Check to see that we found the functions we need in ntdll.
286 if (!InitializeInterceptImports()) 285 if (!InitializeInterceptImports())
287 return false; 286 return false;
288 287
289 // Check to see if this is a non-browser process, abort if so. 288 // Check to see if this is a non-browser process, abort if so.
290 if (IsNonBrowserProcess()) 289 if (IsNonBrowserProcess())
291 return false; 290 return false;
292 291
293 // Check to see if a beacon is present, abort if so. 292 // Check to see if a beacon is present, abort if so.
294 if (!force && !LeaveSetupBeacon()) 293 if (!force && !LeaveSetupBeacon())
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 sizeof(sandbox::ThunkData), 345 sizeof(sandbox::ThunkData),
347 NULL); 346 NULL);
348 347
349 delete thunk; 348 delete thunk;
350 349
351 // Mark the thunk storage as executable and prevent any future writes to it. 350 // Mark the thunk storage as executable and prevent any future writes to it.
352 BOOL page_executable = VirtualProtect(&g_thunk_storage, 351 BOOL page_executable = VirtualProtect(&g_thunk_storage,
353 sizeof(g_thunk_storage), 352 sizeof(g_thunk_storage),
354 PAGE_EXECUTE_READ, 353 PAGE_EXECUTE_READ,
355 &old_protect); 354 &old_protect);
356
357 return NT_SUCCESS(ret) && page_executable; 355 return NT_SUCCESS(ret) && page_executable;
358 } 356 }
359 357
360 } // namespace blacklist 358 } // namespace blacklist
OLDNEW
« no previous file with comments | « chrome_elf/DEPS ('k') | chrome_elf/breakpad.h » ('j') | chrome_elf/breakpad.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698