if (waiting_event != INVALID_HANDLE_VALUE)
WaitForSingleObject(waiting_event, 1000);
- google_breakpad::CustomClientInfo custom_info = { NULL, 0 };
breakpad_.reset(new google_breakpad::ExceptionHandler(
temp_dir.value(),
FilterCallback,
google_breakpad::ExceptionHandler::HANDLER_ALL,
kSmallDumpType,
pipe_name.c_str(),
- &custom_info));
+ GetCustomInfo(product_name, version, company_name)));
if (!breakpad_->IsOutOfProcess())
LOG(ERROR) << "Cannot initialize out-of-process crash handler";
return false;
}
+google_breakpad::CustomClientInfo* CrashReporterWin::GetCustomInfo(
+ const std::string& product_name,
+ const std::string& version,
+ const std::string& company_name) {
+ custom_info_entries_.clear();
+ custom_info_entries_.reserve(2 + upload_parameters_.size());
+
+ custom_info_entries_.push_back(google_breakpad::CustomInfoEntry(
+ L"prod", UTF8ToWide(product_name).c_str()));
+ custom_info_entries_.push_back(google_breakpad::CustomInfoEntry(
+ L"ver", UTF8ToWide(version).c_str()));
+
+ for (StringMap::const_iterator iter = upload_parameters_.begin();
+ iter != upload_parameters_.end(); ++iter) {
+ custom_info_entries_.push_back(google_breakpad::CustomInfoEntry(
+ UTF8ToWide(iter->first).c_str(),
+ UTF8ToWide(iter->second).c_str()));
+ }
+
+ custom_info_.entries = &custom_info_entries_.front();
+ custom_info_.count = custom_info_entries_.size();
+ return &custom_info_;
+}
+
// static
CrashReporterWin* CrashReporterWin::GetInstance() {
return Singleton<CrashReporterWin>::get();
MDRawAssertionInfo* assertion,
bool succeeded);
+ // Returns the custom info structure based on parameters.
+ google_breakpad::CustomClientInfo* GetCustomInfo(
+ const std::string& product_name,
+ const std::string& version,
+ const std::string& company_name);
+
+ // Custom information to be passed to crash handler.
+ std::vector<google_breakpad::CustomInfoEntry> custom_info_entries_;
+ google_breakpad::CustomClientInfo custom_info_;
+
bool skip_system_crash_handler_;
scoped_ptr<google_breakpad::ExceptionHandler> breakpad_;
server = http.createServer (req, res) ->
form = new formidable.IncomingForm()
form.parse req, (error, fields, files) ->
- assert.equal fields['prod'], 'atom-shell'
+ assert.equal fields['prod'], 'Atom-Shell'
assert.equal fields['ver'], process.versions['atom-shell']
assert.equal fields['process_type'], 'renderer'
assert.equal fields['platform'], process.platform
assert.equal fields['extra1'], 'extra1'
assert.equal fields['extra2'], 'extra2'
- assert.equal files['upload_file_minidump']['name'], 'minidump.dmp'
+ assert files['upload_file_minidump']['name']?
w.destroy()
res.end()