[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:24:26 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 67df70e96dfb246462356144f5607a00e9806fdc
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 12 00:55:18 2003 +0000
Reviewed by Dave.
- fixed 3170403 -- nil-dereference in addEventListener
* khtml/ecma/kjs_dom.cpp: (DOMNodeProtoFunc::tryCall): Check getJSEventListener result for nil.
* khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Check getJSEventListener result for nil.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index ebf3cc9..b13612f 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,12 @@
+2003-02-11 Darin Adler <darin at apple.com>
+
+ Reviewed by Dave.
+
+ - fixed 3170403 -- nil-dereference in addEventListener
+
+ * khtml/ecma/kjs_dom.cpp: (DOMNodeProtoFunc::tryCall): Check getJSEventListener result for nil.
+ * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Check getJSEventListener result for nil.
+
2003-02-11 Trey Matteson <trey at apple.com>
Set -seg1addr in our build styles, but not for the B&I build.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index ebf3cc9..b13612f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,12 @@
+2003-02-11 Darin Adler <darin at apple.com>
+
+ Reviewed by Dave.
+
+ - fixed 3170403 -- nil-dereference in addEventListener
+
+ * khtml/ecma/kjs_dom.cpp: (DOMNodeProtoFunc::tryCall): Check getJSEventListener result for nil.
+ * khtml/ecma/kjs_window.cpp: (WindowFunc::tryCall): Check getJSEventListener result for nil.
+
2003-02-11 Trey Matteson <trey at apple.com>
Set -seg1addr in our build styles, but not for the B&I build.
diff --git a/WebCore/khtml/ecma/kjs_dom.cpp b/WebCore/khtml/ecma/kjs_dom.cpp
index 23e11a4..fdfb994 100644
--- a/WebCore/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/khtml/ecma/kjs_dom.cpp
@@ -437,12 +437,14 @@ Value DOMNodeProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &ar
return Boolean(node.isSupported(args[0].toString(exec).string(),args[1].toString(exec).string()));
case DOMNode::AddEventListener: {
JSEventListener *listener = Window::retrieveActive(exec)->getJSEventListener(args[1]);
- node.addEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
+ if (listener)
+ node.addEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
return Undefined();
}
case DOMNode::RemoveEventListener: {
JSEventListener *listener = Window::retrieveActive(exec)->getJSEventListener(args[1]);
- node.removeEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
+ if (listener)
+ node.removeEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
return Undefined();
}
case DOMNode::DispatchEvent:
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index d87b806..0ba9fcf 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -1442,26 +1442,30 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
return Undefined();
JSEventListener *listener = Window::retrieveActive(exec)->getJSEventListener(args[1]);
- DOM::Document doc = part->document();
- if (doc.isHTMLDocument()) {
- DOM::HTMLDocument htmlDoc = doc;
- htmlDoc.body().addEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
+ if (listener) {
+ DOM::Document doc = part->document();
+ if (doc.isHTMLDocument()) {
+ DOM::HTMLDocument htmlDoc = doc;
+ htmlDoc.body().addEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
+ }
+ else
+ doc.addEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
}
- else
- doc.addEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
return Undefined();
}
case Window::RemoveEventListener: {
if (!window->isSafeScript(exec))
return Undefined();
JSEventListener *listener = Window::retrieveActive(exec)->getJSEventListener(args[1]);
- DOM::Document doc = part->document();
- if (doc.isHTMLDocument()) {
- DOM::HTMLDocument htmlDoc = doc;
- htmlDoc.body().removeEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
+ if (listener) {
+ DOM::Document doc = part->document();
+ if (doc.isHTMLDocument()) {
+ DOM::HTMLDocument htmlDoc = doc;
+ htmlDoc.body().removeEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
+ }
+ else
+ doc.removeEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
}
- else
- doc.removeEventListener(args[0].toString(exec).string(),listener,args[2].toBoolean(exec));
return Undefined();
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list