[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

hausmann at webkit.org hausmann at webkit.org
Thu Feb 4 21:28:06 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 683526b9f52b113df74a6cf2850eeed06f08baf9
Author: hausmann at webkit.org <hausmann at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Jan 26 15:09:42 2010 +0000

    [Qt] Fix compilation of QtScript with non-gcc compilers
    
    Variable length stack arrays are a gcc extension. Use QVarLengthArray
    as a more portable solution that still tries to allocate on the stack
    first.
    
    * qt/api/qscriptvalue_p.h:
    (QScriptValuePrivate::call):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53854 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 6bb95a3..c8e95bc 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,5 +1,16 @@
 2010-01-26  Simon Hausmann  <simon.hausmann at nokia.com>
 
+        [Qt] Fix compilation of QtScript with non-gcc compilers
+
+        Variable length stack arrays are a gcc extension. Use QVarLengthArray
+        as a more portable solution that still tries to allocate on the stack
+        first.
+
+        * qt/api/qscriptvalue_p.h:
+        (QScriptValuePrivate::call):
+
+2010-01-26  Simon Hausmann  <simon.hausmann at nokia.com>
+
         Reviewed by Tor Arne Vestbø.
 
         [Qt] Fix the build on platforms without JIT support.
diff --git a/JavaScriptCore/qt/api/qscriptvalue_p.h b/JavaScriptCore/qt/api/qscriptvalue_p.h
index dcd36ce..6a5b388 100644
--- a/JavaScriptCore/qt/api/qscriptvalue_p.h
+++ b/JavaScriptCore/qt/api/qscriptvalue_p.h
@@ -25,6 +25,7 @@
 #include "qscriptvalue.h"
 #include <JavaScriptCore/JavaScript.h>
 #include <QtCore/qshareddata.h>
+#include <QtCore/qvarlengtharray.h>
 
 class QScriptEngine;
 class QScriptValue;
@@ -625,7 +626,7 @@ QScriptValuePrivate* QScriptValuePrivate::call(const QScriptValuePrivate*, const
         {
             // Convert all arguments and bind to the engine.
             int argc = args.size();
-            JSValueRef argv[argc];
+            QVarLengthArray<JSValueRef, 8> argv(argc);
             QScriptValueList::const_iterator i = args.constBegin();
             for (int j = 0; i != args.constEnd(); j++, i++) {
                 QScriptValuePrivate* value = QScriptValuePrivate::get(*i);
@@ -638,7 +639,7 @@ QScriptValuePrivate* QScriptValuePrivate::call(const QScriptValuePrivate*, const
 
             // Make the call
             JSValueRef exception = 0;
-            JSValueRef result = JSObjectCallAsFunction(context(), object(), /* thisObject */ 0, argc, argv, &exception);
+            JSValueRef result = JSObjectCallAsFunction(context(), object(), /* thisObject */ 0, argc, argv.constData(), &exception);
             if (!result && exception)
                 return new QScriptValuePrivate(engine(), exception);
             if (result && !exception)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list