Take options object in process.crashReporter.start
This commit is contained in:
parent
1f07cf2545
commit
91f8d6092b
5 changed files with 35 additions and 28 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "atom/common/atom_version.h"
|
||||
|
@ -157,28 +156,14 @@ void AtomBindings::Log(const base::string16& message) {
|
|||
std::cout << message << std::flush;
|
||||
}
|
||||
|
||||
// static
|
||||
void AtomBindings::Crash() {
|
||||
static_cast<DummyClass*>(nullptr)->crash = true;
|
||||
}
|
||||
|
||||
void AtomBindings::StartCrashReporter(
|
||||
const std::string& product_name,
|
||||
const std::string& company_name,
|
||||
const std::string& submit_url,
|
||||
const std::string& tmp_path,
|
||||
const std::map<std::string, std::string>& extra_parameters) {
|
||||
auto all_parameters = extra_parameters;
|
||||
all_parameters["_productName"] = product_name;
|
||||
all_parameters["_companyName"] = company_name;
|
||||
|
||||
auto reporter = crash_reporter::CrashReporter::GetInstance();
|
||||
reporter->Start(product_name,
|
||||
company_name,
|
||||
submit_url,
|
||||
base::FilePath(tmp_path),
|
||||
true,
|
||||
false,
|
||||
all_parameters);
|
||||
// static
|
||||
void AtomBindings::StartCrashReporter(const mate::Dictionary& options) {
|
||||
crash_reporter::CrashReporter::GetInstance()->StartWithOptions(options);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
#define ATOM_COMMON_API_ATOM_BINDINGS_H_
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "base/strings/string16.h"
|
||||
#include "native_mate/dictionary.h"
|
||||
#include "v8/include/v8.h"
|
||||
#include "vendor/node/deps/uv/include/uv.h"
|
||||
|
||||
|
@ -31,12 +30,7 @@ class AtomBindings {
|
|||
|
||||
static void Log(const base::string16& message);
|
||||
static void Crash();
|
||||
static void StartCrashReporter(
|
||||
const std::string& product_name,
|
||||
const std::string& company_name,
|
||||
const std::string& submit_url,
|
||||
const std::string& tmp_path,
|
||||
const std::map<std::string, std::string>& extra_parameters);
|
||||
static void StartCrashReporter(const mate::Dictionary& options);
|
||||
|
||||
private:
|
||||
void ActivateUVLoop(v8::Isolate* isolate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue