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

Unified Diff: chrome_frame/crash_reporting/crash_dll.cc

Issue 126143005: Remove Chrome Frame code and resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to r244038 Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome_frame/crash_reporting/crash_dll.h ('k') | chrome_frame/crash_reporting/crash_metrics.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/crash_reporting/crash_dll.cc
diff --git a/chrome_frame/crash_reporting/crash_dll.cc b/chrome_frame/crash_reporting/crash_dll.cc
deleted file mode 100644
index 0fc1048fd2be69388a7cce562f476c777a256420..0000000000000000000000000000000000000000
--- a/chrome_frame/crash_reporting/crash_dll.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Main entry point for a DLL that can be instructed to crash on
-// load or unload by setting an environment variable appropriately.
-//
-// Note: This code has no CRT to lean on, because some versions of the CRT
-// have a bug whereby they leave dangling state after taking an exception
-// during DLL_PROCESS_ATTACH. This in turn causes the loading process to
-// crash on exit. To work around this, this DLL has its entrypoint set
-// to the DllMain routine and does not link with the CRT.
-
-#include <windows.h>
-
-#include "crash_dll.h"
-
-void Crash() {
- char* null_pointer = reinterpret_cast<char*>(kCrashAddress);
-
- *null_pointer = '\0';
-}
-
-void CrashConditionally(const wchar_t* name) {
- wchar_t value[1024];
- DWORD ret = ::GetEnvironmentVariable(name, value, ARRAYSIZE(value));
- if (ret != 0 || ERROR_ENVVAR_NOT_FOUND != ::GetLastError())
- Crash();
-}
-
-extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason,
- LPVOID reserved) {
- if (reason == DLL_PROCESS_ATTACH)
- CrashConditionally(kCrashOnLoadMode);
- else if (reason == DLL_PROCESS_DETACH)
- CrashConditionally(kCrashOnUnloadMode);
-
- return 1;
-}
« no previous file with comments | « chrome_frame/crash_reporting/crash_dll.h ('k') | chrome_frame/crash_reporting/crash_metrics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698