Title: [208097] trunk
Revision
208097
Author
[email protected]
Date
2016-10-28 20:16:10 -0700 (Fri, 28 Oct 2016)

Log Message

Web Inspector: Breakpoints not working in scripts with unicode characters
https://bugs.webkit.org/show_bug.cgi?id=164172
<rdar://problem/28895862>

Reviewed by Ryosuke Niwa.

Source/_javascript_Core:

* parser/Parser.h:
(JSC::parse):
Ensure we pass the debuggerParseData struct to get populated in the
non 8bit string case!

LayoutTests:

* inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
* inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html:
* inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt:
* inspector/debugger/breakpoints/resolved-dump-each-line.html:
* inspector/debugger/breakpoints/resources/dump-unicode.js: Added.
Ensure we can set breakpoints and resolve them in non-8bit source code.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (208096 => 208097)


--- trunk/LayoutTests/ChangeLog	2016-10-29 02:32:20 UTC (rev 208096)
+++ trunk/LayoutTests/ChangeLog	2016-10-29 03:16:10 UTC (rev 208097)
@@ -1,3 +1,18 @@
+2016-10-28  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Breakpoints not working in scripts with unicode characters
+        https://bugs.webkit.org/show_bug.cgi?id=164172
+        <rdar://problem/28895862>
+
+        Reviewed by Ryosuke Niwa.
+
+        * inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
+        * inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html:
+        * inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt:
+        * inspector/debugger/breakpoints/resolved-dump-each-line.html:
+        * inspector/debugger/breakpoints/resources/dump-unicode.js: Added.
+        Ensure we can set breakpoints and resolve them in non-8bit source code.
+
 2016-10-28  Darin Adler  <[email protected]>
 
         Move all classes in the HTML directory from ExceptionCode to Exception

Modified: trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt (208096 => 208097)


--- trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt	2016-10-29 02:32:20 UTC (rev 208096)
+++ trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt	2016-10-29 03:16:10 UTC (rev 208097)
@@ -2366,3 +2366,44 @@
     114    
 
 
+-- Running test case: Debugger.resolvedBreakpoint.dumpAllLocations.Unicode
+
+INSERTING AT: 0:0
+PAUSES AT: 0:0
+-=>   0    |var unicodeVariable1 = function(){};
+      1    var unicodeVariableStr = "Non-8-bit '∙' character.";
+      2    var unicodeSurrogatePairStr = "Emoji '😍' character.";
+      3    var unicodeVariable2 = 2;
+
+INSERTING AT: 0:1
+PAUSES AT: 0:34
+-=>   0    v#ar unicodeVariable1 = function(){|};
+      1    var unicodeVariableStr = "Non-8-bit '∙' character.";
+      2    var unicodeSurrogatePairStr = "Emoji '😍' character.";
+      3    var unicodeVariable2 = 2;
+
+INSERTING AT: 0:35
+PAUSES AT: 1:0
+ ->   0    var unicodeVariable1 = function(){}#;
+ =>   1    |var unicodeVariableStr = "Non-8-bit '∙' character.";
+      2    var unicodeSurrogatePairStr = "Emoji '😍' character.";
+      3    var unicodeVariable2 = 2;
+      4    
+
+INSERTING AT: 1:1
+PAUSES AT: 2:0
+      0    var unicodeVariable1 = function(){};
+ ->   1    v#ar unicodeVariableStr = "Non-8-bit '∙' character.";
+ =>   2    |var unicodeSurrogatePairStr = "Emoji '😍' character.";
+      3    var unicodeVariable2 = 2;
+      4    
+
+INSERTING AT: 2:1
+PAUSES AT: 3:0
+      0    var unicodeVariable1 = function(){};
+      1    var unicodeVariableStr = "Non-8-bit '∙' character.";
+ ->   2    v#ar unicodeSurrogatePairStr = "Emoji '😍' character.";
+ =>   3    |var unicodeVariable2 = 2;
+      4    
+
+

Modified: trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html (208096 => 208097)


--- trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html	2016-10-29 02:32:20 UTC (rev 208096)
+++ trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html	2016-10-29 03:16:10 UTC (rev 208097)
@@ -1,11 +1,13 @@
 <!DOCTYPE html>
 <html>
 <head>
+<meta charset="utf-8">
 <script src=""
 <script src=""
 <script src=""
 <script src=""
 <script src=""
+<script src=""
 <script>
 function test()
 {
@@ -21,6 +23,11 @@
         scriptRegex: /dump-functions\.js$/,
     });
 
+    window.addDumpAllPauseLocationsTestCase(suite, {
+        name: "Debugger.resolvedBreakpoint.dumpAllLocations.Unicode",
+        scriptRegex: /dump-unicode\.js$/,
+    });
+
     suite.runTestCasesAndFinish();
 }
 </script>

Modified: trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt (208096 => 208097)


--- trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt	2016-10-29 02:32:20 UTC (rev 208096)
+++ trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt	2016-10-29 03:16:10 UTC (rev 208097)
@@ -4448,3 +4448,43 @@
 INSERTING AT: 114:0
 PRODUCES: Could not resolve breakpoint
 
+-- Running test case: Debugger.resolvedBreakpoint.dumpEachLine.Unicode
+
+INSERTING AT: 0:0
+PAUSES AT: 0:0
+-=>   0    |var unicodeVariable1 = function(){};
+      1    var unicodeVariableStr = "Non-8-bit '∙' character.";
+      2    var unicodeSurrogatePairStr = "Emoji '😍' character.";
+      3    var unicodeVariable2 = 2;
+
+
+INSERTING AT: 1:0
+PAUSES AT: 1:0
+      0    var unicodeVariable1 = function(){};
+-=>   1    |var unicodeVariableStr = "Non-8-bit '∙' character.";
+      2    var unicodeSurrogatePairStr = "Emoji '😍' character.";
+      3    var unicodeVariable2 = 2;
+      4    
+
+
+INSERTING AT: 2:0
+PAUSES AT: 2:0
+      0    var unicodeVariable1 = function(){};
+      1    var unicodeVariableStr = "Non-8-bit '∙' character.";
+-=>   2    |var unicodeSurrogatePairStr = "Emoji '😍' character.";
+      3    var unicodeVariable2 = 2;
+      4    
+
+
+INSERTING AT: 3:0
+PAUSES AT: 3:0
+      0    var unicodeVariable1 = function(){};
+      1    var unicodeVariableStr = "Non-8-bit '∙' character.";
+      2    var unicodeSurrogatePairStr = "Emoji '😍' character.";
+-=>   3    |var unicodeVariable2 = 2;
+      4    
+
+
+INSERTING AT: 4:0
+PRODUCES: Could not resolve breakpoint
+

Modified: trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-each-line.html (208096 => 208097)


--- trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-each-line.html	2016-10-29 02:32:20 UTC (rev 208096)
+++ trunk/LayoutTests/inspector/debugger/breakpoints/resolved-dump-each-line.html	2016-10-29 03:16:10 UTC (rev 208097)
@@ -1,11 +1,13 @@
 <!DOCTYPE html>
 <html>
 <head>
+<meta charset="utf-8">
 <script src=""
 <script src=""
 <script src=""
 <script src=""
 <script src=""
+<script src=""
 <script>
 function test()
 {
@@ -21,6 +23,11 @@
         scriptRegex: /dump-functions\.js$/,
     });
 
+    window.addDumpEachLinePauseLocationTestCase(suite, {
+        name: "Debugger.resolvedBreakpoint.dumpEachLine.Unicode",
+        scriptRegex: /dump-unicode\.js$/,
+    });
+
     suite.runTestCasesAndFinish();
 }
 </script>

Added: trunk/LayoutTests/inspector/debugger/breakpoints/resources/dump-unicode.js (0 => 208097)


--- trunk/LayoutTests/inspector/debugger/breakpoints/resources/dump-unicode.js	                        (rev 0)
+++ trunk/LayoutTests/inspector/debugger/breakpoints/resources/dump-unicode.js	2016-10-29 03:16:10 UTC (rev 208097)
@@ -0,0 +1,4 @@
+var unicodeVariable1 = function(){};
+var unicodeVariableStr = "Non-8-bit '∙' character.";
+var unicodeSurrogatePairStr = "Emoji '😍' character.";
+var unicodeVariable2 = 2;

Modified: trunk/Source/_javascript_Core/ChangeLog (208096 => 208097)


--- trunk/Source/_javascript_Core/ChangeLog	2016-10-29 02:32:20 UTC (rev 208096)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-10-29 03:16:10 UTC (rev 208097)
@@ -1,3 +1,16 @@
+2016-10-28  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Breakpoints not working in scripts with unicode characters
+        https://bugs.webkit.org/show_bug.cgi?id=164172
+        <rdar://problem/28895862>
+
+        Reviewed by Ryosuke Niwa.
+
+        * parser/Parser.h:
+        (JSC::parse):
+        Ensure we pass the debuggerParseData struct to get populated in the
+        non 8bit string case!
+
 2016-10-28  Yusuke Suzuki  <[email protected]>
 
         [DOMJIT] Include identifier name in CallDOMGetter to dump it

Modified: trunk/Source/_javascript_Core/parser/Parser.h (208096 => 208097)


--- trunk/Source/_javascript_Core/parser/Parser.h	2016-10-29 02:32:20 UTC (rev 208096)
+++ trunk/Source/_javascript_Core/parser/Parser.h	2016-10-29 03:16:10 UTC (rev 208097)
@@ -1874,7 +1874,7 @@
         return result;
     }
     ASSERT_WITH_MESSAGE(defaultConstructorKind == ConstructorKind::None, "BuiltinExecutables::createDefaultConstructor should always use a 8-bit string");
-    Parser<Lexer<UChar>> parser(vm, source, builtinMode, strictMode, scriptMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode<ParsedNode>(), evalContextType);
+    Parser<Lexer<UChar>> parser(vm, source, builtinMode, strictMode, scriptMode, parseMode, superBinding, defaultConstructorKind, derivedContextType, isEvalNode<ParsedNode>(), evalContextType, debuggerParseData);
     std::unique_ptr<ParsedNode> result = parser.parse<ParsedNode>(error, name, parseMode);
     if (positionBeforeLastNewline)
         *positionBeforeLastNewline = parser.positionBeforeLastNewline();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to