Commit Graph

12 Commits

Author SHA1 Message Date
Max Brunsfeld
7c8f73b2d8 Make StorageFolder.clear async 2018-01-18 15:14:35 -08:00
Antonio Scandurra
a5c0223592 Fix race condition between opening new files and restoring window state
This commit fixes a race condition in the
`attemptRestoreProjectStateForPaths` function that could cause a file to
be opened more than once within the same workspace pane.

In particular, when opening some file into an empty window, Atom tries
to recover the state for the project containing the file (if there is
one). However, we were previously not waiting until the
`AtomEnvironment`'s state had been fully deserialized before trying to
load the requested file into the workspace. If the same file also
existed in the serialized representation of the workspace, it could end
up being opened twice.

With this commit we will now wait until the environment has been fully
deserialized before honoring the user's request of loading new files
into an empty window. Also, tests have been restructured to test more
thoroughly this interaction.
2018-01-10 13:22:09 +01:00
Wliu
5c3d6abb12 Merge branch 'master' into wl-async-confirm 2018-01-07 21:08:32 -05:00
Antonio Scandurra
011766768a Fix AtomEnvironment tests 2017-12-22 12:05:03 +01:00
Wliu
3998556a0a Merge branch 'master' into wl-async-confirm 2017-12-04 22:49:12 +01:00
Max Brunsfeld
e08091f193 Make assignLanguageMode take a language id instead of a language name 2017-11-28 11:14:29 -08:00
Max Brunsfeld
d52c4bc33b Serialize the grammar registry 2017-11-20 14:50:00 -08:00
Wliu
f6abe9a555 Oops 2017-11-19 01:05:53 +01:00
Wliu
58f351e598 Update AtomEnvironment specs for async confirm 2017-11-19 01:02:10 +01:00
Max Brunsfeld
bc774773f7 Convert AtomEnvironment to JS 2017-11-08 16:44:46 -08:00
Max Brunsfeld
786f8b6a93 Use await instead of waitsForPromise in atom-environment-spec 2017-11-06 17:51:49 -08:00
Max Brunsfeld
31eafc4622 Convert atom-environment-spec to JS 2017-11-06 17:32:29 -08:00