Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Crash reporting toggle renderer #4606

Merged
merged 9 commits into from
Oct 10, 2016
Prev Previous commit
Next Next commit
Crash reporting initialization
  * Enable crash reporting on undefined or true value in setting
  * Update state documentation

Auditors: @bbondy

Test Plan:

  In previous commit
  • Loading branch information
aekeus committed Oct 7, 2016
commit d5042d8efddcb3335d13eb725e8660f059ece050
5 changes: 4 additions & 1 deletion app/index.js
Original file line number Diff line number Diff line change
@@ -244,12 +244,15 @@ let flashInitialized = false
// Some settings must be set right away on startup, those settings should be handled here.
loadAppStatePromise.then((initialState) => {
const {HARDWARE_ACCELERATION_ENABLED, SMOOTH_SCROLL_ENABLED, SEND_CRASH_REPORTS} = require('../js/constants/settings')
console.log(initialState)
if (initialState.settings[HARDWARE_ACCELERATION_ENABLED] === false) {
app.disableHardwareAcceleration()
}
if (initialState.settings[SEND_CRASH_REPORTS]) {
if (initialState.settings[SEND_CRASH_REPORTS] !== false) {
console.log('Crash reporting enabled')
CrashHerald.init()
} else {
console.log('Crash reporting disabled')
}
if (initialState.settings[SMOOTH_SCROLL_ENABLED] === false) {
app.commandLine.appendSwitch('disable-smooth-scrolling')
1 change: 1 addition & 0 deletions docs/state.md
Original file line number Diff line number Diff line change
@@ -176,6 +176,7 @@ AppStore
'advanced.default-zoom-level': number, // the default zoom level for sites that have no specific setting
'advanced.pdfjs-enabled': boolean, // Whether or not to render PDF documents in the browser
'advanced.smooth-scroll-enabled': boolean, // false if smooth scrolling should be explicitly disabled
'advanced.send-crash-reports': boolean, // true or undefined if crash reports should be sent
'shutdown.clear-history': boolean, // true to clear history on shutdown
'shutdown.clear-downloads': boolean, // true to clear downloads on shutdown
'shutdown.clear-cache': boolean, // true to clear cache on shutdown