mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-04-22 10:37:18 +08:00
Add API to set product name for crash reporter.
This commit is contained in:
@@ -14,26 +14,33 @@ namespace atom {
|
||||
namespace api {
|
||||
|
||||
// static
|
||||
v8::Handle<v8::Value> CrashReporter::SetCompanyName(const v8::Arguments &args) {
|
||||
v8::Handle<v8::Value> CrashReporter::SetProductName(const v8::Arguments& args) {
|
||||
crash_reporter::CrashReporter::SetProductName(FromV8Value(args[0]));
|
||||
return v8::Undefined();
|
||||
}
|
||||
|
||||
// static
|
||||
v8::Handle<v8::Value> CrashReporter::SetCompanyName(const v8::Arguments& args) {
|
||||
crash_reporter::CrashReporter::SetCompanyName(FromV8Value(args[0]));
|
||||
return v8::Undefined();
|
||||
}
|
||||
|
||||
// static
|
||||
v8::Handle<v8::Value> CrashReporter::SetSubmissionURL(
|
||||
const v8::Arguments &args) {
|
||||
const v8::Arguments& args) {
|
||||
crash_reporter::CrashReporter::SetSubmissionURL(FromV8Value(args[0]));
|
||||
return v8::Undefined();
|
||||
}
|
||||
|
||||
// static
|
||||
v8::Handle<v8::Value> CrashReporter::SetAutoSubmit(const v8::Arguments &args) {
|
||||
v8::Handle<v8::Value> CrashReporter::SetAutoSubmit(const v8::Arguments& args) {
|
||||
crash_reporter::CrashReporter::SetAutoSubmit(FromV8Value(args[0]));
|
||||
return v8::Undefined();
|
||||
}
|
||||
|
||||
// static
|
||||
void CrashReporter::Initialize(v8::Handle<v8::Object> target) {
|
||||
node::SetMethod(target, "setProductName", SetProductName);
|
||||
node::SetMethod(target, "setCompanyName", SetCompanyName);
|
||||
node::SetMethod(target, "setSubmissionUrl", SetSubmissionURL);
|
||||
node::SetMethod(target, "setAutoSubmit", SetAutoSubmit);
|
||||
|
||||
@@ -17,6 +17,7 @@ class CrashReporter {
|
||||
static void Initialize(v8::Handle<v8::Object> target);
|
||||
|
||||
private:
|
||||
static v8::Handle<v8::Value> SetProductName(const v8::Arguments &args);
|
||||
static v8::Handle<v8::Value> SetCompanyName(const v8::Arguments &args);
|
||||
static v8::Handle<v8::Value> SetSubmissionURL(const v8::Arguments &args);
|
||||
static v8::Handle<v8::Value> SetAutoSubmit(const v8::Arguments &args);
|
||||
|
||||
Reference in New Issue
Block a user