[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
abarth at webkit.org
abarth at webkit.org
Tue Jan 5 23:42:12 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit c4fb21f75d05226d47e17bcac1689defc0e23d43
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 4 05:55:46 2009 +0000
2009-12-03 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
OwnPtr<Tokenizer> Document::m_tokenizer;
https://bugs.webkit.org/show_bug.cgi?id=32145
The document actually owns the tokenizer. That's what the code should say.
* dom/Document.cpp:
(WebCore::Document::removedLastRef):
(WebCore::Document::~Document):
(WebCore::Document::cancelParsing):
(WebCore::Document::implicitOpen):
(WebCore::Document::implicitClose):
* dom/Document.h:
(WebCore::Document::tokenizer):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a963177..ee92363 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,24 @@
Reviewed by Eric Seidel.
+ OwnPtr<Tokenizer> Document::m_tokenizer;
+ https://bugs.webkit.org/show_bug.cgi?id=32145
+
+ The document actually owns the tokenizer. That's what the code should say.
+
+ * dom/Document.cpp:
+ (WebCore::Document::removedLastRef):
+ (WebCore::Document::~Document):
+ (WebCore::Document::cancelParsing):
+ (WebCore::Document::implicitOpen):
+ (WebCore::Document::implicitClose):
+ * dom/Document.h:
+ (WebCore::Document::tokenizer):
+
+2009-12-03 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
OwnPtr<RenderArena> Document::m_renderArena;
https://bugs.webkit.org/show_bug.cgi?id=32146
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index e4b2713..d9f0503 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -445,8 +445,7 @@ void Document::removedLastRef()
deleteAllValues(m_markers);
m_markers.clear();
- delete m_tokenizer;
- m_tokenizer = 0;
+ m_tokenizer.clear();
m_cssCanvasElements.clear();
@@ -480,7 +479,7 @@ Document::~Document()
forgetAllDOMNodesForDocument(this);
#endif
- delete m_tokenizer;
+ m_tokenizer.clear();
m_document = 0;
delete m_styleSelector;
m_docLoader.clear();
@@ -1593,8 +1592,7 @@ void Document::cancelParsing()
// the onload handler when closing as a side effect of a cancel-style
// change, such as opening a new document or closing the window while
// still parsing
- delete m_tokenizer;
- m_tokenizer = 0;
+ m_tokenizer.clear();
close();
}
}
@@ -1603,8 +1601,7 @@ void Document::implicitOpen()
{
cancelParsing();
- delete m_tokenizer;
- m_tokenizer = 0;
+ m_tokenizer.clear();
removeChildren();
@@ -1701,8 +1698,7 @@ void Document::implicitClose()
// We have to clear the tokenizer, in case someone document.write()s from the
// onLoad event handler, as in Radar 3206524.
- delete m_tokenizer;
- m_tokenizer = 0;
+ m_tokenizer.clear();
// Parser should have picked up all preloads by now
m_docLoader->clearPreloads();
diff --git a/WebCore/dom/Document.h b/WebCore/dom/Document.h
index 3fc6165..aa3c37e 100644
--- a/WebCore/dom/Document.h
+++ b/WebCore/dom/Document.h
@@ -506,7 +506,7 @@ public:
CSSStyleSheet* mappedElementSheet();
virtual Tokenizer* createTokenizer();
- Tokenizer* tokenizer() { return m_tokenizer; }
+ Tokenizer* tokenizer() { return m_tokenizer.get(); }
bool printing() const { return m_printing; }
void setPrinting(bool p) { m_printing = p; }
@@ -961,7 +961,7 @@ private:
Frame* m_frame;
OwnPtr<DocLoader> m_docLoader;
- Tokenizer* m_tokenizer;
+ OwnPtr<Tokenizer> m_tokenizer;
bool m_wellFormed;
// Document URLs.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list