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

Commit

Permalink
Crash reporting initialization
Browse files Browse the repository at this point in the history
  * 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 6, 2016
1 parent 36418bc commit da530f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)

This comment has been minimized.

Copy link
@bbondy

bbondy Oct 6, 2016

Member

nit remove this logging

This comment has been minimized.

Copy link
@aekeus

aekeus Oct 6, 2016

Author Member

ok, sorry missed that one

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')
Expand Down
1 change: 1 addition & 0 deletions docs/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit da530f7

Please sign in to comment.