summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync
diff options
context:
space:
mode:
authorlipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-28 02:57:24 +0000
committerlipalani@chromium.org <lipalani@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-28 02:57:24 +0000
commit0d64e0b36f68f8e837e1e74f362da6fa3f487995 (patch)
tree131f0f6f83178d663f3316333c7411cccbcdc754 /chrome/browser/sync
parentbe8b30dcb93ba02315d6ca619876cab531f75cd8 (diff)
downloadchromium_src-0d64e0b36f68f8e837e1e74f362da6fa3f487995.zip
chromium_src-0d64e0b36f68f8e837e1e74f362da6fa3f487995.tar.gz
chromium_src-0d64e0b36f68f8e837e1e74f362da6fa3f487995.tar.bz2
This patch achieves it without crashing the process. We create a new exception handler to handle non crash cases. This currently works only on windows.
BUG=100444 TEST=Trybots, manual testing. Review URL: http://codereview.chromium.org/8879061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115862 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync')
-rw-r--r--chrome/browser/sync/syncable/DEPS2
-rw-r--r--chrome/browser/sync/syncable/syncable.cc14
2 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/sync/syncable/DEPS b/chrome/browser/sync/syncable/DEPS
index fdf36f2..9946874 100644
--- a/chrome/browser/sync/syncable/DEPS
+++ b/chrome/browser/sync/syncable/DEPS
@@ -20,5 +20,7 @@ include_rules = [
"-chrome/browser/sync/internal_api",
"+chrome/browser/sync/internal_api/includes",
+
+ "+chrome/common/chrome_constants.h",
]
diff --git a/chrome/browser/sync/syncable/syncable.cc b/chrome/browser/sync/syncable/syncable.cc
index 41e7417..ab12057 100644
--- a/chrome/browser/sync/syncable/syncable.cc
+++ b/chrome/browser/sync/syncable/syncable.cc
@@ -13,6 +13,7 @@
#include <set>
#include <string>
+#include "base/basictypes.h"
#include "base/debug/trace_event.h"
#include "base/compiler_specific.h"
#include "base/debug/trace_event.h"
@@ -40,6 +41,7 @@
#include "chrome/browser/sync/syncable/syncable_enum_conversions.h"
#include "chrome/browser/sync/syncable/transaction_observer.h"
#include "chrome/browser/sync/util/logging.h"
+#include "chrome/common/chrome_constants.h"
#include "net/base/escape.h"
namespace {
@@ -1395,6 +1397,18 @@ void BaseTransaction::OnUnrecoverableError(
// Note: We dont call the Directory's OnUnrecoverableError method right
// away. Instead we wait to unwind the stack and in the destructor of the
// transaction we would call the OnUnrecoverableError method.
+
+ // TODO(lipalani): Add this for other platforms as well.
+#if defined(OS_WIN)
+ // Get the breakpad pointer from chrome.exe
+ typedef void (__cdecl *DumpProcessFunction)();
+ DumpProcessFunction DumpProcess = reinterpret_cast<DumpProcessFunction>(
+ ::GetProcAddress(::GetModuleHandle(
+ chrome::kBrowserProcessExecutableName),
+ "DumpProcessWithoutCrash"));
+ if (DumpProcess)
+ DumpProcess();
+#endif // OS_WIN
}
bool BaseTransaction::unrecoverable_error_set() const {