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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js

Issue 2693383003: [DevTools] Refactor CSS live locations. (Closed)
Patch Set: rebased Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js
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 72322eb022c5e7054719714222ca860aee18fd64..70128902e708b2814e441ee56c0e10b8923eba00 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js
@@ -102,14 +102,16 @@ Bindings.SASSSourceMapping = class {
* @return {?Workspace.UILocation}
*/
rawLocationToUILocation(rawLocation) {
- var sourceMap = this._cssModel.sourceMapForHeader(rawLocation.header());
+ var header = rawLocation.header();
+ if (!header)
+ return null;
+ var sourceMap = this._cssModel.sourceMapForHeader(header);
if (!sourceMap)
return null;
var entry = sourceMap.findEntry(rawLocation.lineNumber, rawLocation.columnNumber);
if (!entry || !entry.sourceURL)
return null;
- var uiSourceCode =
- Bindings.NetworkProject.uiSourceCodeForStyleURL(this._workspace, entry.sourceURL, rawLocation.header());
+ var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForStyleURL(this._workspace, entry.sourceURL, header);
if (!uiSourceCode)
return null;
return uiSourceCode.uiLocation(entry.sourceLineNumber || 0, entry.sourceColumnNumber);

Powered by Google App Engine
This is Rietveld 408576698