[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:58:14 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 91a8b82b12291de529dbfe0f9fc2e30fbdfff1c4
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 26 04:12:32 2003 +0000

            Reviewed by John.
    
            * khtml/ecma/kjs_window.cpp:
            (Window::installTimeout): Variant that takes a function and args.
    	(WindowFunc::tryCall): If the argument is a function, call the
    	function variant of installTimeout instead of pointlessly passing
    	the string. Also, correctly implement the code to pass extra args
    	along.
            * khtml/ecma/kjs_window.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5072 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 8b1d887..30fb237 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,17 @@
 2003-09-25  Maciej Stachowiak  <mjs at apple.com>
 
+        Reviewed by John.
+
+        * khtml/ecma/kjs_window.cpp:
+        (Window::installTimeout): Variant that takes a function and args.
+	(WindowFunc::tryCall): If the argument is a function, call the
+	function variant of installTimeout instead of pointlessly passing
+	the string. Also, correctly implement the code to pass extra args
+	along.
+        * khtml/ecma/kjs_window.h:
+
+2003-09-25  Maciej Stachowiak  <mjs at apple.com>
+
 	Roll out build system change since it did not actually work. :-(
 	
         * WebCore.pbproj/project.pbxproj:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 8b1d887..30fb237 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,17 @@
 2003-09-25  Maciej Stachowiak  <mjs at apple.com>
 
+        Reviewed by John.
+
+        * khtml/ecma/kjs_window.cpp:
+        (Window::installTimeout): Variant that takes a function and args.
+	(WindowFunc::tryCall): If the argument is a function, call the
+	function variant of installTimeout instead of pointlessly passing
+	the string. Also, correctly implement the code to pass extra args
+	along.
+        * khtml/ecma/kjs_window.h:
+
+2003-09-25  Maciej Stachowiak  <mjs at apple.com>
+
 	Roll out build system change since it did not actually work. :-(
 	
         * WebCore.pbproj/project.pbxproj:
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index 3efc1a4..914a71c 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -892,6 +892,11 @@ int Window::installTimeout(const UString &handler, int t, bool singleShot)
   return winq->installTimeout(handler, t, singleShot);
 }
 
+int Window::installTimeout(const Value &function, List &args, int t, bool singleShot)
+{
+  return winq->installTimeout(function, args, t, singleShot);
+}
+
 void Window::clearTimeout(int timerId)
 {
   winq->clearTimeout(timerId);
@@ -1399,13 +1404,12 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
     else if (args.size() >= 2 && v.isA(ObjectType) && Object::dynamicCast(v).implementsCall()) {
       Value func = args[0];
       int i = args[1].toInt32(exec);
-#if 0
-//  ### TODO
-      List *funcArgs = args.copy();
-      funcArgs->removeFirst(); // all args after 2 go to the function
-      funcArgs->removeFirst();
-#endif
-      int r = (const_cast<Window*>(window))->installTimeout(s, i, true /*single shot*/);
+
+      // All arguments after the second should go to the function
+      // FIXME: could be more efficient
+      List funcArgs = args.copyTail().copyTail();
+
+      int r = (const_cast<Window*>(window))->installTimeout(func, funcArgs, i, true /*single shot*/);
       return Number(r);
     }
     else
@@ -1422,13 +1426,12 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
 	     Object::dynamicCast(v).implementsCall()) {
       Value func = args[0];
       int i = args[1].toInt32(exec);
-#if 0
-// ### TODO
-      List *funcArgs = args.copy();
-      funcArgs->removeFirst(); // all args after 2 go to the function
-      funcArgs->removeFirst();
-#endif
-      int r = (const_cast<Window*>(window))->installTimeout(s, i, false);
+
+      // All arguments after the second should go to the function
+      // FIXME: could be more efficient
+      List funcArgs = args.copyTail().copyTail();
+
+      int r = (const_cast<Window*>(window))->installTimeout(func, funcArgs, i, false);
       return Number(r);
     }
     else
diff --git a/WebCore/khtml/ecma/kjs_window.h b/WebCore/khtml/ecma/kjs_window.h
index 25fde98..621f763 100644
--- a/WebCore/khtml/ecma/kjs_window.h
+++ b/WebCore/khtml/ecma/kjs_window.h
@@ -89,6 +89,7 @@ namespace KJS {
     virtual void put(ExecState *exec, const Identifier &propertyName, const Value &value, int attr = None);
     virtual bool toBoolean(ExecState *exec) const;
     int installTimeout(const UString &handler, int t, bool singleShot);
+    int installTimeout(const Value &function, List &args, int t, bool singleShot);
     void clearTimeout(int timerId);
 #ifdef APPLE_CHANGES
     bool hasTimeouts();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list