Title: [131883] trunk/Source/WebCore
Revision
131883
Author
[email protected]
Date
2012-10-19 03:09:09 -0700 (Fri, 19 Oct 2012)

Log Message

Web Inspector: Invalid Regex in SASSSourceMapping/didRequestContent, breaks Support for Sass experiment
https://bugs.webkit.org/show_bug.cgi?id=99729

Reviewed by Vsevolod Vlasov.

Decode only the first line number digit written in a six-character escaped Unicode format.

* inspector/front-end/SASSSourceMapping.js:
(WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
(WebInspector.SASSSourceMapping.prototype._resourceAdded):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (131882 => 131883)


--- trunk/Source/WebCore/ChangeLog	2012-10-19 10:08:24 UTC (rev 131882)
+++ trunk/Source/WebCore/ChangeLog	2012-10-19 10:09:09 UTC (rev 131883)
@@ -1,3 +1,16 @@
+2012-10-19  Alexander Pavlov  <[email protected]>
+
+        Web Inspector: Invalid Regex in SASSSourceMapping/didRequestContent, breaks Support for Sass experiment
+        https://bugs.webkit.org/show_bug.cgi?id=99729
+
+        Reviewed by Vsevolod Vlasov.
+
+        Decode only the first line number digit written in a six-character escaped Unicode format.
+
+        * inspector/front-end/SASSSourceMapping.js:
+        (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
+        (WebInspector.SASSSourceMapping.prototype._resourceAdded):
+
 2012-10-19  Tommy Widenflycht  <[email protected]>
 
         MediaStream API: Update the RuntimeEnabledFeatures flags

Modified: trunk/Source/WebCore/inspector/front-end/SASSSourceMapping.js (131882 => 131883)


--- trunk/Source/WebCore/inspector/front-end/SASSSourceMapping.js	2012-10-19 10:08:24 UTC (rev 131882)
+++ trunk/Source/WebCore/inspector/front-end/SASSSourceMapping.js	2012-10-19 10:09:09 UTC (rev 131883)
@@ -77,13 +77,13 @@
             if (!content)
                 return;
             var lines = content.split(/\r?\n/);
-            var debugInfoRegex = /@media\s\-sass\-debug\-info{filename{font-family:([^}]+)}line{font-family:\\[0]+([^}]*)}}/i;
+            var debugInfoRegex = /@media\s\-sass\-debug\-info{filename{font-family:([^}]+)}line{font-family:\\0000(\d\d)([^}]*)}}/i;
             var lineNumbersRegex = /\/\*\s+line\s+([0-9]+),\s+([^*\/]+)/;
             for (var lineNumber = 0; lineNumber < lines.length; ++lineNumber) {
                 var match = debugInfoRegex.exec(lines[lineNumber]);
                 if (match) {
                     var url = "" "$1");
-                    var line = parseInt(decodeURI(match[2].replace(/(..)/g, "%$1")), 10);
+                    var line = parseInt(decodeURI("%" + match[2]) + match[3], 10);
                     this._bindUISourceCode(url, line, resource.url, lineNumber);
                     continue;
                 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to