[webkit-changes] cvs commit: WebCore/khtml/xml dom_nodeimpl.h
Adele
adele at opensource.apple.com
Tue Jul 12 09:32:12 PDT 2005
adele 05/07/12 09:32:11
Modified: . Tag: Safari-2-0-branch ChangeLog
khtml/html Tag: Safari-2-0-branch html_imageimpl.cpp
khtml/xml Tag: Safari-2-0-branch dom_nodeimpl.h
Log:
Merged fix from TOT to Safari-2-0-branch
<rdar://problem/4164931> crash in DOM::ElementImpl::setAttribute at www.nitto-kohki.co.jp
2005-05-11 Adele Peterson <adele at apple.com>
Reviewed by Darin.
fix for <rdar://problem/4061979> crash in DOM::ElementImpl::setAttribute at www.nitto-kohki.co.jp
* khtml/html/html_imageimpl.cpp: (HTMLImageLoader::updateFromElement): added a nil check for the document
* khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::inDocument): added check for document in case the document has been destroyed before the node has been removed. A lot of code already assumes that if inDocument returns true, a document exists.
Revision Changes Path
No revision
No revision
1.4104.2.46 +14 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4104.2.45
retrieving revision 1.4104.2.46
diff -u -r1.4104.2.45 -r1.4104.2.46
--- ChangeLog 12 Jul 2005 00:45:36 -0000 1.4104.2.45
+++ ChangeLog 12 Jul 2005 16:32:03 -0000 1.4104.2.46
@@ -1,3 +1,17 @@
+2005-07-12 Adele Peterson <adele at apple.com>
+
+ Merged fix from TOT to Safari-2-0-branch
+ <rdar://problem/4164931> crash in DOM::ElementImpl::setAttribute at www.nitto-kohki.co.jp
+
+ 2005-05-11 Adele Peterson <adele at apple.com>
+
+ Reviewed by Darin.
+
+ fix for <rdar://problem/4061979> crash in DOM::ElementImpl::setAttribute at www.nitto-kohki.co.jp
+
+ * khtml/html/html_imageimpl.cpp: (HTMLImageLoader::updateFromElement): added a nil check for the document
+ * khtml/xml/dom_nodeimpl.h: (DOM::NodeImpl::inDocument): added check for document in case the document has been destroyed before the node has been removed. A lot of code already assumes that if inDocument returns true, a document exists.
+
2005-07-11 Adele Peterson <adele at apple.com>
Merged fix from TOT to Safari-2-0-branch
No revision
No revision
1.38.8.1 +2 -1 WebCore/khtml/html/html_imageimpl.cpp
Index: html_imageimpl.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/html/html_imageimpl.cpp,v
retrieving revision 1.38
retrieving revision 1.38.8.1
diff -u -r1.38 -r1.38.8.1
--- html_imageimpl.cpp 1 Mar 2005 22:42:40 -0000 1.38
+++ html_imageimpl.cpp 12 Jul 2005 16:32:10 -0000 1.38.8.1
@@ -70,7 +70,8 @@
{
// If we're not making renderers for the page, then don't load images. We don't want to slow
// down the raw HTML parsing case by loading images we don't intend to display.
- if (!element()->getDocument()->renderer())
+ DocumentImpl* document = element()->getDocument();
+ if (!document || !document->renderer())
return;
AtomicString attr;
No revision
No revision
1.75.8.2 +2 -1 WebCore/khtml/xml/dom_nodeimpl.h
Index: dom_nodeimpl.h
===================================================================
RCS file: /cvs/root/WebCore/khtml/xml/dom_nodeimpl.h,v
retrieving revision 1.75.8.1
retrieving revision 1.75.8.2
diff -u -r1.75.8.1 -r1.75.8.2
--- dom_nodeimpl.h 27 Apr 2005 00:58:14 -0000 1.75.8.1
+++ dom_nodeimpl.h 12 Jul 2005 16:32:11 -0000 1.75.8.2
@@ -243,7 +243,8 @@
bool changed() const { return m_changed; }
bool hasChangedChild() const { return m_hasChangedChild; }
bool hasAnchor() const { return m_hasAnchor; }
- bool inDocument() const { return m_inDocument; }
+ // inDocument should also make sure a document exists in case the document has been destroyed before the node is removed from the document.
+ bool inDocument() const { return document->document() && m_inDocument; }
bool styleElement() const { return m_styleElement; }
bool implicitNode() const { return m_implicit; }
void setHasID(bool b=true) { m_hasId = b; }
More information about the webkit-changes
mailing list