Skip to content

Commit 773b457

Browse files
committed
API: App.setCrashDumpDir
1 parent cbf713d commit 773b457

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/api/app/app.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "base/message_loop/message_loop.h"
2626
#include "base/values.h"
2727
#include "content/nw/src/api/api_messages.h"
28+
#include "content/nw/src/breakpad_linux.h"
2829
#include "content/nw/src/browser/native_window.h"
2930
#include "content/nw/src/browser/net_disk_cache_remover.h"
3031
#include "content/nw/src/nw_package.h"
@@ -120,6 +121,10 @@ void App::Call(Shell* shell,
120121
} else if (method == "GetPackage") {
121122
result->AppendString(shell->GetPackage()->package_string());
122123
return;
124+
} else if (method == "SetCrashDumpDir") {
125+
std::string path;
126+
arguments.GetString(0, &path);
127+
result->AppendBoolean(SetCrashDumpPath(path.c_str()));
123128
}
124129

125130
NOTREACHED() << "Calling unknown sync method " << method << " of App";

src/api/app/app.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ App.prototype.crashRenderer = function() {
4747
nw.crashRenderer();
4848
}
4949

50+
App.prototype.setCrashDumpDir = function(dir) {
51+
return nw.callStaticMethodSync('App', 'SetCrashDumpDir', [ dir ]);
52+
}
53+
5054
App.prototype.clearCache = function() {
5155
nw.callStaticMethodSync('App', 'ClearCache', [ ]);
5256
}

0 commit comments

Comments
 (0)