aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/Framework
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/Framework
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/Framework')
-rw-r--r--src/client/mac/Framework/OnDemandServer.mm15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/client/mac/Framework/OnDemandServer.mm b/src/client/mac/Framework/OnDemandServer.mm
index 03f54c44..f736abd4 100644
--- a/src/client/mac/Framework/OnDemandServer.mm
+++ b/src/client/mac/Framework/OnDemandServer.mm
@@ -86,6 +86,21 @@ kern_return_t OnDemandServer::Initialize(const char *server_command,
return kr;
}
+ // The inspector will be invoked with its bootstrap port set to the subset,
+ // but the sender will need access to the original bootstrap port. Although
+ // the original port is the subset's parent, bootstrap_parent can't be used
+ // because it requires extra privileges. Stash the original bootstrap port
+ // in the subset by registering it under a known name. The inspector will
+ // recover this port and set it as its own bootstrap port in Inspector.mm
+ // Inspector::ResetBootstrapPort.
+ kr = bootstrap_register(bootstrap_subset_port,
+ const_cast<char*>("BootstrapParentPort"),
+ bootstrap_port);
+ if (kr != KERN_SUCCESS) {
+ PRINT_BOOTSTRAP_RESULT(kr, "bootstrap_register(): ");
+ return kr;
+ }
+
kr = bootstrap_create_server(bootstrap_subset_port,
const_cast<char*>(server_command),
geteuid(), // server uid