Skip to content

Commit 314cdec

Browse files
committed
Mac: fix crash inspector & reporter app's location
1 parent 05a2391 commit 314cdec

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

src/breakpad_mac.mm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include "chrome/common/child_process_logging.h"
2727
#include "content/public/common/content_switches.h"
2828
#include "components/breakpad/breakpad_client.h"
29+
#include "content/nw/src/paths_mac.h"
2930
//#include "policy/policy_constants.h"
3031

3132
namespace {
@@ -182,19 +183,19 @@ void InitCrashReporter() {
182183
}
183184

184185
// Tell Breakpad where crash_inspector and crash_report_sender are.
185-
NSString* resource_path = [main_bundle resourcePath];
186+
NSString* resource_path = [[NSString alloc] initWithUTF8String:GetFrameworksPath().value().c_str()];
186187
NSString *inspector_location =
187188
[resource_path stringByAppendingPathComponent:@"crash_inspector"];
188189
NSString *reporter_bundle_location =
189190
[resource_path stringByAppendingPathComponent:@"crash_report_sender.app"];
190191
NSString *reporter_location =
191192
[[NSBundle bundleWithPath:reporter_bundle_location] executablePath];
193+
192194

193195
VLOG(1) << "resource_path: " << [resource_path UTF8String];
194196
VLOG(1) << "inspector_location: " << [inspector_location UTF8String];
195-
VLOG(1) << "reporter_location: " << [reporter_location UTF8String];
196197

197-
if (!inspector_location || !reporter_location) {
198+
if (!inspector_location) {
198199
VLOG_IF(1, is_browser && base::mac::AmIBundled()) << "Breakpad disabled";
199200
return;
200201
}

src/paths_mac.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ void OverrideChildProcessPath();
1616
// Gets the path to the content shell's pak file.
1717
base::FilePath GetResourcesPakFilePath();
1818

19+
base::FilePath GetFrameworksPath();
20+
1921
#endif // CONTENT_SHELL_PATHS_MAC_H_

src/paths_mac.mm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727

2828
using base::FilePath;
2929

30-
namespace {
31-
3230
FilePath GetFrameworksPath() {
3331
// Start out with the path to the running executable.
3432
FilePath path;
@@ -50,8 +48,6 @@ FilePath GetFrameworksPath() {
5048
return path.Append("Frameworks");
5149
}
5250

53-
} // namespace
54-
5551
void OverrideFrameworkBundlePath() {
5652
FilePath helper_path =
5753
GetFrameworksPath().Append("node-webkit Framework.framework");

0 commit comments

Comments
 (0)