Title: [131567] trunk/Source/WebCore
Revision
131567
Author
[email protected]
Date
2012-10-17 01:49:14 -0700 (Wed, 17 Oct 2012)

Log Message

Web Inspector: [Regression] SASS sources are not saved to disk.
https://bugs.webkit.org/show_bug.cgi?id=99551

Reviewed by Yury Semikhatsky.

Added resource null checks.

* inspector/front-end/StylesSourceMapping.js:
(WebInspector.StylesSourceMapping.prototype._uiSourceCodeAddedToWorkspace):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (131566 => 131567)


--- trunk/Source/WebCore/ChangeLog	2012-10-17 08:18:17 UTC (rev 131566)
+++ trunk/Source/WebCore/ChangeLog	2012-10-17 08:49:14 UTC (rev 131567)
@@ -1,3 +1,15 @@
+2012-10-17  Vsevolod Vlasov  <[email protected]>
+
+        Web Inspector: [Regression] SASS sources are not saved to disk.
+        https://bugs.webkit.org/show_bug.cgi?id=99551
+
+        Reviewed by Yury Semikhatsky.
+
+        Added resource null checks.
+
+        * inspector/front-end/StylesSourceMapping.js:
+        (WebInspector.StylesSourceMapping.prototype._uiSourceCodeAddedToWorkspace):
+
 2012-10-17  Elliott Sprehn  <[email protected]>
 
         Clean up ContentData operator overloads

Modified: trunk/Source/WebCore/inspector/front-end/StylesSourceMapping.js (131566 => 131567)


--- trunk/Source/WebCore/inspector/front-end/StylesSourceMapping.js	2012-10-17 08:18:17 UTC (rev 131566)
+++ trunk/Source/WebCore/inspector/front-end/StylesSourceMapping.js	2012-10-17 08:49:14 UTC (rev 131567)
@@ -72,7 +72,9 @@
             return;
         if (uiSourceCode.contentType() !== WebInspector.resourceTypes.Stylesheet)
             return;
-            
+        if (!WebInspector.resourceForURL(uiSourceCode.url))
+            return;
+
         this._addUISourceCode(uiSourceCode);
     },
 
@@ -187,6 +189,11 @@
     setStyleContent: function(uiSourceCode, content, majorChange, userCallback)
     {
         var resource = WebInspector.resourceForURL(uiSourceCode.url);
+        if (!resource) {
+            userCallback("No resource found: " + uiSourceCode.url);
+            return;
+        }
+            
         this._cssModel.resourceBinding().requestStyleSheetIdForResource(resource, callback.bind(this));
 
         /**
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to