<!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>[19937] tags/Safari-5522.1</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/19937">19937</a></dd>
<dt>Author</dt> <dd>bdash</dd>
<dt>Date</dt> <dd>2007-03-01 21:18:26 -0800 (Thu, 01 Mar 2007)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge in r19921.
2007-02-28 Brady Eidson <beidson@apple.com>
Reviewed by Beth
Move the Thread Safety Check functions into their own header for export to WebKit
* WebCore.exp: Export the function
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGeneratorObjC.pm: Include the new header
* platform/Logging.h: Move stuff to ThreadCheck.h
* platform/ThreadCheck.h: Added.
* platform/mac/LoggingMac.mm: Move stuff to ThreadCheck.mm
* platform/mac/ThreadCheck.mm: Added.
(WebCore::_WebCoreThreadViolationCheck):
(WebCoreReportThreadViolation):
2007-02-28 Brady Eidson <beidson@apple.com>
Reviewed by Beth
Start using the Thread Safety Check implemented in WebCore for the DOM bindings in the rest of
the WebKit API instead of the ASSERT_MAIN_THREAD() hack
* History/WebBackForwardList.mm:
(-[WebBackForwardList initWithWebCoreBackForwardList:]):
(-[WebBackForwardList init]):
(-[WebBackForwardList dealloc]):
(-[WebBackForwardList finalize]):
* History/WebHistoryItem.mm:
(-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
(-[WebHistoryItem dealloc]):
(-[WebHistoryItem finalize]):
(-[WebHistoryItem copyWithZone:]):
(-[WebHistoryItem initWithWebCoreHistoryItem:]):
* Misc/WebIconDatabase.mm:
(-[WebIconDatabase init]):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#tagsSafari55221WebCoreChangeLog">tags/Safari-5522.1/WebCore/ChangeLog</a></li>
<li><a href="#tagsSafari55221WebCoreWebCoreexp">tags/Safari-5522.1/WebCore/WebCore.exp</a></li>
<li><a href="#tagsSafari55221WebCoreWebCorexcodeprojprojectpbxproj">tags/Safari-5522.1/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#tagsSafari55221WebCorebindingsscriptsCodeGeneratorObjCpm">tags/Safari-5522.1/WebCore/bindings/scripts/CodeGeneratorObjC.pm</a></li>
<li><a href="#tagsSafari55221WebCoreplatformLoggingh">tags/Safari-5522.1/WebCore/platform/Logging.h</a></li>
<li><a href="#tagsSafari55221WebCoreplatformmacLoggingMacmm">tags/Safari-5522.1/WebCore/platform/mac/LoggingMac.mm</a></li>
<li><a href="#tagsSafari55221WebKitChangeLog">tags/Safari-5522.1/WebKit/ChangeLog</a></li>
<li><a href="#tagsSafari55221WebKitHistoryWebBackForwardListmm">tags/Safari-5522.1/WebKit/History/WebBackForwardList.mm</a></li>
<li><a href="#tagsSafari55221WebKitHistoryWebHistoryItemmm">tags/Safari-5522.1/WebKit/History/WebHistoryItem.mm</a></li>
<li><a href="#tagsSafari55221WebKitMiscWebIconDatabasemm">tags/Safari-5522.1/WebKit/Misc/WebIconDatabase.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#tagsSafari55221WebCoreplatformThreadCheckh">tags/Safari-5522.1/WebCore/platform/ThreadCheck.h</a></li>
<li><a href="#tagsSafari55221WebCoreplatformmacThreadCheckmm">tags/Safari-5522.1/WebCore/platform/mac/ThreadCheck.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="tagsSafari55221WebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-5522.1/WebCore/ChangeLog (19936 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebCore/ChangeLog        2007-03-02 04:47:26 UTC (rev 19936)
+++ tags/Safari-5522.1/WebCore/ChangeLog        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2007-02-28 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Beth
+
+ Move the Thread Safety Check functions into their own header for export to WebKit
+
+ * WebCore.exp: Export the function
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/scripts/CodeGeneratorObjC.pm: Include the new header
+ * platform/Logging.h: Move stuff to ThreadCheck.h
+ * platform/ThreadCheck.h: Added.
+ * platform/mac/LoggingMac.mm: Move stuff to ThreadCheck.mm
+ * platform/mac/ThreadCheck.mm: Added.
+ (WebCore::_WebCoreThreadViolationCheck):
+ (WebCoreReportThreadViolation):
+
</ins><span class="cx"> 2007-02-25 Mitz Pettel <mitz@webkit.org>
</span><span class="cx">
</span><span class="cx"> Reviewed by David Hyatt.
</span></span></pre></div>
<a id="tagsSafari55221WebCoreWebCoreexp"></a>
<div class="modfile"><h4>Modified: tags/Safari-5522.1/WebCore/WebCore.exp (19936 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebCore/WebCore.exp        2007-03-02 04:47:26 UTC (rev 19936)
+++ tags/Safari-5522.1/WebCore/WebCore.exp        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -311,6 +311,7 @@
</span><span class="cx"> __ZN7WebCore21isBackForwardLoadTypeENS_13FrameLoadTypeE
</span><span class="cx"> __ZN7WebCore24notifyHistoryItemChangedE
</span><span class="cx"> __ZN7WebCore26NetscapePlugInStreamLoader6createEPNS_5FrameEP11objc_object
</span><ins>+__ZN7WebCore28_WebCoreThreadViolationCheckEPKc
</ins><span class="cx"> __ZN7WebCore36InitializeLoggingChannelsIfNecessaryEv
</span><span class="cx"> __ZN7WebCore3macERKNS_23AuthenticationChallengeE
</span><span class="cx"> __ZN7WebCore4FontC1ERKNS_16FontPlatformDataEb
</span></span></pre></div>
<a id="tagsSafari55221WebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: tags/Safari-5522.1/WebCore/WebCore.xcodeproj/project.pbxproj (19936 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebCore/WebCore.xcodeproj/project.pbxproj        2007-03-02 04:47:26 UTC (rev 19936)
+++ tags/Safari-5522.1/WebCore/WebCore.xcodeproj/project.pbxproj        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -328,6 +328,8 @@
</span><span class="cx">                 51D3EA160A3D24D300BADA35 /* SQLDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D3EA130A3D24D300BADA35 /* SQLDatabase.cpp */; };
</span><span class="cx">                 51D3EA170A3D24D300BADA35 /* SQLDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D3EA140A3D24D300BADA35 /* SQLDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 51D3EA180A3D24D300BADA35 /* SQLStatement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D3EA150A3D24D300BADA35 /* SQLStatement.cpp */; };
</span><ins>+                51DF6D7E0B92A16D00C2DC85 /* ThreadCheck.h in Headers */ = {isa = PBXBuildFile; fileRef = 51DF6D7D0B92A16D00C2DC85 /* ThreadCheck.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51DF6D7F0B92A18E00C2DC85 /* ThreadCheck.mm */; };
</ins><span class="cx">                 51F11E150A48C2920034A24E /* SQLTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F11E140A48C2920034A24E /* SQLTransaction.cpp */; };
</span><span class="cx">                 550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 550A0BC7085F6039007353D6 /* QualifiedName.cpp */; };
</span><span class="cx">                 550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */ = {isa = PBXBuildFile; fileRef = 550A0BC8085F6039007353D6 /* QualifiedName.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -3426,6 +3428,8 @@
</span><span class="cx">                 51D3EA130A3D24D300BADA35 /* SQLDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SQLDatabase.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 51D3EA140A3D24D300BADA35 /* SQLDatabase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SQLDatabase.h; sourceTree = "<group>"; };
</span><span class="cx">                 51D3EA150A3D24D300BADA35 /* SQLStatement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SQLStatement.cpp; sourceTree = "<group>"; };
</span><ins>+                51DF6D7D0B92A16D00C2DC85 /* ThreadCheck.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadCheck.h; sourceTree = "<group>"; };
+                51DF6D7F0B92A18E00C2DC85 /* ThreadCheck.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ThreadCheck.mm; sourceTree = "<group>"; };
</ins><span class="cx">                 51F11E140A48C2920034A24E /* SQLTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SQLTransaction.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 51F6A3D50663BF04004D2919 /* HTMLCanvasElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLCanvasElement.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 51F6A3D60663BF04004D2919 /* HTMLCanvasElement.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLCanvasElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
</span><span class="lines">@@ -6857,6 +6861,7 @@
</span><span class="cx">                                 1402645D0AFDC19B005919E2 /* LoggingMac.mm */,
</span><span class="cx">                                 65F5382409B2B57500F3DC4A /* mac-encodings.txt */,
</span><span class="cx">                                 A70023FF0B02BECC00170215 /* MimeTypeRegistryMac.mm */,
</span><ins>+                                A7D3C5230B576B4B002CA450 /* PasteboardHelper.h */,
</ins><span class="cx">                                 4B2709810AF2E5E00065127F /* PasteboardMac.mm */,
</span><span class="cx">                                 935C476F09AC4D7300A6AAB4 /* PlatformMouseEventMac.mm */,
</span><span class="cx">                                 BC3FCAA80AC3DB5800BA54AD /* PlatformScrollBar.h */,
</span><span class="lines">@@ -6875,6 +6880,7 @@
</span><span class="cx">                                 93B0FD890A759BED0080AD44 /* StringMac.mm */,
</span><span class="cx">                                 6582A15509999D6D00BEEB6D /* SystemTimeMac.cpp */,
</span><span class="cx">                                 9352071B09BD3BBB00F2038D /* TextBoundaries.mm */,
</span><ins>+                                51DF6D7F0B92A18E00C2DC85 /* ThreadCheck.mm */,
</ins><span class="cx">                                 F5517DC2031AB56301A80180 /* WebCoreHistory.h */,
</span><span class="cx">                                 F5517DC3031AB56301A80180 /* WebCoreHistory.m */,
</span><span class="cx">                                 84B2B1F7056BEF3A00D2B771 /* WebCoreKeyGenerator.h */,
</span><span class="lines">@@ -6893,7 +6899,6 @@
</span><span class="cx">                                 BC6DADF90A19602B00E5CD14 /* WebFontCache.mm */,
</span><span class="cx">                                 935C477209AC4D7700A6AAB4 /* WheelEventMac.mm */,
</span><span class="cx">                                 9380F47709A11ACC001FDB34 /* WidgetMac.mm */,
</span><del>-                                A7D3C5230B576B4B002CA450 /* PasteboardHelper.h */,
</del><span class="cx">                         );
</span><span class="cx">                         path = mac;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -9083,6 +9088,7 @@
</span><span class="cx">                                 F587853C02DE375901EA4122 /* DeprecatedValueListImpl.cpp */,
</span><span class="cx">                                 F587853B02DE375901EA4122 /* DeprecatedValueListImpl.h */,
</span><span class="cx">                                 A7B6E69D0B291A9600D0529F /* DragData.h */,
</span><ins>+                                A79546420B5C4CB4007B438F /* DragData.cpp */,
</ins><span class="cx">                                 A7CFB3D00B7ED10A0070C32D /* DragImage.h */,
</span><span class="cx">                                 A7CFB3CF0B7ED10A0070C32D /* DragImage.cpp */,
</span><span class="cx">                                 934FE9E40B5CA539003E4A73 /* FileChooser.cpp */,
</span><span class="lines">@@ -9166,12 +9172,12 @@
</span><span class="cx">                                 F587853902DE375901EA4122 /* TextStream.cpp */,
</span><span class="cx">                                 F58786BF02DE3B8601EA4122 /* TextStream.h */,
</span><span class="cx">                                 93AC8DE00A955FAC00239794 /* TextStyle.h */,
</span><ins>+                                51DF6D7D0B92A16D00C2DC85 /* ThreadCheck.h */,
</ins><span class="cx">                                 93309EA1099EB78C0056E581 /* Timer.cpp */,
</span><span class="cx">                                 9305B24C098F1B6B00C28855 /* Timer.h */,
</span><span class="cx">                                 9380F47109A11AB4001FDB34 /* Widget.cpp */,
</span><span class="cx">                                 9380F47209A11AB4001FDB34 /* Widget.h */,
</span><span class="cx">                                 93B780C909B3B7FE00690162 /* WidgetClient.h */,
</span><del>-                                A79546420B5C4CB4007B438F /* DragData.cpp */,
</del><span class="cx">                         );
</span><span class="cx">                         path = platform;
</span><span class="cx">                         sourceTree = "<group>";
</span><span class="lines">@@ -11153,6 +11159,7 @@
</span><span class="cx">                                 AB4CB4EB0B8BDA3D009F40B0 /* JSHTMLSelectElementCustom.h in Headers */,
</span><span class="cx">                                 06A6A73D0B8BA44800DF1703 /* StringTruncator.h in Headers */,
</span><span class="cx">                                 934D9BA70B8C1175007B42A9 /* WebCoreNSStringExtras.h in Headers */,
</span><ins>+                                51DF6D7E0B92A16D00C2DC85 /* ThreadCheck.h in Headers */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span><span class="lines">@@ -12517,6 +12524,7 @@
</span><span class="cx">                                 DD05FE0E0B8BA3C6009ACDFE /* WebCoreObjCExtras.c in Sources */,
</span><span class="cx">                                 06A6A73C0B8BA44800DF1703 /* StringTruncator.cpp in Sources */,
</span><span class="cx">                                 934D9BA50B8C116B007B42A9 /* WebCoreNSStringExtras.mm in Sources */,
</span><ins>+                                51DF6D800B92A18E00C2DC85 /* ThreadCheck.mm in Sources */,
</ins><span class="cx">                         );
</span><span class="cx">                         runOnlyForDeploymentPostprocessing = 0;
</span><span class="cx">                 };
</span></span></pre></div>
<a id="tagsSafari55221WebCorebindingsscriptsCodeGeneratorObjCpm"></a>
<div class="modfile"><h4>Modified: tags/Safari-5522.1/WebCore/bindings/scripts/CodeGeneratorObjC.pm (19936 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebCore/bindings/scripts/CodeGeneratorObjC.pm        2007-03-02 04:47:26 UTC (rev 19936)
+++ tags/Safari-5522.1/WebCore/bindings/scripts/CodeGeneratorObjC.pm        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -978,6 +978,7 @@
</span><span class="cx"> push(@implContentHeader, "\n#import \"config.h\"\n");
</span><span class="cx"> push(@implContentHeader, "\n#import \"logging.h\"\n");
</span><span class="cx"> push(@implContentHeader, "\n#ifdef ${conditional}_SUPPORT\n\n") if $conditional;
</span><ins>+ push(@implContentHeader, "\n#import \"ThreadCheck.h\"\n");
</ins><span class="cx"> push(@implContentHeader, "#import \"$classHeaderName.h\"\n\n");
</span><span class="cx"> push(@implContentHeader, "#import <wtf/GetPtr.h>\n\n");
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari55221WebCoreplatformLoggingh"></a>
<div class="modfile"><h4>Modified: tags/Safari-5522.1/WebCore/platform/Logging.h (19936 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebCore/platform/Logging.h        2007-03-02 04:47:26 UTC (rev 19936)
+++ tags/Safari-5522.1/WebCore/platform/Logging.h        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -51,14 +51,6 @@
</span><span class="cx"> extern WTFLogChannel LogNetwork;
</span><span class="cx">
</span><span class="cx"> void InitializeLoggingChannelsIfNecessary();
</span><ins>+}
</ins><span class="cx">
</span><del>- void _WebCoreThreadViolationCheck(const char* function);
-} // namespace WebCore
-
-extern "C" void WebCoreReportThreadViolation(const char* funciton, bool threadViolationIsException);
-
-#define WebCoreThreadViolationCheck() do \
-WebCore::_WebCoreThreadViolationCheck(WTF_PRETTY_FUNCTION); \
-while (0)
-
</del><span class="cx"> #endif // Logging_h
</span></span></pre></div>
<a id="tagsSafari55221WebCoreplatformThreadCheckhfromrev19921trunkWebCoreplatformThreadCheckh"></a>
<div class="copfile"><h4>Copied: tags/Safari-5522.1/WebCore/platform/ThreadCheck.h (from rev 19921, trunk/WebCore/platform/ThreadCheck.h) (0 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebCore/platform/ThreadCheck.h         (rev 0)
+++ tags/Safari-5522.1/WebCore/platform/ThreadCheck.h        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef ThreadCheck_h
+#define ThreadCheck_h
+
+namespace WebCore {
+ void _WebCoreThreadViolationCheck(const char* function);
+}
+
+extern "C" void WebCoreReportThreadViolation(const char* function, bool threadViolationIsException);
+
+#define WebCoreThreadViolationCheck() do \
+WebCore::_WebCoreThreadViolationCheck(WTF_PRETTY_FUNCTION); \
+while (0)
+
+#endif
</ins></span></pre></div>
<a id="tagsSafari55221WebCoreplatformmacLoggingMacmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-5522.1/WebCore/platform/mac/LoggingMac.mm (19936 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebCore/platform/mac/LoggingMac.mm        2007-03-02 04:47:26 UTC (rev 19936)
+++ tags/Safari-5522.1/WebCore/platform/mac/LoggingMac.mm        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -64,42 +64,4 @@
</span><span class="cx"> initializeWithUserDefault(LogNetwork);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-void _WebCoreThreadViolationCheck(const char* function)
-{
- static bool fetchDefault = true;
- static bool performThreadCheck = true;
- static bool threadViolationIsException = false;
- if (fetchDefault) {
- NSString *threadCheckLevel = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebCoreThreadCheck"];
- if ([threadCheckLevel isEqualToString:@"None"])
- performThreadCheck = false;
- else if ([threadCheckLevel isEqualToString:@"Exception"]) {
- performThreadCheck = true;
- threadViolationIsException = true;
- } else if ([threadCheckLevel isEqualToString:@"Log"]) {
- performThreadCheck = true;
- threadViolationIsException = false;
- }
- fetchDefault = false;
- }
-
- if (!performThreadCheck)
- return;
-
- if (pthread_main_np())
- return;
-
- WebCoreReportThreadViolation(function, threadViolationIsException);
</del><span class="cx"> }
</span><del>-
-} // namespace WebCore
-
-// Split out the actual reporting of the thread violation to make it easier to set a breakpoint
-void WebCoreReportThreadViolation(const char* function, bool threadViolationIsException)
-{
- if (threadViolationIsException)
- [NSException raise:@"WebKitThreadingException" format:@"%s was called from a secondary thread", function];
- else
- NSLog(@"WebKit Threading Violation - %s called from secondary thread", function);
-}
</del></span></pre></div>
<a id="tagsSafari55221WebCoreplatformmacThreadCheckmmfromrev19921trunkWebCoreplatformmacThreadCheckmm"></a>
<div class="copfile"><h4>Copied: tags/Safari-5522.1/WebCore/platform/mac/ThreadCheck.mm (from rev 19921, trunk/WebCore/platform/mac/ThreadCheck.mm) (0 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebCore/platform/mac/ThreadCheck.mm         (rev 0)
+++ tags/Safari-5522.1/WebCore/platform/mac/ThreadCheck.mm        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#import "config.h"
+#import "ThreadCheck.h"
+
+namespace WebCore {
+
+void _WebCoreThreadViolationCheck(const char* function)
+{
+ static bool fetchDefault = true;
+ static bool performThreadCheck = true;
+ static bool threadViolationIsException = false;
+ if (fetchDefault) {
+ NSString *threadCheckLevel = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebCoreThreadCheck"];
+ if ([threadCheckLevel isEqualToString:@"None"])
+ performThreadCheck = false;
+ else if ([threadCheckLevel isEqualToString:@"Exception"]) {
+ performThreadCheck = true;
+ threadViolationIsException = true;
+ } else if ([threadCheckLevel isEqualToString:@"Log"]) {
+ performThreadCheck = true;
+ threadViolationIsException = false;
+ }
+ fetchDefault = false;
+ }
+
+ if (!performThreadCheck)
+ return;
+
+ if (pthread_main_np())
+ return;
+
+ WebCoreReportThreadViolation(function, threadViolationIsException);
+}
+
+} // namespace WebCore
+
+// Split out the actual reporting of the thread violation to make it easier to set a breakpoint
+void WebCoreReportThreadViolation(const char* function, bool threadViolationIsException)
+{
+ if (threadViolationIsException)
+ [NSException raise:@"WebKitThreadingException" format:@"%s was called from a secondary thread", function];
+ else
+ NSLog(@"WebKit Threading Violation - %s called from secondary thread", function);
+}
</ins></span></pre></div>
<a id="tagsSafari55221WebKitChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-5522.1/WebKit/ChangeLog (19936 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebKit/ChangeLog        2007-03-02 04:47:26 UTC (rev 19936)
+++ tags/Safari-5522.1/WebKit/ChangeLog        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2007-02-28 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Beth
+
+ Start using the Thread Safety Check implemented in WebCore for the DOM bindings in the rest of
+ the WebKit API instead of the ASSERT_MAIN_THREAD() hack
+
+ * History/WebBackForwardList.mm:
+ (-[WebBackForwardList initWithWebCoreBackForwardList:]):
+ (-[WebBackForwardList init]):
+ (-[WebBackForwardList dealloc]):
+ (-[WebBackForwardList finalize]):
+ * History/WebHistoryItem.mm:
+ (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
+ (-[WebHistoryItem dealloc]):
+ (-[WebHistoryItem finalize]):
+ (-[WebHistoryItem copyWithZone:]):
+ (-[WebHistoryItem initWithWebCoreHistoryItem:]):
+ * Misc/WebIconDatabase.mm:
+ (-[WebIconDatabase init]):
+
</ins><span class="cx"> 2007-02-23 Mitz Pettel <mitz@webkit.org>
</span><span class="cx">
</span><span class="cx"> Reviewed by Maciej.
</span></span></pre></div>
<a id="tagsSafari55221WebKitHistoryWebBackForwardListmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-5522.1/WebKit/History/WebBackForwardList.mm (19936 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebKit/History/WebBackForwardList.mm        2007-03-02 04:47:26 UTC (rev 19936)
+++ tags/Safari-5522.1/WebKit/History/WebBackForwardList.mm        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #import <WebCore/BackForwardList.h>
</span><span class="cx"> #import <WebCore/HistoryItem.h>
</span><span class="cx"> #import <WebCore/RetainPtr.h>
</span><ins>+#import <WebCore/ThreadCheck.h>
</ins><span class="cx"> #import <WebCore/WebCoreObjCExtras.h>
</span><span class="cx">
</span><span class="cx"> #define COMPUTE_DEFAULT_PAGE_CACHE_SIZE UINT_MAX
</span><span class="lines">@@ -99,6 +100,7 @@
</span><span class="cx">
</span><span class="cx"> - (id)initWithWebCoreBackForwardList:(PassRefPtr<BackForwardList>)list
</span><span class="cx"> {
</span><ins>+ WebCoreThreadViolationCheck();
</ins><span class="cx"> self = [super init];
</span><span class="cx"> if (!self)
</span><span class="cx"> return nil;
</span><span class="lines">@@ -121,6 +123,7 @@
</span><span class="cx">
</span><span class="cx"> - (id)init
</span><span class="cx"> {
</span><ins>+ WebCoreThreadViolationCheck();
</ins><span class="cx"> self = [super init];
</span><span class="cx"> if (!self) {
</span><span class="cx"> return nil;
</span><span class="lines">@@ -137,6 +140,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><ins>+ WebCoreThreadViolationCheck();
</ins><span class="cx"> BackForwardList* coreList = core(_private);
</span><span class="cx"> ASSERT(coreList->closed());
</span><span class="cx"> backForwardListWrappers().remove(coreList);
</span><span class="lines">@@ -147,7 +151,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)finalize
</span><span class="cx"> {
</span><del>- ASSERT_MAIN_THREAD();
</del><ins>+ WebCoreThreadViolationCheck();
</ins><span class="cx"> BackForwardList* coreList = core(_private);
</span><span class="cx"> ASSERT(coreList->closed());
</span><span class="cx"> backForwardListWrappers().remove(coreList);
</span></span></pre></div>
<a id="tagsSafari55221WebKitHistoryWebHistoryItemmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-5522.1/WebKit/History/WebHistoryItem.mm (19936 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebKit/History/WebHistoryItem.mm        2007-03-02 04:47:26 UTC (rev 19936)
+++ tags/Safari-5522.1/WebKit/History/WebHistoryItem.mm        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> #import <WebCore/KURL.h>
</span><span class="cx"> #import <WebCore/PageState.h>
</span><span class="cx"> #import <WebCore/PlatformString.h>
</span><ins>+#import <WebCore/ThreadCheck.h>
</ins><span class="cx"> #import <WebCore/WebCoreObjCExtras.h>
</span><span class="cx"> #import <WebKitSystemInterface.h>
</span><span class="cx">
</span><span class="lines">@@ -96,12 +97,13 @@
</span><span class="cx">
</span><span class="cx"> - (id)initWithURLString:(NSString *)URLString title:(NSString *)title lastVisitedTimeInterval:(NSTimeInterval)time
</span><span class="cx"> {
</span><ins>+ WebCoreThreadViolationCheck();
</ins><span class="cx"> return [self initWithWebCoreHistoryItem:(new HistoryItem(URLString, title, time))];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)dealloc
</span><span class="cx"> {
</span><del>- ASSERT_MAIN_THREAD();
</del><ins>+ WebCoreThreadViolationCheck();
</ins><span class="cx"> if (_private) {
</span><span class="cx"> HistoryItem* coreItem = core(_private);
</span><span class="cx"> coreItem->deref();
</span><span class="lines">@@ -112,7 +114,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)finalize
</span><span class="cx"> {
</span><del>- ASSERT_MAIN_THREAD();
</del><ins>+ WebCoreThreadViolationCheck();
</ins><span class="cx"> // FIXME: The WebCore::HistoryItem d'tor is what releases the history item's icon from the icon database
</span><span class="cx"> // It's probably not good to release icons from the database only when the object is garbage-collected.
</span><span class="cx"> // Need to change design so this happens at a predictable time.
</span><span class="lines">@@ -126,7 +128,7 @@
</span><span class="cx">
</span><span class="cx"> - (id)copyWithZone:(NSZone *)zone
</span><span class="cx"> {
</span><del>- ASSERT_MAIN_THREAD();
</del><ins>+ WebCoreThreadViolationCheck();
</ins><span class="cx"> WebHistoryItem *copy = (WebHistoryItem *)NSCopyObject(self, 0, zone);
</span><span class="cx"> RefPtr<HistoryItem> item = core(_private)->copy();
</span><span class="cx"> copy->_private = kitPrivate(item.get());
</span><span class="lines">@@ -280,7 +282,7 @@
</span><span class="cx">
</span><span class="cx"> - (id)initWithWebCoreHistoryItem:(PassRefPtr<HistoryItem>)item
</span><span class="cx"> {
</span><del>- ASSERT_MAIN_THREAD();
</del><ins>+ WebCoreThreadViolationCheck();
</ins><span class="cx"> // Need to tell WebCore what function to call for the
</span><span class="cx"> // "History Item has Changed" notification - no harm in doing this
</span><span class="cx"> // everytime a WebHistoryItem is created
</span></span></pre></div>
<a id="tagsSafari55221WebKitMiscWebIconDatabasemm"></a>
<div class="modfile"><h4>Modified: tags/Safari-5522.1/WebKit/Misc/WebIconDatabase.mm (19936 => 19937)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-5522.1/WebKit/Misc/WebIconDatabase.mm        2007-03-02 04:47:26 UTC (rev 19936)
+++ tags/Safari-5522.1/WebKit/Misc/WebIconDatabase.mm        2007-03-02 05:18:26 UTC (rev 19937)
</span><span class="lines">@@ -37,7 +37,9 @@
</span><span class="cx"> #import <WebCore/IconDatabase.h>
</span><span class="cx"> #import <WebCore/Image.h>
</span><span class="cx"> #import <WebCore/IntSize.h>
</span><ins>+#import <WebCore/ThreadCheck.h>
</ins><span class="cx">
</span><ins>+
</ins><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="cx"> NSString * const WebIconDatabaseVersionKey = @"WebIconDatabaseVersion";
</span><span class="lines">@@ -85,7 +87,8 @@
</span><span class="cx"> - init
</span><span class="cx"> {
</span><span class="cx"> [super init];
</span><del>-
</del><ins>+ WebCoreThreadViolationCheck();
+
</ins><span class="cx"> _private = [[WebIconDatabasePrivate alloc] init];
</span><span class="cx">
</span><span class="cx"> // Check the user defaults and see if the icon database should even be enabled.
</span></span></pre>
</div>
</div>
</body>
</html>