Chromium Code Reviews
DescriptionDevTools: liveSASS should tolerate race between iNotify and BrowserSync
In a specific setup, with BrowserSync, SASS watchdog and
DevTools Workspaces, there's a race between iNotify and BrowserSync.
Both are pushing updated StyleSheet into inspected page.
The problem here is that BrowserSync also uses a cache-busting URL for
the stylesheet, appending "?rel=<timestamp>" to stylesheet URL.
As a result, the following sequence of events takes place:
1. As SCSS file is updated on file system, watchDog picks up changes and
produces new CSS files
2. BrowserSync streamlines new CSS into inspected page, with a cache-busting
URL
3. DevTools start loading new SourceMap for the StyleSheet
4. At this moment, DevTools Workspace realizes CSS file changes and updates
style sheets one more time. The stylesheet with a specific cache-busted URL
goes away.
5. LiveSASS tries to fetch content for original StyleSheet with cache-busting
URL (which was already removed) and fails.
Nevertheless, the LiveSASS should not be affected with
this race condition - both BrowserSync and iNotify push
the same content.
This patch stops relying on StyleSheet URL and starts looking for styleSheets
which refer to the sourceMap.
BUG=608106
R=dgozman, pfeldman
Committed: https://crrev.com/ee0c104c20b4dd17f1f6ae00b1d09c88236ebda9
Cr-Commit-Position: refs/heads/master@{#393127}
Patch Set 1 #Patch Set 2 : #
Messages
Total messages: 14 (7 generated)
|
|||||||||||||||||||||||||||||||||||||