[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
ggaren at apple.com
ggaren at apple.com
Thu Oct 29 20:37:08 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 1f68bf4adeeb4441b3bc2f9ef211fea7a0711b90
Author: ggaren at apple.com <ggaren at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 1 00:40:10 2009 +0000
Fixed https://bugs.webkit.org/show_bug.cgi?id=29941
REGRESSION (r48882-r48888): Many memory leaks on SnowLeopard leaks bot
Patch by Geoffrey Garen <ggaren at apple.com> on 2009-09-30
Reviewed by Mark Rowe.
Forgot to implement a destructor for JSDOMWindowBaseData, so it was
leaking its RefPtr data member.
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::destroyJSDOMWindowBaseData):
* bindings/js/JSDOMWindowBase.h:
(WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData::JSDOMWindowBaseData):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48952 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index bdae905..edc9450 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-09-30 Geoffrey Garen <ggaren at apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Fixed https://bugs.webkit.org/show_bug.cgi?id=29941
+ REGRESSION (r48882-r48888): Many memory leaks on SnowLeopard leaks bot
+
+ Forgot to implement a destructor for JSDOMWindowBaseData, so it was
+ leaking its RefPtr data member.
+
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::destroyJSDOMWindowBaseData):
+ * bindings/js/JSDOMWindowBase.h:
+ (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData::JSDOMWindowBaseData):
+
2009-09-30 Dave Hyatt <hyatt at apple.com>
Reviewed by Tim Hatcher.
diff --git a/WebCore/bindings/js/JSDOMGlobalObject.h b/WebCore/bindings/js/JSDOMGlobalObject.h
index 00c3bbf..ce26857 100644
--- a/WebCore/bindings/js/JSDOMGlobalObject.h
+++ b/WebCore/bindings/js/JSDOMGlobalObject.h
@@ -73,6 +73,12 @@ namespace WebCore {
{
}
+ JSDOMGlobalObjectData(Destructor destructor)
+ : JSGlobalObjectData(destructor)
+ , evt(0)
+ {
+ }
+
JSDOMStructureMap structures;
JSDOMConstructorMap constructors;
diff --git a/WebCore/bindings/js/JSDOMWindowBase.cpp b/WebCore/bindings/js/JSDOMWindowBase.cpp
index fe4d59c..a04ef89 100644
--- a/WebCore/bindings/js/JSDOMWindowBase.cpp
+++ b/WebCore/bindings/js/JSDOMWindowBase.cpp
@@ -42,12 +42,6 @@ namespace WebCore {
const ClassInfo JSDOMWindowBase::s_info = { "Window", 0, 0, 0 };
-JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData(PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
- : impl(window)
- , shell(shell)
-{
-}
-
JSDOMWindowBase::JSDOMWindowBase(NonNullPassRefPtr<Structure> structure, PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
: JSDOMGlobalObject(structure, new JSDOMWindowBaseData(window, shell), shell)
{
@@ -175,6 +169,11 @@ JSGlobalData* JSDOMWindowBase::commonJSGlobalData()
return globalData;
}
+void JSDOMWindowBase::destroyJSDOMWindowBaseData(void* jsDOMWindowBaseData)
+{
+ delete static_cast<JSDOMWindowBaseData*>(jsDOMWindowBaseData);
+}
+
// JSDOMGlobalObject* is ignored, accesing a window in any context will
// use that DOMWindow's prototype chain.
JSValue toJS(ExecState* exec, JSDOMGlobalObject*, DOMWindow* domWindow)
diff --git a/WebCore/bindings/js/JSDOMWindowBase.h b/WebCore/bindings/js/JSDOMWindowBase.h
index 09fe4bc..52c3c1d 100644
--- a/WebCore/bindings/js/JSDOMWindowBase.h
+++ b/WebCore/bindings/js/JSDOMWindowBase.h
@@ -76,7 +76,12 @@ namespace WebCore {
private:
struct JSDOMWindowBaseData : public JSDOMGlobalObjectData {
- JSDOMWindowBaseData(PassRefPtr<DOMWindow>, JSDOMWindowShell*);
+ JSDOMWindowBaseData(PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
+ : JSDOMGlobalObjectData(destroyJSDOMWindowBaseData)
+ , impl(window)
+ , shell(shell)
+ {
+ }
RefPtr<DOMWindow> impl;
JSDOMWindowShell* shell;
@@ -85,6 +90,8 @@ namespace WebCore {
bool allowsAccessFromPrivate(const JSC::JSGlobalObject*) const;
String crossDomainAccessErrorMessage(const JSC::JSGlobalObject*) const;
+ static void destroyJSDOMWindowBaseData(void*);
+
JSDOMWindowBaseData* d() const { return static_cast<JSDOMWindowBaseData*>(JSC::JSVariableObject::d); }
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list