Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Issue 1965223003: DevTools: liveSASS should tolerate race between iNotify and BrowserSync (Closed)

Created:
4 years, 7 months ago by lushnikov
Modified:
4 years, 7 months ago
Reviewers:
dgozman, pfeldman
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, sergeyv+blink_chromium.org, pfeldman, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: 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 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -3 lines) Patch
A third_party/WebKit/LayoutTests/inspector/sass/test-mapping-with-cache-busting-url.html View 1 1 chunk +42 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/inspector/sass/test-mapping-with-cache-busting-url-expected.txt View 1 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sass/SASSSourceMapFactory.js View 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 14 (7 generated)
lushnikov
please, take a look!
4 years, 7 months ago (2016-05-11 18:30:24 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1965223003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1965223003/20001
4 years, 7 months ago (2016-05-11 22:24:05 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-12 00:13:18 UTC) #7
dgozman
lgtm, but we should follow-up with removing of compiledURL() completely.
4 years, 7 months ago (2016-05-12 01:00:01 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1965223003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1965223003/20001
4 years, 7 months ago (2016-05-12 01:05:40 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 7 months ago (2016-05-12 01:10:16 UTC) #12
commit-bot: I haz the power
4 years, 7 months ago (2016-05-12 01:14:21 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ee0c104c20b4dd17f1f6ae00b1d09c88236ebda9
Cr-Commit-Position: refs/heads/master@{#393127}

Powered by Google App Engine
This is Rietveld 408576698