Title: [89228] trunk
Revision
89228
Author
[email protected]
Date
2011-06-19 20:50:36 -0700 (Sun, 19 Jun 2011)

Log Message

2011-06-19  Oliver Hunt  <[email protected]>

        Reviewed by Sam Weinig.

        Correct logic for putting errors on the correct line when handling JSONP
        https://bugs.webkit.org/show_bug.cgi?id=62962

        Add test case this time

        * fast/js/parser-syntax-check-expected.txt:
        * fast/js/script-tests/parser-syntax-check.js:
2011-06-19  Oliver Hunt  <[email protected]>

        Reviewed by Sam Weinig.

        Correct logic for putting errors on the correct line when handling JSONP
        https://bugs.webkit.org/show_bug.cgi?id=62962

        Minor fix for the minor fix.  *sigh*

        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::execute):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (89227 => 89228)


--- trunk/LayoutTests/ChangeLog	2011-06-20 03:05:50 UTC (rev 89227)
+++ trunk/LayoutTests/ChangeLog	2011-06-20 03:50:36 UTC (rev 89228)
@@ -1,3 +1,15 @@
+2011-06-19  Oliver Hunt  <[email protected]>
+
+        Reviewed by Sam Weinig.
+
+        Correct logic for putting errors on the correct line when handling JSONP
+        https://bugs.webkit.org/show_bug.cgi?id=62962
+
+        Add test case this time
+
+        * fast/js/parser-syntax-check-expected.txt:
+        * fast/js/script-tests/parser-syntax-check.js:
+
 2011-06-19  Adam Bergkvist  <[email protected]>
 
         Reviewed by Martin Robinson.

Modified: trunk/LayoutTests/fast/js/parser-syntax-check-expected.txt (89227 => 89228)


--- trunk/LayoutTests/fast/js/parser-syntax-check-expected.txt	2011-06-20 03:05:50 UTC (rev 89227)
+++ trunk/LayoutTests/fast/js/parser-syntax-check-expected.txt	2011-06-20 03:50:36 UTC (rev 89228)
@@ -567,6 +567,9 @@
 PASS Valid:   "function f() { if (0) obj.foo_;  }"
 PASS Valid:   "if (0) obj.foo\u03bb; "
 PASS Valid:   "function f() { if (0) obj.foo\u03bb;  }"
+PASS e.line is 1
+PASS foo is 'PASS'
+PASS bar is 'PASS'
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/fast/js/script-tests/parser-syntax-check.js (89227 => 89228)


--- trunk/LayoutTests/fast/js/script-tests/parser-syntax-check.js	2011-06-20 03:05:50 UTC (rev 89227)
+++ trunk/LayoutTests/fast/js/script-tests/parser-syntax-check.js	2011-06-20 03:50:36 UTC (rev 89228)
@@ -361,4 +361,14 @@
 valid("if (0) obj.foo_; ")
 valid("if (0) obj.foo\\u03bb; ")
 
+try { eval("a.b.c = {};"); } catch(e1) { e=e1; shouldBe("e.line", "1") }
+foo = 'FAIL';
+bar = 'PASS';
+try {
+     eval("foo = 'PASS'; a.b.c = {}; bar  = 'FAIL';");
+} catch(e) {
+     shouldBe("foo", "'PASS'");
+     shouldBe("bar", "'PASS'");
+}
+
 var successfullyParsed = true;

Modified: trunk/Source/_javascript_Core/ChangeLog (89227 => 89228)


--- trunk/Source/_javascript_Core/ChangeLog	2011-06-20 03:05:50 UTC (rev 89227)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-06-20 03:50:36 UTC (rev 89228)
@@ -1,5 +1,17 @@
 2011-06-19  Oliver Hunt  <[email protected]>
 
+        Reviewed by Sam Weinig.
+
+        Correct logic for putting errors on the correct line when handling JSONP
+        https://bugs.webkit.org/show_bug.cgi?id=62962
+
+        Minor fix for the minor fix.  *sigh*
+
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::execute):
+
+2011-06-19  Oliver Hunt  <[email protected]>
+
         Minor fix to correct layout test results.
 
         * interpreter/Interpreter.cpp:

Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.cpp (89227 => 89228)


--- trunk/Source/_javascript_Core/interpreter/Interpreter.cpp	2011-06-20 03:05:50 UTC (rev 89227)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.cpp	2011-06-20 03:50:36 UTC (rev 89228)
@@ -771,7 +771,7 @@
                     if (i == 0) {
                         PropertySlot slot(globalObject);
                         if (!globalObject->getPropertySlot(callFrame, JSONPPath[i].m_pathEntryName, slot)) {
-                            if (i)
+                            if (entry)
                                 return throwError(callFrame, createUndefinedVariableError(globalObject->globalExec(), JSONPPath[i].m_pathEntryName));
                             goto failedJSONP;
                         }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to