[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

barraclough at apple.com barraclough at apple.com
Wed Dec 22 13:32:49 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit a1262b3e4bce77cad0a7cfc7f722ebcc2cd7afaf
Author: barraclough at apple.com <barraclough at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 20 01:35:10 2010 +0000

    Build fix - implicit double-to-int conversion invalid on 32-bit.
    
    * runtime/DatePrototype.cpp:
    (JSC::fillStructuresUsingDateArgs):
    (JSC::dateProtoFuncSetYear):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67826 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index e5141e7..fb44946 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,13 @@
 2010-09-19  Gavin Barraclough  <barraclough at apple.com>
 
+        Build fix - implicit double-to-int conversion invalid on 32-bit.
+
+        * runtime/DatePrototype.cpp:
+        (JSC::fillStructuresUsingDateArgs):
+        (JSC::dateProtoFuncSetYear):
+
+2010-09-19  Gavin Barraclough  <barraclough at apple.com>
+
         Reviewed by Oliver Hunt.
 
         Bug 46065 - Unify implementation of ToInt32 and ToUInt32, don't use fmod.
diff --git a/JavaScriptCore/runtime/DatePrototype.cpp b/JavaScriptCore/runtime/DatePrototype.cpp
index 6edf7b9..4983f29 100644
--- a/JavaScriptCore/runtime/DatePrototype.cpp
+++ b/JavaScriptCore/runtime/DatePrototype.cpp
@@ -355,15 +355,14 @@ static bool fillStructuresUsingDateArgs(ExecState *exec, int maxArgs, double *ms
     if (maxArgs >= 3 && idx < numArgs) {
         double years = exec->argument(idx++).toIntegerPreserveNaN(exec);
         ok = isfinite(years);
-        t->year = years - 1900;
+        t->year = toInt32(years - 1900);
     }
     // months
     if (maxArgs >= 2 && idx < numArgs && ok) {
         double months = exec->argument(idx++).toIntegerPreserveNaN(exec);
         ok = isfinite(months);
-        t->month = months;
+        t->month = toInt32(months);
     }
-
     // days
     if (idx < numArgs && ok) {
         double days = exec->argument(idx++).toIntegerPreserveNaN(exec);
@@ -1046,7 +1045,7 @@ EncodedJSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState* exec)
         return JSValue::encode(result);
     }
             
-    gregorianDateTime.year = (year > 99 || year < 0) ? year - 1900 : year;
+    gregorianDateTime.year = toInt32((year > 99 || year < 0) ? year - 1900 : year);
     JSValue result = jsNumber(exec, gregorianDateTimeToMS(exec, gregorianDateTime, ms, false));
     thisDateObj->setInternalValue(result);
     return JSValue::encode(result);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list