<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[23936] trunk/WebCore</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/23936">23936</a></dd>
<dt>Author</dt> <dd>darin</dd>
<dt>Date</dt> <dd>2007-07-02 16:29:41 -0700 (Mon, 02 Jul 2007)</dd>
</dl>
<h3>Log Message</h3>
<pre> Reviewed by Kevin Decker and Tim Hatcher.
- fix <rdar://problem/5307906> some classes need finalize methods because
of non-trivial work done in dealloc methods
* bindings/objc/DOMRGBColor.mm:
(+[DOMRGBColor initialize]): Added. Tells finalizer to run on main thread,
which is needed because we are sharing a CFDictionary here with no locking.
* bridge/mac/WebCoreAXObject.mm:
(+[WebCoreAXObject initialize]): Added. Tells finalizer to run on main thread.
(-[WebCoreAXObject finalize]): Added. Calls detach.
* WebCore.xcodeproj/project.pbxproj: Let Xcode do what it wants to do.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreWebCorexcodeprojprojectpbxproj">trunk/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkWebCorebindingsobjcDOMRGBColormm">trunk/WebCore/bindings/objc/DOMRGBColor.mm</a></li>
<li><a href="#trunkWebCorebridgemacWebCoreAXObjectmm">trunk/WebCore/bridge/mac/WebCoreAXObject.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (23935 => 23936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2007-07-02 23:20:41 UTC (rev 23935)
+++ trunk/WebCore/ChangeLog        2007-07-02 23:29:41 UTC (rev 23936)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2007-07-02 Darin Adler <darin@apple.com>
+
+ Reviewed by Kevin Decker and Tim Hatcher.
+
+ - fix <rdar://problem/5307906> some classes need finalize methods because
+ of non-trivial work done in dealloc methods
+
+ * bindings/objc/DOMRGBColor.mm:
+ (+[DOMRGBColor initialize]): Added. Tells finalizer to run on main thread,
+ which is needed because we are sharing a CFDictionary here with no locking.
+
+ * bridge/mac/WebCoreAXObject.mm:
+ (+[WebCoreAXObject initialize]): Added. Tells finalizer to run on main thread.
+ (-[WebCoreAXObject finalize]): Added. Calls detach.
+
+ * WebCore.xcodeproj/project.pbxproj: Let Xcode do what it wants to do.
+
</ins><span class="cx"> 2007-07-02 Sam Weinig <sam@webkit.org>
</span><span class="cx">
</span><span class="cx"> Reviewed by Darin.
</span></span></pre></div>
<a id="trunkWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/WebCore.xcodeproj/project.pbxproj (23935 => 23936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2007-07-02 23:20:41 UTC (rev 23935)
+++ trunk/WebCore/WebCore.xcodeproj/project.pbxproj        2007-07-02 23:29:41 UTC (rev 23936)
</span><span class="lines">@@ -11681,6 +11681,7 @@
</span><span class="cx">                 0867D690FE84028FC02AAC07 /* Project object */ = {
</span><span class="cx">                         isa = PBXProject;
</span><span class="cx">                         buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
</span><ins>+                        compatibilityVersion = "Xcode 2.4";
</ins><span class="cx">                         hasScannedForEncodings = 1;
</span><span class="cx">                         knownRegions = (
</span><span class="cx">                                 English,
</span></span></pre></div>
<a id="trunkWebCorebindingsobjcDOMRGBColormm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bindings/objc/DOMRGBColor.mm (23935 => 23936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bindings/objc/DOMRGBColor.mm        2007-07-02 23:20:41 UTC (rev 23935)
+++ trunk/WebCore/bindings/objc/DOMRGBColor.mm        2007-07-02 23:29:41 UTC (rev 23936)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2004-2006 Apple Computer, Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
</ins><span class="cx"> * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
</span><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #import "Color.h"
</span><span class="cx"> #import "DOMCSSPrimitiveValue.h"
</span><span class="cx"> #import "DOMInternal.h"
</span><ins>+#import "WebCoreObjCExtras.h"
</ins><span class="cx"> #import <wtf/GetPtr.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -65,6 +66,13 @@
</span><span class="cx">
</span><span class="cx"> @implementation DOMRGBColor
</span><span class="cx">
</span><ins>+#ifndef BUILDING_ON_TIGER
++ (void)initialize
+{
+ WebCoreObjCFinalizeOnMainThread(self);
+}
+#endif
+
</ins><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><span class="cx"> WebCore::removeWrapperForRGB(reinterpret_cast<uintptr_t>(_internal));
</span></span></pre></div>
<a id="trunkWebCorebridgemacWebCoreAXObjectmm"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/bridge/mac/WebCoreAXObject.mm (23935 => 23936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/bridge/mac/WebCoreAXObject.mm        2007-07-02 23:20:41 UTC (rev 23935)
+++ trunk/WebCore/bridge/mac/WebCoreAXObject.mm        2007-07-02 23:29:41 UTC (rev 23936)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx"> */
</span><span class="cx">
</span><del>-#include "config.h"
</del><ins>+#import "config.h"
</ins><span class="cx"> #import "WebCoreAXObject.h"
</span><span class="cx">
</span><span class="cx"> #import "DOMInternal.h"
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx"> #import "TextIterator.h"
</span><span class="cx"> #import "WebCoreFrameBridge.h"
</span><span class="cx"> #import "WebCoreFrameView.h"
</span><ins>+#import "WebCoreObjCExtras.h"
</ins><span class="cx"> #import "WebCoreViewFactory.h"
</span><span class="cx"> #import "htmlediting.h"
</span><span class="cx"> #import "kjs_html.h"
</span><span class="lines">@@ -78,6 +79,13 @@
</span><span class="cx">
</span><span class="cx"> @implementation WebCoreAXObject
</span><span class="cx">
</span><ins>+#ifndef BUILDING_ON_TIGER
++ (void)initialize
+{
+ WebCoreObjCFinalizeOnMainThread(self);
+}
+#endif
+
</ins><span class="cx"> -(id)initWithRenderer:(RenderObject*)renderer
</span><span class="cx"> {
</span><span class="cx"> [super init];
</span><span class="lines">@@ -110,6 +118,12 @@
</span><span class="cx"> [super dealloc];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)finalize
+{
+ [self detach];
+ [super finalize];
+}
+
</ins><span class="cx"> -(id)data
</span><span class="cx"> {
</span><span class="cx"> return m_data;
</span></span></pre>
</div>
</div>
</body>
</html>