remove setExtraParameter for 2.0
This commit is contained in:
parent
459a5e3a1f
commit
fc025064f7
3 changed files with 1 additions and 20 deletions
|
@ -31,15 +31,6 @@ struct Converter<CrashReporter::UploadReportResult> {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
// TODO(2.0) Remove
|
|
||||||
void SetExtraParameter(const std::string& key, mate::Arguments* args) {
|
|
||||||
std::string value;
|
|
||||||
if (args->GetNext(&value))
|
|
||||||
CrashReporter::GetInstance()->AddExtraParameter(key, value);
|
|
||||||
else
|
|
||||||
CrashReporter::GetInstance()->RemoveExtraParameter(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AddExtraParameter(const std::string& key, const std::string& value) {
|
void AddExtraParameter(const std::string& key, const std::string& value) {
|
||||||
CrashReporter::GetInstance()->AddExtraParameter(key, value);
|
CrashReporter::GetInstance()->AddExtraParameter(key, value);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +48,6 @@ void Initialize(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
|
||||||
mate::Dictionary dict(context->GetIsolate(), exports);
|
mate::Dictionary dict(context->GetIsolate(), exports);
|
||||||
auto reporter = base::Unretained(CrashReporter::GetInstance());
|
auto reporter = base::Unretained(CrashReporter::GetInstance());
|
||||||
dict.SetMethod("start", base::Bind(&CrashReporter::Start, reporter));
|
dict.SetMethod("start", base::Bind(&CrashReporter::Start, reporter));
|
||||||
dict.SetMethod("setExtraParameter", &SetExtraParameter);
|
|
||||||
dict.SetMethod("addExtraParameter", &AddExtraParameter);
|
dict.SetMethod("addExtraParameter", &AddExtraParameter);
|
||||||
dict.SetMethod("removeExtraParameter", &RemoveExtraParameter);
|
dict.SetMethod("removeExtraParameter", &RemoveExtraParameter);
|
||||||
dict.SetMethod("getParameters", &GetParameters);
|
dict.SetMethod("getParameters", &GetParameters);
|
||||||
|
|
|
@ -62,7 +62,7 @@ This will start the process that will monitor and send the crash reports. Replac
|
||||||
and `crashesDirectory` with appropriate values.
|
and `crashesDirectory` with appropriate values.
|
||||||
|
|
||||||
**Note:** If you need send additional/updated `extra` parameters after your
|
**Note:** If you need send additional/updated `extra` parameters after your
|
||||||
first call `start` you can call `setExtraParameter` on macOS or call `start`
|
first call `start` you can call `addExtraParameter` on macOS or call `start`
|
||||||
again with the new/updated `extra` parameters on Linux and Windows.
|
again with the new/updated `extra` parameters on Linux and Windows.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
|
@ -104,15 +104,6 @@ class CrashReporter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(2.0) Remove
|
|
||||||
setExtraParameter (key, value) {
|
|
||||||
if (!process.noDeprecations) {
|
|
||||||
deprecate.warn('crashReporter.setExtraParameter',
|
|
||||||
'crashReporter.addExtraParameter or crashReporter.removeExtraParameter')
|
|
||||||
}
|
|
||||||
binding.setExtraParameter(key, value)
|
|
||||||
}
|
|
||||||
|
|
||||||
addExtraParameter (key, value) {
|
addExtraParameter (key, value) {
|
||||||
binding.addExtraParameter(key, value)
|
binding.addExtraParameter(key, value)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue