Mailspring/internal_packages
Juan Tejada b1882656ee fix(deltas) Prevent app from crashing when processing deltas
Summary:
Some strange scenario is causing us to attempt to redefine the object property `_delta` on our `delta.attributes` object inside `DeltaProcessor._decorateDeltas`, which throws an error, and consequently throws the app into an error loop. I haven't been able to track down how to reproduce this, but when it happens it completely takes the app down.

From testing with tomasz's copy of N1, this seemed to have originated from the lack of Account tokens, which was hard to discover because the `_deltas` object completely floods the console with errors.

From what I gather, `_decorateDeltas` is only called from a single place, `DeltaProcessor.process`, which is also only called from a single place, and its unclear how it would be called multiple times with the same delta object references.

In order to prevent this error from completely destroying the app, I've added the `configurable` option when defining the property, so that redifining it doesn't throw an error. It should be safe to redefine this property with the latest delta reference, and will also allow us to discover other errors more easily in the console like the lack of account tokens which might be the original cause of this problem.

Test Plan: manual

Reviewers: mark, spang, evan, halla

Reviewed By: evan, halla

Differential Revision: https://phab.nylas.com/D3717
2017-01-16 19:37:37 -08:00
..
account-sidebar perf(scroll): improve thread list scroll perf 2017-01-15 15:12:54 -08:00
attachments
category-picker fix(category-picker): Handle the case where new category creation fails 2017-01-10 16:23:53 -08:00
composer fix(Linting errors) 2017-01-05 14:39:25 -08:00
composer-emoji fix(import): require 'rx' from 'nylas-exports' 2016-12-15 15:32:47 -05:00
composer-markdown Fix references for ~/.nylas to ~/.nylas-mail 2017-01-13 18:54:37 -08:00
composer-signature
composer-spellcheck fix(spellcheck): fix right click menu on spellcheck 2017-01-14 16:18:23 -08:00
composer-templates Fix references for ~/.nylas to ~/.nylas-mail 2017-01-13 18:54:37 -08:00
composer-translate
draft-list fix(import): require 'rx' from 'nylas-exports' 2016-12-15 15:32:47 -05:00
events
github-contact-card Fix references for ~/.nylas to ~/.nylas-mail 2017-01-13 18:54:37 -08:00
keybase Create a wrapper around legacy N1 APIs. 2017-01-09 15:18:43 -08:00
main-calendar rm(calendar): Comment out more calendar things 2017-01-16 19:32:18 -08:00
message-autoload-images 🎨(rename): Update Nylas N1 to Nylas Mail 2017-01-12 12:05:44 -08:00
message-list fix(spinner): Use a constant spinner when loading inline images 2017-01-09 10:46:09 -08:00
message-view-on-github Fix references for ~/.nylas to ~/.nylas-mail 2017-01-13 18:54:37 -08:00
mode-switch 🎨(rename): Update Nylas N1 to Nylas Mail 2017-01-12 12:05:44 -08:00
notifications fix(offline-notif) Properly check and clear offline notification 2017-01-16 12:17:41 -08:00
onboarding fix(icloud-sending): Add custom smtp settings 2017-01-15 17:09:59 -08:00
participant-profile Create a wrapper around legacy N1 APIs. 2017-01-09 15:18:43 -08:00
personal-level-indicators feat(off): disable/hide snooze, mail rules, misc minor plugins 2017-01-06 15:39:09 -08:00
phishing-detection Fix references for ~/.nylas to ~/.nylas-mail 2017-01-13 18:54:37 -08:00
plugins Fix references for ~/.nylas to ~/.nylas-mail 2017-01-13 18:54:37 -08:00
preferences Remove UpdateChannelSection 2017-01-16 16:46:52 -08:00
print
remove-tracking-pixels 🎨(rename): Update Nylas N1 to Nylas Mail 2017-01-12 12:05:44 -08:00
screenshot-mode
search-index [search-index] Add index for isSearchIndexed (for real) 2017-01-16 16:57:24 -08:00
send-and-archive
system-tray
theme-picker
thread-list fix(sync-messaging): Have "Looking for messages..." update properly 2017-01-16 17:49:55 -08:00
thread-search [thread-search] Add support for category search (i.e. "in:foo") 2017-01-13 11:53:41 -08:00
thread-snooze fix(sync-status): Change old per model status, in favor of per folder 2016-12-15 11:17:20 -08:00
ui-dark
ui-darkside Fix references for ~/.nylas to ~/.nylas-mail 2017-01-13 18:54:37 -08:00
ui-less-is-more 🎨(rename): Update Nylas N1 to Nylas Mail 2017-01-12 12:05:44 -08:00
ui-light
ui-taiga 🎨(rename): Update Nylas N1 to Nylas Mail 2017-01-12 12:05:44 -08:00
ui-ubuntu 🎨(rename): Update Nylas N1 to Nylas Mail 2017-01-12 12:05:44 -08:00
undo-redo
unread-notifications perf(sync): don't send message bodies across IPC & limit global IPC 2017-01-16 10:28:49 -08:00
verify-install-location Don't try to move the app file to the Application folder ourselves 2017-01-16 12:31:15 -08:00
worker-sync fix(deltas) Prevent app from crashing when processing deltas 2017-01-16 19:37:37 -08:00
worker-ui fix(sync-status):Use weighted percentage avg for sync status progress bar 2016-12-21 18:30:54 -05:00