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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:27:01 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit fa2e02970a78e46b3a4d557caeb3bdafcda4b264
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 4 00:09:34 2003 +0000

            Reviewed by Dave.
    
            - fixed 3154394 -- non-repro nil-dereference in DOM::HTMLFormElementImpl::submit
    
            * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::submit):
            Add checks for nil like the other methods in this file have.
    
            - fixed some types to remove a bit of unnecessary overhead
    
            * khtml/ecma/kjs_window.h: Change types.
            * khtml/ecma/kjs_window.cpp:
            (Window::installTimeout): Change parameter to UString, not Identifier.
            (WindowFunc::tryCall): Pass the UString, not Identifier.
            (ScheduledAction::ScheduledAction): Change parameter to use const QString & to avoid
            a bit of overhead.
            (WindowQObject::installTimeout): Change parameter to UString, not Identifier.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3732 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index bff9ec9..db127af 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,22 @@
+2003-03-03  Darin Adler  <darin at apple.com>
+
+        Reviewed by Dave.
+
+        - fixed 3154394 -- non-repro nil-dereference in DOM::HTMLFormElementImpl::submit
+
+        * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::submit):
+        Add checks for nil like the other methods in this file have.
+
+        - fixed some types to remove a bit of unnecessary overhead
+
+        * khtml/ecma/kjs_window.h: Change types.
+        * khtml/ecma/kjs_window.cpp:
+        (Window::installTimeout): Change parameter to UString, not Identifier.
+        (WindowFunc::tryCall): Pass the UString, not Identifier.
+        (ScheduledAction::ScheduledAction): Change parameter to use const QString & to avoid
+        a bit of overhead.
+        (WindowQObject::installTimeout): Change parameter to UString, not Identifier.
+
 2003-03-03  David Hyatt  <hyatt at apple.com>
 
 	I messed up when i merged Lars' quirks color patch for CSS with
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index bff9ec9..db127af 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,22 @@
+2003-03-03  Darin Adler  <darin at apple.com>
+
+        Reviewed by Dave.
+
+        - fixed 3154394 -- non-repro nil-dereference in DOM::HTMLFormElementImpl::submit
+
+        * khtml/html/html_formimpl.cpp: (HTMLFormElementImpl::submit):
+        Add checks for nil like the other methods in this file have.
+
+        - fixed some types to remove a bit of unnecessary overhead
+
+        * khtml/ecma/kjs_window.h: Change types.
+        * khtml/ecma/kjs_window.cpp:
+        (Window::installTimeout): Change parameter to UString, not Identifier.
+        (WindowFunc::tryCall): Pass the UString, not Identifier.
+        (ScheduledAction::ScheduledAction): Change parameter to use const QString & to avoid
+        a bit of overhead.
+        (WindowQObject::installTimeout): Change parameter to UString, not Identifier.
+
 2003-03-03  David Hyatt  <hyatt at apple.com>
 
 	I messed up when i merged Lars' quirks color patch for CSS with
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index c077ff3..3e6c324 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -880,7 +880,7 @@ bool Window::toBoolean(ExecState *) const
   return !m_part.isNull();
 }
 
-int Window::installTimeout(const Identifier &handler, int t, bool singleShot)
+int Window::installTimeout(const UString &handler, int t, bool singleShot)
 {
   return winq->installTimeout(handler, t, singleShot);
 }
@@ -1345,7 +1345,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
         return Undefined();
     if (args.size() == 2 && v.isA(StringType)) {
       int i = args[1].toInt32(exec);
-      int r = (const_cast<Window*>(window))->installTimeout(Identifier(s), i, true /*single shot*/);
+      int r = (const_cast<Window*>(window))->installTimeout(s, i, true /*single shot*/);
       return Number(r);
     }
     else if (args.size() >= 2 && v.isA(ObjectType) && Object::dynamicCast(v).implementsCall()) {
@@ -1357,7 +1357,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
       funcArgs->removeFirst(); // all args after 2 go to the function
       funcArgs->removeFirst();
 #endif
-      int r = (const_cast<Window*>(window))->installTimeout(Identifier(s), i, true /*single shot*/);
+      int r = (const_cast<Window*>(window))->installTimeout(s, i, true /*single shot*/);
       return Number(r);
     }
     else
@@ -1367,7 +1367,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
         return Undefined();
     if (args.size() >= 2 && v.isA(StringType)) {
       int i = args[1].toInt32(exec);
-      int r = (const_cast<Window*>(window))->installTimeout(Identifier(s), i, false);
+      int r = (const_cast<Window*>(window))->installTimeout(s, i, false);
       return Number(r);
     }
     else if (args.size() >= 2 && !Object::dynamicCast(v).isNull() &&
@@ -1380,7 +1380,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
       funcArgs->removeFirst(); // all args after 2 go to the function
       funcArgs->removeFirst();
 #endif
-      int r = (const_cast<Window*>(window))->installTimeout(Identifier(s), i, false);
+      int r = (const_cast<Window*>(window))->installTimeout(s, i, false);
       return Number(r);
     }
     else
@@ -1477,7 +1477,7 @@ ScheduledAction::ScheduledAction(Object _func, List _args, bool _singleShot)
   singleShot = _singleShot;
 }
 
-ScheduledAction::ScheduledAction(QString _code, bool _singleShot)
+ScheduledAction::ScheduledAction(const QString &_code, bool _singleShot)
 {
   //kdDebug(6070) << "ScheduledAction::ScheduledAction(!isFunction) " << this << endl;
   //func = 0;
@@ -1550,7 +1550,7 @@ void WindowQObject::parentDestroyed()
   scheduledActions.clear();
 }
 
-int WindowQObject::installTimeout(const Identifier &handler, int t, bool singleShot)
+int WindowQObject::installTimeout(const UString &handler, int t, bool singleShot)
 {
   //kdDebug(6070) << "WindowQObject::installTimeout " << this << " " << handler.ascii() << endl;
   int id = startTimer(t);
diff --git a/WebCore/khtml/ecma/kjs_window.h b/WebCore/khtml/ecma/kjs_window.h
index b160938..14e7f9c 100644
--- a/WebCore/khtml/ecma/kjs_window.h
+++ b/WebCore/khtml/ecma/kjs_window.h
@@ -88,7 +88,7 @@ namespace KJS {
     virtual Value get(ExecState *exec, const Identifier &propertyName) const;
     virtual void put(ExecState *exec, const Identifier &propertyName, const Value &value, int attr = None);
     virtual bool toBoolean(ExecState *exec) const;
-    int installTimeout(const Identifier &handler, int t, bool singleShot);
+    int installTimeout(const UString &handler, int t, bool singleShot);
     void clearTimeout(int timerId);
 #ifdef APPLE_CHANGES
     bool hasTimeouts();
@@ -143,7 +143,7 @@ namespace KJS {
   class ScheduledAction {
   public:
     ScheduledAction(Object _func, List _args, bool _singleShot);
-    ScheduledAction(QString _code, bool _singleShot);
+    ScheduledAction(const QString &_code, bool _singleShot);
     ~ScheduledAction();
     void execute(Window *window);
 
@@ -159,7 +159,7 @@ namespace KJS {
   public:
     WindowQObject(Window *w);
     ~WindowQObject();
-    int installTimeout(const Identifier &handler, int t, bool singleShot);
+    int installTimeout(const UString &handler, int t, bool singleShot);
     int installTimeout(const Value &func, List args, int t, bool singleShot);
     void clearTimeout(int timerId, bool delAction = true);
 #ifdef APPLE_CHANGES
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index 6b05cdf..15f2e66 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -501,6 +501,11 @@ bool HTMLFormElementImpl::prepareSubmit()
 
 void HTMLFormElementImpl::submit( bool activateSubmitButton )
 {
+    KHTMLView *view = getDocument()->view();
+    if (!view || !view->part()) {
+        return;
+    }
+
     if ( m_insubmit ) {
         m_doingsubmit = true;
         return;
@@ -515,7 +520,6 @@ void HTMLFormElementImpl::submit( bool activateSubmitButton )
     HTMLGenericFormElementImpl* firstSuccessfulSubmitButton = 0;
     bool needButtonActivation = activateSubmitButton;	// do we need to activate a submit button?
     
-    KHTMLView *view = getDocument()->view();
 #if APPLE_CHANGES
     KWQ(view->part())->clearRecordedFormValues();
 #endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list