diff options
author | Andrey Lushnikov <lushnikov@chromium.org> | 2015-10-30 12:06:43 -0700 |
---|---|---|
committer | Andrey Lushnikov <lushnikov@chromium.org> | 2015-10-30 19:08:30 +0000 |
commit | d8a1d05194d5b20255bf5855a9bcc8b6adccb7c5 (patch) | |
tree | 608d3d33539dd285ac45fce9da66c9c6eede3882 | |
parent | 232e94bda1fb4c108eaf4188cec04e62742c79f2 (diff) | |
download | chromium_src-d8a1d05194d5b20255bf5855a9bcc8b6adccb7c5.zip chromium_src-d8a1d05194d5b20255bf5855a9bcc8b6adccb7c5.tar.gz chromium_src-d8a1d05194d5b20255bf5855a9bcc8b6adccb7c5.tar.bz2 |
DevTools: fix SASSSourceMapping to correctly remove stylesheet headers
The removeHeader method of SASSSourceMapping should not assume
that there's a sourcemap for header.
This is a regression caused by https://crrev.com/1340813002
BUG=544565
R=pfeldman@chromium.org
Review URL: https://codereview.chromium.org/1423663004
Cr-Commit-Position: refs/heads/master@{#355734}
(cherry picked from commit 05d7a0ef17b6555c37b6b42e3c3e5c4f2548d4a7)
Review URL: https://codereview.chromium.org/1417283004 .
Cr-Commit-Position: refs/branch-heads/2526@{#282}
Cr-Branched-From: cb947c0153db0ec02a8abbcb3ca086d88bf6006f-refs/heads/master@{#352221}
-rw-r--r-- | third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js index 370fe3b..642139b 100644 --- a/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js +++ b/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js @@ -142,9 +142,11 @@ WebInspector.SASSSourceMapping.prototype = { if (!sourceURL || !header.sourceMapURL || !this._completeSourceMapURLForCSSURL[sourceURL]) return; var sourceMap = this._sourceMapByStyleSheetURL[sourceURL]; - var sources = sourceMap.sources(); - for (var i = 0; i < sources.length; ++i) - this._sassURLToCSSURLs.remove(sources[i], sourceURL); + if (sourceMap) { + var sources = sourceMap.sources(); + for (var i = 0; i < sources.length; ++i) + this._sassURLToCSSURLs.remove(sources[i], sourceURL); + } delete this._sourceMapByStyleSheetURL[sourceURL]; delete this._completeSourceMapURLForCSSURL[sourceURL]; |