Changeset 89228 in webkit


Ignore:
Timestamp:
Jun 19, 2011 8:50:36 PM (13 years ago)
Author:
oliver@apple.com
Message:

2011-06-19 Oliver Hunt <oliver@apple.com>

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 <oliver@apple.com>

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):
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r89227 r89228  
     12011-06-19  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Correct logic for putting errors on the correct line when handling JSONP
     6        https://bugs.webkit.org/show_bug.cgi?id=62962
     7
     8        Add test case this time
     9
     10        * fast/js/parser-syntax-check-expected.txt:
     11        * fast/js/script-tests/parser-syntax-check.js:
     12
    1132011-06-19  Adam Bergkvist  <adam.bergkvist@ericsson.com>
    214
  • trunk/LayoutTests/fast/js/parser-syntax-check-expected.txt

    r88974 r89228  
    568568PASS Valid:   "if (0) obj.foo\u03bb; "
    569569PASS Valid:   "function f() { if (0) obj.foo\u03bb;  }"
     570PASS e.line is 1
     571PASS foo is 'PASS'
     572PASS bar is 'PASS'
    570573PASS successfullyParsed is true
    571574
  • trunk/LayoutTests/fast/js/script-tests/parser-syntax-check.js

    r88974 r89228  
    362362valid("if (0) obj.foo\\u03bb; ")
    363363
     364try { eval("a.b.c = {};"); } catch(e1) { e=e1; shouldBe("e.line", "1") }
     365foo = 'FAIL';
     366bar = 'PASS';
     367try {
     368     eval("foo = 'PASS'; a.b.c = {}; bar  = 'FAIL';");
     369} catch(e) {
     370     shouldBe("foo", "'PASS'");
     371     shouldBe("bar", "'PASS'");
     372}
     373
    364374var successfullyParsed = true;
  • trunk/Source/JavaScriptCore/ChangeLog

    r89226 r89228  
     12011-06-19  Oliver Hunt  <oliver@apple.com>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Correct logic for putting errors on the correct line when handling JSONP
     6        https://bugs.webkit.org/show_bug.cgi?id=62962
     7
     8        Minor fix for the minor fix.  *sigh*
     9
     10        * interpreter/Interpreter.cpp:
     11        (JSC::Interpreter::execute):
     12
    1132011-06-19  Oliver Hunt  <oliver@apple.com>
    214
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r89226 r89228  
    772772                        PropertySlot slot(globalObject);
    773773                        if (!globalObject->getPropertySlot(callFrame, JSONPPath[i].m_pathEntryName, slot)) {
    774                             if (i)
     774                            if (entry)
    775775                                return throwError(callFrame, createUndefinedVariableError(globalObject->globalExec(), JSONPPath[i].m_pathEntryName));
    776776                            goto failedJSONP;
Note: See TracChangeset for help on using the changeset viewer.