[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

oliver at apple.com oliver at apple.com
Sun Feb 20 23:01:13 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 03954a3f7685964c7aefb2e5fb108d2964288dd3
Author: oliver at apple.com <oliver at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Jan 15 02:14:45 2011 +0000

    2011-01-14  Oliver Hunt  <oliver at apple.com>
    
            Reviewed by Stephanie Lewis.
    
            [jsfunfuzz] We should be clearing the lexers temporary character buffers when switching to strict mode
            https://bugs.webkit.org/show_bug.cgi?id=52501
    
            Add checks for correct behaviour when the strict mode token is immediately followed
            by a value that needs a temporary buffer in the lexer.
    
            * fast/js/basic-strict-mode-expected.txt:
            * fast/js/script-tests/basic-strict-mode.js:
    2011-01-14  Oliver Hunt  <oliver at apple.com>
    
            Reviewed by Stephanie Lewis.
    
            [jsfunfuzz] We should be clearing the lexers temporary character buffers when switching to strict mode
            https://bugs.webkit.org/show_bug.cgi?id=52501
    
            Clear the temporary character buffers used for reading escaped characters and
            numbers.
    
            * parser/Lexer.h:
            (JSC::Lexer::setOffset):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75862 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 43c3d16..794da35 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-14  Oliver Hunt  <oliver at apple.com>
+
+        Reviewed by Stephanie Lewis.
+
+        [jsfunfuzz] We should be clearing the lexers temporary character buffers when switching to strict mode
+        https://bugs.webkit.org/show_bug.cgi?id=52501
+
+        Add checks for correct behaviour when the strict mode token is immediately followed
+        by a value that needs a temporary buffer in the lexer.
+
+        * fast/js/basic-strict-mode-expected.txt:
+        * fast/js/script-tests/basic-strict-mode.js:
+
 2011-01-14  Tony Chang  <tony at chromium.org>
 
         Reviewed by Alexey Proskuryakov.
diff --git a/LayoutTests/fast/js/basic-strict-mode-expected.txt b/LayoutTests/fast/js/basic-strict-mode-expected.txt
index fb76afd..fade4cf 100644
--- a/LayoutTests/fast/js/basic-strict-mode-expected.txt
+++ b/LayoutTests/fast/js/basic-strict-mode-expected.txt
@@ -127,6 +127,10 @@ PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescri
 PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'caller'); return descriptor.get === descriptor.set; })() is true
 PASS (function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'arguments'); return descriptor.get === descriptor.set; })() is true
 PASS 'use strict'; (function f() { for(var i in this); })(); true; is true
+PASS 'use strict'̻ threw exception SyntaxError: Parse error.
+PASS 'use strict'5.f threw exception SyntaxError: Parse error.
+PASS 'use strict';̻ threw exception SyntaxError: Parse error.
+PASS 'use strict';5.f threw exception SyntaxError: Parse error.
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/fast/js/script-tests/basic-strict-mode.js b/LayoutTests/fast/js/script-tests/basic-strict-mode.js
index d7dcb5b..c13beac 100644
--- a/LayoutTests/fast/js/script-tests/basic-strict-mode.js
+++ b/LayoutTests/fast/js/script-tests/basic-strict-mode.js
@@ -157,4 +157,9 @@ shouldBeTrue("(function f(arg){'use strict'; var descriptor = Object.getOwnPrope
 shouldBeTrue("(function f(arg){'use strict'; var descriptor = Object.getOwnPropertyDescriptor(f, 'arguments'); return descriptor.get === descriptor.set; })()");
 shouldBeTrue("'use strict'; (function f() { for(var i in this); })(); true;")
 
+shouldThrow("'use strict'\u033b");
+shouldThrow("'use strict'5.f");
+shouldThrow("'use strict';\u033b");
+shouldThrow("'use strict';5.f");
+
 var successfullyParsed = true;
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 2d51b86..decbc61 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-14  Oliver Hunt  <oliver at apple.com>
+
+        Reviewed by Stephanie Lewis.
+
+        [jsfunfuzz] We should be clearing the lexers temporary character buffers when switching to strict mode
+        https://bugs.webkit.org/show_bug.cgi?id=52501
+
+        Clear the temporary character buffers used for reading escaped characters and
+        numbers.
+
+        * parser/Lexer.h:
+        (JSC::Lexer::setOffset):
+
 2011-01-14  Geoffrey Garen  <ggaren at apple.com>
 
         Try to fix non-Dtrace builds: #include Tracing.h instead of TracingDtrace.h.
diff --git a/Source/JavaScriptCore/parser/Lexer.h b/Source/JavaScriptCore/parser/Lexer.h
index e72888f..79987af 100644
--- a/Source/JavaScriptCore/parser/Lexer.h
+++ b/Source/JavaScriptCore/parser/Lexer.h
@@ -71,6 +71,8 @@ namespace JSC {
             m_error = 0;
             m_code = m_codeStart + offset;
             m_current = *m_code;
+            m_buffer8.resize(0);
+            m_buffer16.resize(0);
         }
 
     private:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list