Title: [154312] trunk/Source/WebKit/mac
- Revision
- 154312
- Author
- [email protected]
- Date
- 2013-08-19 22:34:46 -0700 (Mon, 19 Aug 2013)
Log Message
<https://webkit.org/b/120051> Remove the Mail thread workaround
Reviewed by Sam Weinig.
Remove the workaround for a very old version of Mail added in r39455.
* WebView/WebArchive.mm:
(-[WebArchive initWithMainResource:subresources:subframeArchives:]):
(-[WebArchive mainResource]):
(-[WebArchive subresources]):
(-[WebArchive subframeArchives]):
* WebView/WebFrameView.mm:
(-[WebFrameView initWithFrame:]):
* WebView/WebResource.mm:
(-[WebResource data]):
(-[WebResource URL]):
(-[WebResource MIMEType]):
(-[WebResource textEncodingName]):
(-[WebResource frameName]):
(-[WebResource _ignoreWhenUnarchiving]):
(-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
(-[WebResource _suggestedFilename]):
(-[WebResource _response]):
(-[WebResource _stringValue]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (154311 => 154312)
--- trunk/Source/WebKit/mac/ChangeLog 2013-08-20 04:49:37 UTC (rev 154311)
+++ trunk/Source/WebKit/mac/ChangeLog 2013-08-20 05:34:46 UTC (rev 154312)
@@ -1,3 +1,30 @@
+2013-08-19 Ryosuke Niwa <[email protected]>
+
+ <https://webkit.org/b/120051> Remove the Mail thread workaround
+
+ Reviewed by Sam Weinig.
+
+ Remove the workaround for a very old version of Mail added in r39455.
+
+ * WebView/WebArchive.mm:
+ (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
+ (-[WebArchive mainResource]):
+ (-[WebArchive subresources]):
+ (-[WebArchive subframeArchives]):
+ * WebView/WebFrameView.mm:
+ (-[WebFrameView initWithFrame:]):
+ * WebView/WebResource.mm:
+ (-[WebResource data]):
+ (-[WebResource URL]):
+ (-[WebResource MIMEType]):
+ (-[WebResource textEncodingName]):
+ (-[WebResource frameName]):
+ (-[WebResource _ignoreWhenUnarchiving]):
+ (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
+ (-[WebResource _suggestedFilename]):
+ (-[WebResource _response]):
+ (-[WebResource _stringValue]):
+
2013-08-19 Pratik Solanki <[email protected]>
<https://webkit.org/b/119918> Frame::selection() should return a reference
Modified: trunk/Source/WebKit/mac/WebView/WebArchive.mm (154311 => 154312)
--- trunk/Source/WebKit/mac/WebView/WebArchive.mm 2013-08-20 04:49:37 UTC (rev 154311)
+++ trunk/Source/WebKit/mac/WebView/WebArchive.mm 2013-08-20 05:34:46 UTC (rev 154312)
@@ -146,11 +146,6 @@
- (id)initWithMainResource:(WebResource *)mainResource subresources:(NSArray *)subresources subframeArchives:(NSArray *)subframeArchives
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] initWithMainResource:mainResource subresources:subresources subframeArchives:subframeArchives];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
self = [super init];
@@ -276,11 +271,6 @@
- (WebResource *)mainResource
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] mainResource];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
// Currently from WebKit API perspective, WebArchives are entirely immutable once created
@@ -296,11 +286,6 @@
- (NSArray *)subresources
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] subresources];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
// Currently from WebKit API perspective, WebArchives are entirely immutable once created
@@ -329,11 +314,6 @@
- (NSArray *)subframeArchives
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] subframeArchives];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
// Currently from WebKit API perspective, WebArchives are entirely immutable once created
Modified: trunk/Source/WebKit/mac/WebView/WebFrameView.mm (154311 => 154312)
--- trunk/Source/WebKit/mac/WebView/WebFrameView.mm 2013-08-20 04:49:37 UTC (rev 154311)
+++ trunk/Source/WebKit/mac/WebView/WebFrameView.mm 2013-08-20 05:34:46 UTC (rev 154312)
@@ -338,11 +338,6 @@
setDefaultThreadViolationBehavior(LogOnFirstThreadViolation, ThreadViolationRoundOne);
bool throwExceptionsForRoundTwo = WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITH_ROUND_TWO_MAIN_THREAD_EXCEPTIONS);
-#ifdef MAIL_THREAD_WORKAROUND
- // Even if old Mail is linked with new WebKit, don't throw exceptions.
- if ([WebResource _needMailThreadWorkaroundIfCalledOffMainThread])
- throwExceptionsForRoundTwo = false;
-#endif
if (!throwExceptionsForRoundTwo)
setDefaultThreadViolationBehavior(LogOnFirstThreadViolation, ThreadViolationRoundTwo);
}
Modified: trunk/Source/WebKit/mac/WebView/WebResource.mm (154311 => 154312)
--- trunk/Source/WebKit/mac/WebView/WebResource.mm 2013-08-20 04:49:37 UTC (rev 154311)
+++ trunk/Source/WebKit/mac/WebView/WebResource.mm 2013-08-20 05:34:46 UTC (rev 154312)
@@ -203,11 +203,6 @@
- (NSData *)data
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] data];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
if (!_private->coreResource)
@@ -219,11 +214,6 @@
- (NSURL *)URL
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] URL];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
if (!_private->coreResource)
@@ -234,11 +224,6 @@
- (NSString *)MIMEType
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] MIMEType];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
if (!_private->coreResource)
@@ -249,11 +234,6 @@
- (NSString *)textEncodingName
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] textEncodingName];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
if (!_private->coreResource)
@@ -264,11 +244,6 @@
- (NSString *)frameName
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] frameName];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
if (!_private->coreResource)
@@ -319,13 +294,6 @@
// FIXME: This "ignoreWhenUnarchiving" concept is an ugly one - can we find a cleaner solution for those who need this SPI?
- (void)_ignoreWhenUnarchiving
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround()) {
- [[self _webkit_invokeOnMainThread] _ignoreWhenUnarchiving];
- return;
- }
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
if (!_private->coreResource)
@@ -341,11 +309,6 @@
response:(NSURLResponse *)response
copyData:(BOOL)copyData
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] _initWithData:data URL:URL MIMEType:MIMEType textEncodingName:textEncodingName frameName:frameName response:response copyData:copyData];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
self = [super init];
@@ -377,11 +340,6 @@
- (NSString *)_suggestedFilename
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] _suggestedFilename];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
if (!_private->coreResource)
@@ -402,11 +360,6 @@
- (NSURLResponse *)_response
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] _response];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
NSURLResponse *response = nil;
@@ -417,11 +370,6 @@
- (NSString *)_stringValue
{
-#ifdef MAIL_THREAD_WORKAROUND
- if (needMailThreadWorkaround())
- return [[self _webkit_invokeOnMainThread] _stringValue];
-#endif
-
WebCoreThreadViolationCheckRoundTwo();
WebCore::TextEncoding encoding;
@@ -435,19 +383,3 @@
}
@end
-
-#ifdef MAIL_THREAD_WORKAROUND
-
-static const double newMailBundleVersion = 1050.0;
-
-@implementation WebResource (WebMailThreadWorkaround)
-
-+ (BOOL)_needMailThreadWorkaroundIfCalledOffMainThread
-{
- static BOOL isOldMail = applicationIsAppleMail() && [[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey] doubleValue] < newMailBundleVersion;
- return isOldMail;
-}
-
-@end
-
-#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes