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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:01:36 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 46aae68756f4b023a0301a4fc0bc6c3f4069409d
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 1 14:56:18 2010 +0000

    2010-10-01  Viatcheslav Ostapenko  <ostapenko.viatcheslav at nokia.com>
    
            Reviewed by Andreas Kling.
    
            [Qt] Stack overflow on symbian platform.
            https://bugs.webkit.org/show_bug.cgi?id=40598
    
            Move big allocation in arrayProtoFuncToString from stack to heap.
            JSC::arrayProtoFuncToString function can be called recursivly and
            1K allocation on stack cahse stack overflow.
            Can be useful for other platforms with limited stack size.
    
            * runtime/ArrayPrototype.cpp:
            (JSC::arrayProtoFuncToString):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68890 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index b12cc9e..5b3f561 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-01  Viatcheslav Ostapenko  <ostapenko.viatcheslav at nokia.com>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] Stack overflow on symbian platform.
+        https://bugs.webkit.org/show_bug.cgi?id=40598
+        
+        Move big allocation in arrayProtoFuncToString from stack to heap.
+        JSC::arrayProtoFuncToString function can be called recursivly and
+        1K allocation on stack cahse stack overflow.
+        Can be useful for other platforms with limited stack size.
+
+        * runtime/ArrayPrototype.cpp:
+        (JSC::arrayProtoFuncToString):
+
 2010-09-30  Kwang Yul Seo  <skyul at company100.net>
 
         Reviewed by Kent Tamura.
diff --git a/JavaScriptCore/runtime/ArrayPrototype.cpp b/JavaScriptCore/runtime/ArrayPrototype.cpp
index 28269ff..6002ebb 100644
--- a/JavaScriptCore/runtime/ArrayPrototype.cpp
+++ b/JavaScriptCore/runtime/ArrayPrototype.cpp
@@ -180,7 +180,14 @@ EncodedJSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState* exec)
 
     unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
     unsigned totalSize = length ? length - 1 : 0;
+#if OS(SYMBIAN)
+    // Symbian has very limited stack size available.
+    // This function could be called recursively and allocating 1K on stack here cause
+    // stack overflow on Symbian devices.
+    Vector<RefPtr<StringImpl> > strBuffer(length);
+#else
     Vector<RefPtr<StringImpl>, 256> strBuffer(length);
+#endif    
     for (unsigned k = 0; k < length; k++) {
         JSValue element;
         if (isRealArray && thisObj->canGetIndex(k))

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list