mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
b1882656ee
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 |
||
---|---|---|
.. | ||
lib | ||
spec | ||
package.json |