[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

ggaren at apple.com ggaren at apple.com
Wed Apr 7 23:17:25 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 57773cf4a25dfd82ee451fac180d50e350b49501
Author: ggaren at apple.com <ggaren at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 31 02:11:21 2009 +0000

    Fixed failing layout test: restore a special case I accidentally deleted.
    
    Patch by Geoffrey Garen <ggaren at apple.com> on 2009-10-30
    Reviewed by Oliver Hunt.
    
    * runtime/DatePrototype.cpp:
    (JSC::setNewValueFromDateArgs): In the case of applying a change to a date
    that is NaN, reset the date to 0 *and* then apply the change; don't just
    reset the date to 0.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50377 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 2ae2948..fd73cf9 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,16 @@
 2009-10-30  Geoffrey Garen  <ggaren at apple.com>
 
+        Reviewed by Oliver Hunt.
+
+        Fixed failing layout test: restore a special case I accidentally deleted.
+
+        * runtime/DatePrototype.cpp:
+        (JSC::setNewValueFromDateArgs): In the case of applying a change to a date
+        that is NaN, reset the date to 0 *and* then apply the change; don't just
+        reset the date to 0.
+
+2009-10-30  Geoffrey Garen  <ggaren at apple.com>
+
         Windows build fix: update for object-to-pointer change.
 
         * runtime/DatePrototype.cpp:
diff --git a/JavaScriptCore/runtime/DatePrototype.cpp b/JavaScriptCore/runtime/DatePrototype.cpp
index 3c96b10..0e58c2b 100644
--- a/JavaScriptCore/runtime/DatePrototype.cpp
+++ b/JavaScriptCore/runtime/DatePrototype.cpp
@@ -860,20 +860,19 @@ static JSValue setNewValueFromDateArgs(ExecState* exec, JSValue thisValue, const
     }      
     
     double milli = thisDateObj->internalNumber();
-    if (numArgsToUse == 3 && isnan(milli)) {
-        JSValue result = jsNumber(exec, 0);
-        thisDateObj->setInternalValue(result);
-        return result;
+    double ms = 0; 
+
+    GregorianDateTime gregorianDateTime; 
+    if (numArgsToUse == 3 && isnan(milli)) 
+        WTF::msToGregorianDateTime(0, true, gregorianDateTime); 
+    else { 
+        ms = milli - floor(milli / msPerSecond) * msPerSecond; 
+        const GregorianDateTime* other = thisDateObj->gregorianDateTime(exec, inputIsUTC);
+        if (!other)
+            return jsNaN(exec);
+        gregorianDateTime.copyFrom(*other);
     }
-
-    const GregorianDateTime* other = thisDateObj->gregorianDateTime(exec, inputIsUTC);
-    if (!other)
-        return jsNaN(exec);
-
-    GregorianDateTime gregorianDateTime;
-    gregorianDateTime.copyFrom(*other);
     
-    double ms = milli - floor(milli / msPerSecond) * msPerSecond;
     if (!fillStructuresUsingDateArgs(exec, args, numArgsToUse, &ms, &gregorianDateTime)) {
         JSValue result = jsNaN(exec);
         thisDateObj->setInternalValue(result);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list