aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/crash_generation/Inspector.h
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-10-05 21:58:10 +0000
committermark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-10-05 21:58:10 +0000
commit1e9dbde88a0f7cdcaba556a24fa468627d5c7e84 (patch)
tree7752ebf24d2f49ad82936ec68e257c5a58d99034 /src/client/mac/crash_generation/Inspector.h
parentUse a bootstrap subset port for the inspector, tying the subset to the (diff)
downloadbreakpad-1e9dbde88a0f7cdcaba556a24fa468627d5c7e84.tar.xz
Ensure crash reports will be uploaded on the Mac.
Regression from Breakpad r842 (Chromium r103778) - browser crash reports were uploaded, but renderer crash reports were not. Messages such as these may have been logged: com.apple.launchd.peruser.x[y] could not lookup DNS configuration info service: (ipc/send) invalid destination port com.apple.launchd.peruser.x[y] Breakpad Reporter: Send Error: Error Domain=NSURLErrorDomain Code=-1009 UserInfo=z "This computer’s Internet connection appears to be offline." Underlying Error=(Error Domain=kCFErrorDomainCFNetwork Code=-1009 UserInfo=w "This computer’s Internet connection appears to be offline.") When OnDemandServer establishes the bootstrap subset, it will now register the parent bootstrap port in the subset namespace so that the Inspector can recover this port and switch to it. The Sender, launched by the Inspector, relies on the bootstrap port being set properly. BUG=chromium:99252 TEST=All test cases from Chromium r103778 (bug chromium:28547) plus: about:crash should generate a crash report which should be uploaded, provided that throttling is not in effect. Remove or edit ~/Library/Preferences/com.Breakpad.crash_report_sender.plist to defeat throttling. Also verify that about:inducebrowsercrashforrealz works. Review URL: http://breakpad.appspot.com/307001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@843 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/crash_generation/Inspector.h')
-rw-r--r--src/client/mac/crash_generation/Inspector.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/client/mac/crash_generation/Inspector.h b/src/client/mac/crash_generation/Inspector.h
index 9d93b2a7..e6705819 100644
--- a/src/client/mac/crash_generation/Inspector.h
+++ b/src/client/mac/crash_generation/Inspector.h
@@ -33,6 +33,8 @@
#import "common/mac/SimpleStringDictionary.h"
#import <Foundation/Foundation.h>
+#include <mach/mach.h>
+
#import "client/mac/handler/minidump_generator.h"
#define VERBOSE 0
@@ -163,6 +165,18 @@ class Inspector {
void Inspect(const char *receive_port_name);
private:
+ // The Inspector is invoked with its bootstrap port set to the bootstrap
+ // subset established in OnDemandServer.mm OnDemandServer::Initialize.
+ // For proper communication with the system, the sender (which will inherit
+ // the Inspector's bootstrap port) needs the per-session bootstrap namespace
+ // available directly in its bootstrap port. OnDemandServer stashed this
+ // port into the subset namespace under a special name. ResetBootstrapPort
+ // recovers this port and switches this task to use it as its own bootstrap
+ // (ensuring that children like the sender will inherit it), and saves the
+ // subset in bootstrap_subset_port_ for use by ServiceCheckIn and
+ // ServiceCheckOut.
+ void ResetBootstrapPort();
+
kern_return_t ServiceCheckIn(const char *receive_port_name);
kern_return_t ServiceCheckOut(const char *receive_port_name);
@@ -174,6 +188,10 @@ class Inspector {
void SetCrashTimeParameters();
+ // The bootstrap port in which the inspector is registered and into which it
+ // must check in.
+ mach_port_t bootstrap_subset_port_;
+
mach_port_t service_rcv_port_;
int exception_type_;