Remove Objective-C GC support
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Dec 2015 22:41:36 +0000 (22:41 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Dec 2015 22:41:36 +0000 (22:41 +0000)
https://bugs.webkit.org/show_bug.cgi?id=151819
rdar://problem/23746991

Reviewed by Dan Bernstein.

Source/bmalloc:

* Configurations/Base.xcconfig:

Source/JavaScriptCore:

* Configurations/Base.xcconfig:
* Configurations/ToolExecutable.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:

Source/WebCore:

* Configurations/Base.xcconfig:
* bindings/objc/WebScriptObject.mm:
(+[WebScriptObject initialize]): Deleted.
(-[WebScriptObject finalize]): Deleted.
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm:
(-[DOMTestActiveDOMObject finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestCallback.mm:
(-[DOMTestCallback finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm:
(-[DOMTestCallbackFunction finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm:
(-[DOMTestCustomConstructorWithNoInterfaceObject finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm:
(-[DOMTestCustomNamedGetter finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
(-[DOMTestEventConstructor finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestEventTarget.mm:
(-[DOMTestEventTarget finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestException.mm:
(-[DOMTestException finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm:
(-[DOMTestGenerateIsReachable finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestInterface.mm:
(-[DOMTestInterface finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm:
(-[DOMTestJSBuiltinConstructor finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm:
(-[DOMTestMediaQueryListListener finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm:
(-[DOMTestNamedConstructor finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestNondeterministic.mm:
(-[DOMTestNondeterministic finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm:
(-[DOMTestOverloadedConstructors finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.mm:
(-[DOMTestOverrideBuiltins finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
(-[DOMTestSerializedScriptValueInterface finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
(-[DOMTestTypedefs finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMattribute.mm:
(-[DOMattribute finalize]): Deleted.
* bindings/scripts/test/ObjC/DOMreadonly.mm:
(-[DOMreadonly finalize]): Deleted.
* bridge/objc/objc_instance.mm:
(ObjcInstance::virtualBegin):
(allocateAutoReleasePool): Deleted.
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
* platform/mac/SharedBufferMac.mm:
(+[WebCoreSharedBufferData initialize]): Deleted.
(-[WebCoreSharedBufferData finalize]): Deleted.
* platform/mac/WebCoreObjCExtras.h:
(WebCoreObjCFinalizeOnMainThread): Deleted.

Source/WebInspectorUI:

* Configurations/Base.xcconfig:

Source/WebKit/mac:

* Carbon/CarbonWindowAdapter.mm:
(+[CarbonWindowAdapter initialize]): Deleted.
(-[CarbonWindowAdapter finalize]): Deleted.
* Configurations/Base.xcconfig:
* History/WebBackForwardList.mm:
(+[WebBackForwardList initialize]): Deleted.
(-[WebBackForwardList finalize]): Deleted.
* History/WebHistory.mm:
(-[WebHistoryPrivate finalize]): Deleted.
(-[WebHistory finalize]): Deleted.
* History/WebHistoryItem.mm:
(+[WebHistoryItem initialize]): Deleted.
(-[WebHistoryItem finalize]): Deleted.
* Misc/WebElementDictionary.mm:
(+[WebElementDictionary initialize]): Deleted.
(-[WebElementDictionary finalize]): Deleted.
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(+[WebHostedNetscapePluginView initialize]): Deleted.
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView finalize]): Deleted.
* Plugins/WebBasePluginPackage.mm:
(-[WebBasePluginPackage finalize]): Deleted.
* Plugins/WebNetscapePluginView.mm:
(+[WebNetscapePluginView initialize]): Deleted.
(-[WebNetscapePluginView finalize]): Deleted.
* Plugins/WebPluginContainerCheck.mm:
(-[WebPluginContainerCheck finalize]): Deleted.
* WebCoreSupport/WebEditorClient.mm:
(+[WebUndoStep initialize]): Deleted.
(-[WebUndoStep finalize]): Deleted.
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebCoreSupport/WebOpenPanelResultListener.mm:
(-[WebOpenPanelResultListener finalize]): Deleted.
* WebCoreSupport/WebSecurityOrigin.mm:
(-[WebSecurityOrigin finalize]): Deleted.
* WebView/WebArchive.mm:
(+[WebArchivePrivate initialize]): Deleted.
* WebView/WebDataSource.mm:
(+[WebDataSource initialize]): Deleted.
(-[WebDataSource finalize]): Deleted.
* WebView/WebDynamicScrollBarsView.mm:
(-[WebDynamicScrollBarsView finalize]): Deleted.
* WebView/WebFrame.mm:
(-[WebFramePrivate setWebFrameView:]):
(-[WebFramePrivate finalize]): Deleted.
(-[WebFrame finalize]): Deleted.
* WebView/WebFrameView.mm:
(-[WebFrameView finalize]): Deleted.
* WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation finalize]): Deleted.
* WebView/WebHTMLView.mm:
(+[WebHTMLViewPrivate initialize]):
(-[WebHTMLViewPrivate finalize]): Deleted.
(+[WebHTMLView initialize]): Deleted.
(-[WebHTMLView finalize]): Deleted.
* WebView/WebResource.mm:
(+[WebResourcePrivate initialize]): Deleted.
(-[WebResourcePrivate finalize]): Deleted.
* WebView/WebTextIterator.mm:
(+[WebTextIteratorPrivate initialize]): Deleted.
* WebView/WebView.mm:
(-[WebView finalize]): Deleted.
* WebView/WebViewData.mm:
(+[WebViewPrivate initialize]): Deleted.
(-[WebViewPrivate init]): Deleted.
(-[WebViewPrivate finalize]): Deleted.

Source/WebKit2:

* Configurations/Base.xcconfig:
* Configurations/BaseLegacyProcess.xcconfig:
* Configurations/BaseXPCService.xcconfig:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject): Deleted.

Source/WTF:

* Configurations/Base.xcconfig:
* wtf/ThreadingPthreads.cpp:
(WTF::initializeCurrentThreadInternal): Deleted.
* wtf/text/cf/StringImplCF.cpp:
(WTF::StringImpl::createCFString):
(garbageCollectionEnabled): Deleted.
(WTF::StringWrapperCFAllocator::create): Deleted.

Tools:

* asan/asan.xcconfig:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@193378 268f45cc-cd09-0410-ab3c-d52691b4dbfc

76 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/Base.xcconfig
Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig
Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ANGLE/Configurations/Base.xcconfig
Source/WTF/ChangeLog
Source/WTF/Configurations/Base.xcconfig
Source/WTF/wtf/ThreadingPthreads.cpp
Source/WTF/wtf/text/cf/StringImplCF.cpp
Source/WebCore/ChangeLog
Source/WebCore/Configurations/Base.xcconfig
Source/WebCore/bindings/objc/WebScriptObject.mm
Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallback.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventConstructor.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestEventTarget.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestException.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestInterface.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestNondeterministic.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMTestTypedefs.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMattribute.mm
Source/WebCore/bindings/scripts/test/ObjC/DOMreadonly.mm
Source/WebCore/bridge/objc/objc_instance.mm
Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm
Source/WebCore/platform/mac/SharedBufferMac.mm
Source/WebCore/platform/mac/WebCoreObjCExtras.h
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Configurations/Base.xcconfig
Source/WebKit/mac/Carbon/CarbonWindowAdapter.mm
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/Base.xcconfig
Source/WebKit/mac/History/WebBackForwardList.mm
Source/WebKit/mac/History/WebHistory.mm
Source/WebKit/mac/History/WebHistoryItem.mm
Source/WebKit/mac/Misc/WebElementDictionary.mm
Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
Source/WebKit/mac/Plugins/WebBasePluginPackage.mm
Source/WebKit/mac/Plugins/WebNetscapePluginView.mm
Source/WebKit/mac/Plugins/WebPluginContainerCheck.mm
Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm
Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
Source/WebKit/mac/WebCoreSupport/WebOpenPanelResultListener.mm
Source/WebKit/mac/WebCoreSupport/WebSecurityOrigin.mm
Source/WebKit/mac/WebView/WebArchive.mm
Source/WebKit/mac/WebView/WebDataSource.mm
Source/WebKit/mac/WebView/WebDynamicScrollBarsView.mm
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit/mac/WebView/WebFrameView.mm
Source/WebKit/mac/WebView/WebHTMLRepresentation.mm
Source/WebKit/mac/WebView/WebHTMLView.mm
Source/WebKit/mac/WebView/WebResource.mm
Source/WebKit/mac/WebView/WebTextIterator.mm
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/mac/WebView/WebViewData.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/Base.xcconfig
Source/WebKit2/Configurations/BaseLegacyProcess.xcconfig
Source/WebKit2/Configurations/BaseXPCService.xcconfig
Source/WebKit2/Shared/Cocoa/APIObject.mm
Source/bmalloc/ChangeLog
Source/bmalloc/Configurations/Base.xcconfig
Tools/ChangeLog
Tools/asan/asan.xcconfig

index c7f0ea8..ddab084 100644 (file)
@@ -1,3 +1,14 @@
+2015-12-03  Anders Carlsson  <andersca@apple.com>
+
+        Remove Objective-C GC support
+        https://bugs.webkit.org/show_bug.cgi?id=151819
+        rdar://problem/23746991
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/Base.xcconfig:
+        * Configurations/ToolExecutable.xcconfig:
+
 2015-12-03  Benjamin Poulain  <bpoulain@apple.com>
 
         Attempt to fix GTK again after r193125
index 18daa99..0ccc0a6 100644 (file)
@@ -46,9 +46,6 @@ GCC_DYNAMIC_NO_PIC = NO;
 GCC_ENABLE_CPP_EXCEPTIONS = NO;
 GCC_ENABLE_CPP_RTTI = NO;
 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-GCC_ENABLE_OBJC_GC = $(GCC_ENABLE_OBJC_GC_$(PLATFORM_NAME)_$(USE_INTERNAL_SDK));
-GCC_ENABLE_OBJC_GC_macosx_ = NO;
-GCC_ENABLE_OBJC_GC_macosx_YES = supported;
 GCC_ENABLE_SYMBOL_SEPARATION = NO;
 GCC_FAST_OBJC_DISPATCH = YES;
 GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
index 1002a4f..7180c8e 100644 (file)
@@ -36,7 +36,6 @@ SKIP_INSTALL_ = YES;
 SKIP_INSTALL_NO = YES;
 SKIP_INSTALL_YES = NO;
 
-GCC_ENABLE_OBJC_GC = NO;
 CLANG_ENABLE_OBJC_ARC = $(CLANG_ENABLE_OBJC_ARC_$(CURRENT_ARCH));
 CLANG_ENABLE_OBJC_ARC_i386[sdk=iphonesimulator*] = YES;
 CLANG_ENABLE_OBJC_ARC_x86_64 = YES;
index 0b32cd7..abb66e2 100644 (file)
@@ -1,3 +1,13 @@
+2015-12-03  Anders Carlsson  <andersca@apple.com>
+
+        Remove Objective-C GC support
+        https://bugs.webkit.org/show_bug.cgi?id=151819
+        rdar://problem/23746991
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/Base.xcconfig:
+
 2015-11-30  Dana Burkart  <dburkart@apple.com>
 
         Remove Mountain Lion support from ANGLE
index 5104c04..73c4c7c 100644 (file)
@@ -21,9 +21,6 @@ GCC_ENABLE_CPP_EXCEPTIONS = NO;
 GCC_ENABLE_CPP_RTTI = NO;
 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
 ENABLE_STRICT_OBJC_MSGSEND = YES;
-GCC_ENABLE_OBJC_GC = $(GCC_ENABLE_OBJC_GC_$(PLATFORM_NAME)_$(USE_INTERNAL_SDK));
-GCC_ENABLE_OBJC_GC_macosx_ = NO;
-GCC_ENABLE_OBJC_GC_macosx_YES = supported;
 GCC_ENABLE_SYMBOL_SEPARATION = NO;
 GCC_FAST_OBJC_DISPATCH = YES;
 GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
index 8341647..baad0f2 100644 (file)
@@ -1,3 +1,19 @@
+2015-12-03  Anders Carlsson  <andersca@apple.com>
+
+        Remove Objective-C GC support
+        https://bugs.webkit.org/show_bug.cgi?id=151819
+        rdar://problem/23746991
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/Base.xcconfig:
+        * wtf/ThreadingPthreads.cpp:
+        (WTF::initializeCurrentThreadInternal): Deleted.
+        * wtf/text/cf/StringImplCF.cpp:
+        (WTF::StringImpl::createCFString):
+        (garbageCollectionEnabled): Deleted.
+        (WTF::StringWrapperCFAllocator::create): Deleted.
+
 2015-12-02  Filip Pizlo  <fpizlo@apple.com>
 
         FTL B3 should support OSR exit
index 673d40f..0b04b04 100644 (file)
@@ -47,9 +47,6 @@ GCC_DYNAMIC_NO_PIC = NO;
 GCC_ENABLE_CPP_EXCEPTIONS = NO;
 GCC_ENABLE_CPP_RTTI = NO;
 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-GCC_ENABLE_OBJC_GC = $(GCC_ENABLE_OBJC_GC_$(PLATFORM_NAME)_$(USE_INTERNAL_SDK));
-GCC_ENABLE_OBJC_GC_macosx_ = NO;
-GCC_ENABLE_OBJC_GC_macosx_YES = supported;
 GCC_ENABLE_SYMBOL_SEPARATION = NO;
 GCC_FAST_OBJC_DISPATCH = YES;
 GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
index b5325e1..a97cf32 100644 (file)
 #include <sys/time.h>
 #endif
 
-#if PLATFORM(MAC)
-#include <objc/objc-auto.h>
-#endif
-
 namespace WTF {
 
 class PthreadState {
@@ -199,12 +195,6 @@ void initializeCurrentThreadInternal(const char* threadName)
     UNUSED_PARAM(threadName);
 #endif
 
-#if PLATFORM(MAC)
-    // All threads that potentially use APIs above the BSD layer must be registered with the Objective-C
-    // garbage collector in case API implementations use garbage-collected memory.
-    objc_registerThreadWithCollector();
-#endif
-
     ThreadIdentifier id = identifierByPthreadHandle(pthread_self());
     ASSERT(id);
     ThreadIdentifierData::initialize(id);
index 6fa583b..7bad9a7 100644 (file)
 #include <wtf/RetainPtr.h>
 #include <wtf/Threading.h>
 
-#if PLATFORM(MAC)
-#include <objc/objc-auto.h>
-#endif
-
-static inline bool garbageCollectionEnabled()
-{
-#if PLATFORM(MAC)
-    return objc_collectingEnabled();
-#else
-    return false;
-#endif
-}
-
 namespace WTF {
 
 namespace StringWrapperCFAllocator {
@@ -122,7 +109,6 @@ namespace StringWrapperCFAllocator {
 
     static CFAllocatorRef create()
     {
-        ASSERT(!garbageCollectionEnabled());
         CFAllocatorContext context = { 0, 0, retain, release, copyDescription, allocate, reallocate, deallocate, preferredSize };
         return CFAllocatorCreate(0, &context);
     }
@@ -137,9 +123,7 @@ namespace StringWrapperCFAllocator {
 
 RetainPtr<CFStringRef> StringImpl::createCFString()
 {
-    // Since garbage collection isn't compatible with custom allocators, we
-    // can't use the NoCopy variants of CFStringCreate*() when GC is enabled.
-    if (!m_length || !isMainThread() || garbageCollectionEnabled()) {
+    if (!m_length || !isMainThread()) {
         if (is8Bit())
             return adoptCF(CFStringCreateWithBytes(0, reinterpret_cast<const UInt8*>(characters8()), m_length, kCFStringEncodingISOLatin1, false));
         return adoptCF(CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(characters16()), m_length));
index dd7236d..91d5cd0 100644 (file)
@@ -1,3 +1,69 @@
+2015-12-03  Anders Carlsson  <andersca@apple.com>
+
+        Remove Objective-C GC support
+        https://bugs.webkit.org/show_bug.cgi?id=151819
+        rdar://problem/23746991
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/Base.xcconfig:
+        * bindings/objc/WebScriptObject.mm:
+        (+[WebScriptObject initialize]): Deleted.
+        (-[WebScriptObject finalize]): Deleted.
+        * bindings/scripts/CodeGeneratorObjC.pm:
+        (GenerateImplementation):
+        * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm:
+        (-[DOMTestActiveDOMObject finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestCallback.mm:
+        (-[DOMTestCallback finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm:
+        (-[DOMTestCallbackFunction finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm:
+        (-[DOMTestCustomConstructorWithNoInterfaceObject finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm:
+        (-[DOMTestCustomNamedGetter finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
+        (-[DOMTestEventConstructor finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestEventTarget.mm:
+        (-[DOMTestEventTarget finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestException.mm:
+        (-[DOMTestException finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm:
+        (-[DOMTestGenerateIsReachable finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestInterface.mm:
+        (-[DOMTestInterface finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm:
+        (-[DOMTestJSBuiltinConstructor finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm:
+        (-[DOMTestMediaQueryListListener finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm:
+        (-[DOMTestNamedConstructor finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestNondeterministic.mm:
+        (-[DOMTestNondeterministic finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestObj.mm:
+        (-[DOMTestObj finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm:
+        (-[DOMTestOverloadedConstructors finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.mm:
+        (-[DOMTestOverrideBuiltins finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
+        (-[DOMTestSerializedScriptValueInterface finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
+        (-[DOMTestTypedefs finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMattribute.mm:
+        (-[DOMattribute finalize]): Deleted.
+        * bindings/scripts/test/ObjC/DOMreadonly.mm:
+        (-[DOMreadonly finalize]): Deleted.
+        * bridge/objc/objc_instance.mm:
+        (ObjcInstance::virtualBegin):
+        (allocateAutoReleasePool): Deleted.
+        * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
+        * platform/mac/SharedBufferMac.mm:
+        (+[WebCoreSharedBufferData initialize]): Deleted.
+        (-[WebCoreSharedBufferData finalize]): Deleted.
+        * platform/mac/WebCoreObjCExtras.h:
+        (WebCoreObjCFinalizeOnMainThread): Deleted.
+
 2015-12-03  Zalan Bujtas  <zalan@apple.com>
 
         Simple line layout: Print out simple line layout statistics for the current page from command line.
index 9545c68..d118bfb 100644 (file)
@@ -48,9 +48,6 @@ GCC_DYNAMIC_NO_PIC = NO;
 GCC_ENABLE_CPP_EXCEPTIONS = NO;
 GCC_ENABLE_CPP_RTTI = NO;
 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-GCC_ENABLE_OBJC_GC = $(GCC_ENABLE_OBJC_GC_$(PLATFORM_NAME)_$(USE_INTERNAL_SDK));
-GCC_ENABLE_OBJC_GC_macosx_ = NO;
-GCC_ENABLE_OBJC_GC_macosx_YES = supported;
 GCC_ENABLE_SYMBOL_SEPARATION = NO;
 GCC_FAST_OBJC_DISPATCH = YES;
 GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
index fb6df25..8721438 100644 (file)
@@ -150,7 +150,6 @@ static void addExceptionToConsole(ExecState* exec)
     JSC::initializeThreading();
     WTF::initializeMainThreadToProcessMainThread();
 #endif // !USE(WEB_THREAD)
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 + (id)scriptObjectForJSObject:(JSObjectRef)jsObject originRootObject:(RootObject*)originRootObject rootObject:(RootObject*)rootObject
@@ -290,20 +289,6 @@ static void addExceptionToConsole(ExecState* exec)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_private->rootObject && _private->rootObject->isValid())
-        _private->rootObject->gcUnprotect(_private->imp);
-
-    if (_private->rootObject)
-        _private->rootObject->deref();
-
-    if (_private->originRootObject)
-        _private->originRootObject->deref();
-
-    [super finalize];
-}
-
 + (BOOL)throwException:(NSString *)exceptionMessage
 {
     ObjcInstance::setGlobalException(exceptionMessage);
index 7a274fd..55d4f46 100644 (file)
@@ -133,7 +133,6 @@ my %conflictMethod = (
     "description" => "NSObject",
     "doesNotRecognizeSelector:" => "NSObject",
     "encodeWithCoder:" => "NSObject",
-    "finalize" => "NSObject",
     "forwardInvocation:" => "NSObject",
     "hash" => "NSObject",
     "init" => "NSObject",
@@ -1215,7 +1214,7 @@ sub GenerateImplementation
     # START implementation
     push(@implContent, "\@implementation $className\n\n");
 
-    # Only generate 'dealloc' and 'finalize' methods for direct subclasses of DOMObject.
+    # Only generate 'dealloc' for direct subclasses of DOMObject.
     if ($parentImplClassName eq "Object") {
         $implIncludes{"WebCoreObjCExtras.h"} = 1;
         push(@implContent, "- (void)dealloc\n");
@@ -1234,21 +1233,6 @@ sub GenerateImplementation
         }
         push(@implContent, "    [super dealloc];\n");
         push(@implContent, "}\n\n");
-
-        push(@implContent, "- (void)finalize\n");
-        push(@implContent, "{\n");
-        if ($interfaceName eq "NodeIterator") {
-            push(@implContent, "    if (_internal) {\n");
-            push(@implContent, "        [self detach];\n");
-            push(@implContent, "        IMPL->deref();\n");
-            push(@implContent, "    };\n");
-        } else {
-            push(@implContent, "    if (_internal)\n");
-            push(@implContent, "        IMPL->deref();\n");
-        }
-        push(@implContent, "    [super finalize];\n");
-        push(@implContent, "}\n\n");
-        
     }
 
     %attributeNames = ();
index 0f5816a..c39df64 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (int)excitingAttr
 {
     WebCore::JSMainThreadNullState state;
index 82a6ee5..74523ee 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (BOOL)callbackWithNoParam
 {
     WebCore::JSMainThreadNullState state;
index 5b12ed4..4829f98 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (BOOL)callbackWithNoParam
 {
     WebCore::JSMainThreadNullState state;
index 977e6a8..dab3ed9 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 @end
 
 WebCore::TestCustomConstructorWithNoInterfaceObject* core(DOMTestCustomConstructorWithNoInterfaceObject *wrapper)
index ae75e67..1b851f8 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (void)anotherFunction:(NSString *)str
 {
     WebCore::JSMainThreadNullState state;
index 570740e..bf9bf3d 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (NSString *)attr1
 {
     WebCore::JSMainThreadNullState state;
index 0ea7a93..a1e58f7 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (DOMNode *)item:(unsigned)index
 {
     WebCore::JSMainThreadNullState state;
index 193579c..1526d09 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (NSString *)name
 {
     WebCore::JSMainThreadNullState state;
index 2a2a5ba..c608c91 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 @end
 
 WebCore::TestGenerateIsReachable* core(DOMTestGenerateIsReachable *wrapper)
index 894191b..95b5092 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 #if ENABLE(Condition22) || ENABLE(Condition23)
 - (NSString *)implementsStr1
 {
index e273822..e7418b0 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (BOOL)testAttribute
 {
     WebCore::JSMainThreadNullState state;
index 8e9047c..6c0e439 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (void)method:(DOMMediaQueryListListener *)listener
 {
     WebCore::JSMainThreadNullState state;
index a72f91c..7b9aa17 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 @end
 
 WebCore::TestNamedConstructor* core(DOMTestNamedConstructor *wrapper)
index cddc9ae..4ee25a4 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (int)nondeterministicReadonlyAttr
 {
     WebCore::JSMainThreadNullState state;
index a287f16..b1965c9 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (int)readOnlyLongAttr
 {
     WebCore::JSMainThreadNullState state;
index 0d66f4d..3206679 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 @end
 
 WebCore::TestOverloadedConstructors* core(DOMTestOverloadedConstructors *wrapper)
index 73d6f06..07fa95f 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (DOMNode *)namedItem:(NSString *)name
 {
     WebCore::JSMainThreadNullState state;
index a184fea..3ca67c1 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (NSString *)value
 {
     WebCore::JSMainThreadNullState state;
index 68e32d1..0aeb043 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (unsigned long long)unsignedLongLongAttr
 {
     WebCore::JSMainThreadNullState state;
index 03af170..f8f8d52 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 - (NSString *)readonly
 {
     WebCore::JSMainThreadNullState state;
index 7b625d8..6196f89 100644 (file)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_internal)
-        IMPL->deref();
-    [super finalize];
-}
-
 @end
 
 WebCore::readonly* core(DOMreadonly *wrapper)
index 9d7b249..94e214c 100644 (file)
@@ -33,7 +33,6 @@
 #import "WebScriptObjectProtocol.h"
 #import "runtime/FunctionPrototype.h"
 #import "runtime_method.h"
-#import <objc/objc-auto.h>
 #import <runtime/Error.h>
 #import <runtime/JSLock.h>
 #import <runtime/ObjectPrototype.h>
@@ -137,21 +136,10 @@ ObjcInstance::~ObjcInstance()
     [pool drain];
 }
 
-static NSAutoreleasePool* allocateAutoReleasePool()
-{
-    // If GC is enabled an autorelease pool is unnecessary, and the
-    // pool cannot be protected from GC so may be collected leading
-    // to a crash when we try to drain the release pool.
-    if (objc_collectingEnabled())
-        return nil;
-
-    return [[NSAutoreleasePool alloc] init];
-}
-
 void ObjcInstance::virtualBegin()
 {
     if (!_pool)
-        _pool = allocateAutoReleasePool();
+        _pool = [[NSAutoreleasePool alloc] init];
     _beginCount++;
 }
 
index 8201ecf..d085d3a 100644 (file)
@@ -46,7 +46,6 @@
 #import "WebTiledBackingLayer.h"
 #import <AVFoundation/AVFoundation.h>
 #import <QuartzCore/QuartzCore.h>
-#import <objc/objc-auto.h>
 #import <objc/runtime.h>
 #import <wtf/CurrentTime.h>
 #import <wtf/RetainPtr.h>
index 1ad28ad..b11d089 100644 (file)
@@ -50,7 +50,6 @@ using namespace WebCore;
     JSC::initializeThreading();
     WTF::initializeMainThreadToProcessMainThread();
 #endif // !USE(WEB_THREAD)
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 - (void)dealloc
@@ -61,11 +60,6 @@ using namespace WebCore;
     [super dealloc];
 }
 
-- (void)finalize
-{
-    [super finalize];
-}
-
 - (id)initWithSharedBufferDataBuffer:(SharedBuffer::DataBuffer*)dataBuffer
 {
     self = [super init];
index 4c13169..48c9786 100644 (file)
 #define WebCoreObjCExtras_h
 
 #include <CoreFoundation/CFBase.h>
-#include <objc/objc-auto.h>
-
-inline void WebCoreObjCFinalizeOnMainThread(Class cls)
-{
-#ifndef OBJC_NO_GC
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    // This method relies on threading being initialized by the caller, otherwise
-    // WebCoreObjCScheduleDeallocateOnMainThread will crash.
-    objc_finalizeOnMainThread(cls);
-#pragma clang diagnostic pop
-#else
-    UNUSED_PARAM(cls);
-#endif
-}
 
 // The 'Class' that should be passed in here is the class of the
 // object that implements the dealloc method that this function is called from.
index 1f2726c..2fa950a 100644 (file)
@@ -1,3 +1,13 @@
+2015-12-03  Anders Carlsson  <andersca@apple.com>
+
+        Remove Objective-C GC support
+        https://bugs.webkit.org/show_bug.cgi?id=151819
+        rdar://problem/23746991
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/Base.xcconfig:
+
 2015-12-03  Matt Baker  <mattbaker@apple.com>
 
         Uncaught Exception in Web Inspector: TypeError: null is not an object (evaluating 'dataGridNode.element.classList')
index ca41b52..6780259 100644 (file)
@@ -29,7 +29,6 @@ GCC_DYNAMIC_NO_PIC = YES;
 GCC_ENABLE_CPP_EXCEPTIONS = NO;
 GCC_ENABLE_CPP_RTTI = NO;
 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-GCC_ENABLE_OBJC_GC = NO;
 GCC_FAST_OBJC_DISPATCH = YES;
 GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
 GCC_NO_COMMON_BLOCKS = YES;
index 58a6da8..03830b8 100644 (file)
@@ -273,7 +273,6 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall
     JSC::initializeThreading();
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 // Given a reference to a Carbon window that is to be encapsulated, and an indicator of whether or not this object should take responsibility for disposing of the Carbon window, initialize.
@@ -296,11 +295,6 @@ static OSStatus NSCarbonWindowHandleEvent(EventHandlerCallRef inEventHandlerCall
     [super dealloc];
 }
 
-- (void)finalize {
-    if (_eventHandler) RemoveEventHandler(_eventHandler);
-    [super finalize];
-}
-
 - (WindowRef)windowRef {
 
     // Simple.
index eaef18e..f549039 100644 (file)
@@ -1,3 +1,78 @@
+2015-12-03  Anders Carlsson  <andersca@apple.com>
+
+        Remove Objective-C GC support
+        https://bugs.webkit.org/show_bug.cgi?id=151819
+        rdar://problem/23746991
+
+        Reviewed by Dan Bernstein.
+
+        * Carbon/CarbonWindowAdapter.mm:
+        (+[CarbonWindowAdapter initialize]): Deleted.
+        (-[CarbonWindowAdapter finalize]): Deleted.
+        * Configurations/Base.xcconfig:
+        * History/WebBackForwardList.mm:
+        (+[WebBackForwardList initialize]): Deleted.
+        (-[WebBackForwardList finalize]): Deleted.
+        * History/WebHistory.mm:
+        (-[WebHistoryPrivate finalize]): Deleted.
+        (-[WebHistory finalize]): Deleted.
+        * History/WebHistoryItem.mm:
+        (+[WebHistoryItem initialize]): Deleted.
+        (-[WebHistoryItem finalize]): Deleted.
+        * Misc/WebElementDictionary.mm:
+        (+[WebElementDictionary initialize]): Deleted.
+        (-[WebElementDictionary finalize]): Deleted.
+        * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+        (+[WebHostedNetscapePluginView initialize]): Deleted.
+        * Plugins/WebBaseNetscapePluginView.mm:
+        (-[WebBaseNetscapePluginView finalize]): Deleted.
+        * Plugins/WebBasePluginPackage.mm:
+        (-[WebBasePluginPackage finalize]): Deleted.
+        * Plugins/WebNetscapePluginView.mm:
+        (+[WebNetscapePluginView initialize]): Deleted.
+        (-[WebNetscapePluginView finalize]): Deleted.
+        * Plugins/WebPluginContainerCheck.mm:
+        (-[WebPluginContainerCheck finalize]): Deleted.
+        * WebCoreSupport/WebEditorClient.mm:
+        (+[WebUndoStep initialize]): Deleted.
+        (-[WebUndoStep finalize]): Deleted.
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        * WebCoreSupport/WebOpenPanelResultListener.mm:
+        (-[WebOpenPanelResultListener finalize]): Deleted.
+        * WebCoreSupport/WebSecurityOrigin.mm:
+        (-[WebSecurityOrigin finalize]): Deleted.
+        * WebView/WebArchive.mm:
+        (+[WebArchivePrivate initialize]): Deleted.
+        * WebView/WebDataSource.mm:
+        (+[WebDataSource initialize]): Deleted.
+        (-[WebDataSource finalize]): Deleted.
+        * WebView/WebDynamicScrollBarsView.mm:
+        (-[WebDynamicScrollBarsView finalize]): Deleted.
+        * WebView/WebFrame.mm:
+        (-[WebFramePrivate setWebFrameView:]):
+        (-[WebFramePrivate finalize]): Deleted.
+        (-[WebFrame finalize]): Deleted.
+        * WebView/WebFrameView.mm:
+        (-[WebFrameView finalize]): Deleted.
+        * WebView/WebHTMLRepresentation.mm:
+        (-[WebHTMLRepresentation finalize]): Deleted.
+        * WebView/WebHTMLView.mm:
+        (+[WebHTMLViewPrivate initialize]):
+        (-[WebHTMLViewPrivate finalize]): Deleted.
+        (+[WebHTMLView initialize]): Deleted.
+        (-[WebHTMLView finalize]): Deleted.
+        * WebView/WebResource.mm:
+        (+[WebResourcePrivate initialize]): Deleted.
+        (-[WebResourcePrivate finalize]): Deleted.
+        * WebView/WebTextIterator.mm:
+        (+[WebTextIteratorPrivate initialize]): Deleted.
+        * WebView/WebView.mm:
+        (-[WebView finalize]): Deleted.
+        * WebView/WebViewData.mm:
+        (+[WebViewPrivate initialize]): Deleted.
+        (-[WebViewPrivate init]): Deleted.
+        (-[WebViewPrivate finalize]): Deleted.
+
 2015-12-02  Antti Koivisto  <antti@apple.com>
 
         Move ResourceLoadScheduler to WebKit1
index a146401..7a30a35 100644 (file)
@@ -48,9 +48,6 @@ GCC_DYNAMIC_NO_PIC = NO;
 GCC_ENABLE_CPP_EXCEPTIONS = NO;
 GCC_ENABLE_CPP_RTTI = NO;
 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-GCC_ENABLE_OBJC_GC = $(GCC_ENABLE_OBJC_GC_$(PLATFORM_NAME)_$(USE_INTERNAL_SDK));
-GCC_ENABLE_OBJC_GC_macosx_ = NO;
-GCC_ENABLE_OBJC_GC_macosx_YES = supported;
 GCC_ENABLE_SYMBOL_SEPARATION = NO;
 GCC_FAST_OBJC_DISPATCH = YES;
 GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
index 3762052..79fda38 100644 (file)
@@ -104,7 +104,6 @@ WebBackForwardList *kit(BackForwardList* backForwardList)
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 - (id)init
@@ -128,20 +127,6 @@ WebBackForwardList *kit(BackForwardList* backForwardList)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    WebCoreThreadViolationCheckRoundOne();
-    BackForwardList* backForwardList = core(self);
-    ASSERT(backForwardList);
-    if (backForwardList) {
-        ASSERT(backForwardList->closed());
-        backForwardLists().remove(backForwardList);
-        backForwardList->deref();
-    }
-        
-    [super finalize];
-}
-
 - (void)_close
 {
     core(self)->close();
index 4963a61..115d16f 100644 (file)
@@ -145,11 +145,6 @@ private:
     [super dealloc];
 }
 
-- (void)finalize
-{
-    [super finalize];
-}
-
 // MARK: MODIFYING CONTENTS
 
 static void getDayBoundaries(NSTimeInterval interval, NSTimeInterval& beginningOfDay, NSTimeInterval& beginningOfNextDay)
@@ -739,14 +734,6 @@ static inline WebHistoryDateKey dateKey(NSTimeInterval date)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    [[NSNotificationCenter defaultCenter] removeObserver:self
-                                                    name:NSSystemTimeZoneDidChangeNotification
-                                                  object:nil];
-    [super finalize];
-}
-
 // MARK: MODIFYING CONTENTS
 
 - (void)_sendNotification:(NSString *)name entries:(NSArray *)entries
index 323c255..3f57e36 100644 (file)
@@ -125,7 +125,6 @@ void WKNotifyHistoryItemChanged(HistoryItem*)
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 - (instancetype)init
@@ -154,18 +153,6 @@ void WKNotifyHistoryItemChanged(HistoryItem*)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    WebCoreThreadViolationCheckRoundOne();
-
-    // FIXME: ~HistoryItem is what releases the history item's icon from the icon database
-    // It's probably not good to release icons from the database only when the object is garbage-collected. 
-    // Need to change design so this happens at a predictable time.
-    historyItemWrappers().remove(_private->_historyItem.get());
-
-    [super finalize];
-}
-
 - (id)copyWithZone:(NSZone *)zone
 {
     WebCoreThreadViolationCheckRoundOne();
index 45947d2..2126f75 100644 (file)
@@ -71,7 +71,6 @@ static void cacheValueForKey(const void *key, const void *value, void *self)
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 + (void)initializeLookupTable
@@ -123,12 +122,6 @@ static void cacheValueForKey(const void *key, const void *value, void *self)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    delete _result;
-    [super finalize];
-}
-
 - (void)_fillCache
 {
     CFDictionaryApplyFunction(lookupTable, cacheValueForKey, self);
index ac434ec..b8f8a58 100644 (file)
@@ -76,7 +76,6 @@ extern "C" {
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
     WKSendUserChangeNotifications();
 }
 
index 4d87865..038a1f2 100644 (file)
@@ -76,7 +76,6 @@ using namespace WebCore;
     JSC::initializeThreading();
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
-    WebCoreObjCFinalizeOnMainThread(self);
     WKSendUserChangeNotifications();
 }
 
@@ -128,13 +127,6 @@ using namespace WebCore;
     [super dealloc];
 }
 
-- (void)finalize
-{
-    ASSERT(!_isStarted);
-
-    [super finalize];
-}
-
 - (WebNetscapePluginPackage *)pluginPackage
 {
     return _pluginPackage.get();
index 814f085..5bcee27 100644 (file)
@@ -69,7 +69,6 @@ using namespace WebCore;
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 + (WebBasePluginPackage *)pluginWithPath:(NSString *)pluginPath
@@ -273,14 +272,6 @@ static NSString *pathByResolvingSymlinksAndAliases(NSString *thePath)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    ASSERT(!pluginDatabases || [pluginDatabases count] == 0);
-    [pluginDatabases release];
-
-    [super finalize];
-}
-
 - (const String&)path
 {
     return path;
index 480c8bb..fcfabd2 100644 (file)
@@ -194,7 +194,6 @@ typedef struct {
     JSC::initializeThreading();
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
-    WebCoreObjCFinalizeOnMainThread(self);
     WKSendUserChangeNotifications();
 }
 
@@ -1379,15 +1378,6 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    ASSERT(!_isStarted);
-
-    [self fini];
-
-    [super finalize];
-}
-
 - (void)drawRect:(NSRect)rect
 {
     if (_cachedSnapshot) {
index 884c877..63aaa8c 100644 (file)
@@ -77,13 +77,6 @@ using namespace WebCore;
     return [[[self alloc] initWithRequest:request target:target resultObject:obj selector:selector controller:controller contextInfo:contextInfo] autorelease];
 }
 
-- (void)finalize
-{
-    // mandatory to complete or cancel before releasing this object
-    ASSERT(_done);
-    [super finalize];
-}
-
 - (void)dealloc
 {
     // mandatory to complete or cancel before releasing this object
index c188b9d..b91ad9e 100644 (file)
@@ -119,7 +119,6 @@ static WebViewInsertAction kit(EditorInsertAction coreAction)
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 - (id)initWithUndoStep:(PassRefPtr<UndoStep>)step
@@ -140,11 +139,6 @@ static WebViewInsertAction kit(EditorInsertAction coreAction)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    [super finalize];
-}
-
 + (WebUndoStep *)stepWithUndoStep:(PassRefPtr<UndoStep>)step
 {
     return [[[WebUndoStep alloc] initWithUndoStep:step] autorelease];
index e0faaa1..d2eaf94 100644 (file)
@@ -2303,7 +2303,6 @@ void WebFrameLoaderClient::prefetchDNS(const String& hostname)
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 - (id)initWithFrame:(Frame*)frame policyFunction:(FramePolicyFunction)policyFunction
index 0f95919..b6bd267 100644 (file)
@@ -51,12 +51,6 @@ using namespace WebCore;
     ASSERT(!_chooser);
     [super dealloc];
 }
-
-- (void)finalize
-{
-    ASSERT(!_chooser);
-    [super finalize];
-}
 #endif
 
 - (void)cancel
index f4da169..c6f85de 100644 (file)
@@ -114,13 +114,6 @@ using namespace WebCore;
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_private)
-        reinterpret_cast<SecurityOrigin*>(_private)->deref();
-    [super finalize];
-}
-
 @end
 
 @implementation WebSecurityOrigin (WebInternal)
index 2b6da46..6b63563 100644 (file)
@@ -72,7 +72,6 @@ static NSString * const WebSubframeArchivesKey = @"WebSubframeArchives";
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 - (instancetype)init
index 1197091..2a146de 100644 (file)
@@ -156,7 +156,6 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
         WTF::initializeMainThreadToProcessMainThread();
         RunLoop::initializeMainRunLoop();
 #endif
-        WebCoreObjCFinalizeOnMainThread(self);
     }
 }
 
@@ -440,16 +439,6 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (toPrivate(_private) && toPrivate(_private)->includedInWebKitStatistics)
-        --WebDataSourceCount;
-
-    delete toPrivate(_private);
-
-    [super finalize];
-}
-
 - (NSData *)data
 {
     RefPtr<SharedBuffer> mainResourceData = toPrivate(_private)->loader->mainResourceData();
index a501320..66d7ab1 100644 (file)
@@ -131,12 +131,6 @@ static Class customScrollerClass;
     [super dealloc];
 }
 
-- (void)finalize
-{
-    delete _private;
-    [super finalize];
-}
-
 - (void)setAllowsHorizontalScrolling:(BOOL)flag
 {
     if (_private->hScrollModeLocked)
index 7973800..1723542 100644 (file)
@@ -192,12 +192,7 @@ NSString *NSAccessibilityEnhancedUserInterfaceAttribute = @"AXEnhancedUserInterf
     [super dealloc];
 }
 
-- (void)finalize
-{
-    [super finalize];
-}
-
-- (void)setWebFrameView:(WebFrameView *)v 
+- (void)setWebFrameView:(WebFrameView *)v
 { 
     [v retain];
     [webFrameView release];
@@ -2372,14 +2367,6 @@ static WebFrameLoadType toWebFrameLoadType(FrameLoadType frameLoadType)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_private && _private->includedInWebKitStatistics)
-        --WebFrameCount;
-
-    [super finalize];
-}
-
 - (NSString *)name
 {
     Frame* coreFrame = _private->coreFrame;
index ac0e772..b60f9df 100644 (file)
@@ -419,14 +419,6 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
     [super dealloc];
 }
 
-- (void)finalize 
-{
-    if (_private && _private->includedInWebKitStatistics)
-        --WebFrameViewCount;
-
-    [super finalize];
-}
-
 #if PLATFORM(IOS)
 - (BOOL)scrollView:(WAKScrollView *)scrollView shouldScrollToPoint:(CGPoint)point
 {
index d6ae556..7e0d035 100644 (file)
@@ -156,14 +156,6 @@ static NSMutableArray *newArrayByConcatenatingArrays(NSArray *first, NSArray *se
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (_private && _private->includedInWebKitStatistics)
-        --WebHTMLRepresentationCount;
-
-    [super finalize];
-}
-
 - (void)_redirectDataToManualLoader:(id<WebPluginManualLoader>)manualLoader forPluginView:(NSView *)pluginView
 {
     _private->manualLoader = manualLoader;
index 7ad1374..c75c3fe 100644 (file)
@@ -1015,8 +1015,7 @@ static NSCellStateValue kit(TriState state)
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
-    
+
 #if !PLATFORM(IOS)
     if (!oldSetCursorForMouseLocationIMP) {
         Method setCursorMethod = class_getInstanceMethod([NSWindow class], @selector(_setCursorForMouseLocation:));
@@ -1067,16 +1066,6 @@ static NSCellStateValue kit(TriState state)
     [super dealloc];
 }
 
-- (void)finalize
-{
-#if !PLATFORM(IOS)
-    if (promisedDragTIFFDataSource)
-        promisedDragTIFFDataSource->removeClient(promisedDataClient());
-#endif
-
-    [super finalize];
-}
-
 - (void)clear
 {
 #if !PLATFORM(IOS)
@@ -2835,7 +2824,6 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 - (id)initWithFrame:(NSRect)frame
@@ -2881,15 +2869,6 @@ static bool mouseEventIsPartOfClickOrDrag(NSEvent *event)
     [super dealloc];
 }
 
-- (void)finalize
-{
-    // We can't assert that close has already been called because
-    // this view can be removed from it's superview, even though
-    // it could be needed later, so close if needed.
-    [self close];
-    [super finalize];
-}
-
 // Returns YES if the delegate returns YES (so we should do no more work).
 - (BOOL)callDelegateDoCommandBySelectorIfNeeded:(SEL)selector
 {
index 803f7c2..3569042 100644 (file)
@@ -71,7 +71,6 @@ static NSString * const WebResourceResponseKey =          @"WebResourceResponse"
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 - (instancetype)init
@@ -99,13 +98,6 @@ static NSString * const WebResourceResponseKey =          @"WebResourceResponse"
     [super dealloc];
 }
 
-- (void)finalize
-{
-    if (coreResource)
-        coreResource->deref();
-    [super finalize];
-}
-
 @end
 
 @implementation WebResource
index 95950f9..0079cda 100644 (file)
@@ -51,7 +51,6 @@
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 @end
index 7bd24ff..30cc667 100644 (file)
 #import <WebKitSystemInterface.h>
 #import <bindings/ScriptValue.h>
 #import <mach-o/dyld.h>
-#import <objc/objc-auto.h>
 #import <objc/runtime.h>
 #import <runtime/ArrayPrototype.h>
 #import <runtime/DateInstance.h>
 #import <WebCore/WebCoreThreadRun.h>
 #import <WebCore/WebEvent.h>
 #import <WebCore/WebVideoFullscreenControllerAVKit.h>
+#import <libkern/OSAtomic.h>
 #import <wtf/FastMalloc.h>
 #endif // !PLATFORM(IOS)
 
@@ -5149,15 +5149,6 @@ static bool needsWebViewInitThreadWorkaround()
     [super dealloc];
 }
 
-- (void)finalize
-{
-    ASSERT(_private->closed);
-
-    --WebViewCount;
-
-    [super finalize];
-}
-
 - (void)close
 {
     // _close existed first, and some clients might be calling or overriding it, so call through.
index 8f83c00..f576d4c 100644 (file)
@@ -37,7 +37,6 @@
 #import <WebCore/WebCoreObjCExtras.h>
 #import <WebCore/HistoryItem.h>
 #import <WebCore/TextIndicatorWindow.h>
-#import <objc/objc-auto.h>
 #import <runtime/InitializeThreading.h>
 #import <wtf/MainThread.h>
 #import <wtf/RunLoop.h>
@@ -124,7 +123,6 @@ WebViewLayerFlushScheduler::WebViewLayerFlushScheduler(LayerFlushController* flu
     WTF::initializeMainThreadToProcessMainThread();
     RunLoop::initializeMainRunLoop();
 #endif
-    WebCoreObjCFinalizeOnMainThread(self);
 }
 
 - (id)init 
@@ -153,11 +151,7 @@ WebViewLayerFlushScheduler::WebViewLayerFlushScheduler(LayerFlushController* flu
     _geolocationProvider = [WebGeolocationProviderIOS sharedGeolocationProvider];
 #endif
 
-#if !PLATFORM(IOS)
-    shouldCloseWithWindow = objc_collectingEnabled();
-#else
     shouldCloseWithWindow = false;
-#endif
 
     pluginDatabaseClientCount++;
 
@@ -213,16 +207,4 @@ WebViewLayerFlushScheduler::WebViewLayerFlushScheduler(LayerFlushController* flu
     [super dealloc];
 }
 
-- (void)finalize
-{
-#if !PLATFORM(IOS)
-    ASSERT(!insertionPasteboard);
-#endif
-#if ENABLE(VIDEO)
-    ASSERT(!fullscreenController);
-#endif
-
-    [super finalize];
-}
-
 @end
index 00c627e..23a37ff 100644 (file)
@@ -1,3 +1,17 @@
+2015-12-03  Anders Carlsson  <andersca@apple.com>
+
+        Remove Objective-C GC support
+        https://bugs.webkit.org/show_bug.cgi?id=151819
+        rdar://problem/23746991
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/Base.xcconfig:
+        * Configurations/BaseLegacyProcess.xcconfig:
+        * Configurations/BaseXPCService.xcconfig:
+        * Shared/Cocoa/APIObject.mm:
+        (API::Object::newObject): Deleted.
+
 2015-12-03  Jer Noble  <jer.noble@apple.com>
 
         Unreviewed build-fix; fix !HAVE(AVKIT) build after r193340.
index 30c036b..3916c7d 100644 (file)
@@ -47,9 +47,6 @@ GCC_DYNAMIC_NO_PIC = NO;
 GCC_ENABLE_CPP_EXCEPTIONS = NO;
 GCC_ENABLE_CPP_RTTI = NO;
 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-GCC_ENABLE_OBJC_GC = $(GCC_ENABLE_OBJC_GC_$(PLATFORM_NAME)_$(USE_INTERNAL_SDK));
-GCC_ENABLE_OBJC_GC_macosx_ = NO;
-GCC_ENABLE_OBJC_GC_macosx_YES = supported;
 GCC_ENABLE_SYMBOL_SEPARATION = NO;
 GCC_FAST_OBJC_DISPATCH = YES;
 GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
index dcb753e..06775b7 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "BaseTarget.xcconfig"
 
-GCC_ENABLE_OBJC_GC = NO;
 INSTALL_PATH = $(WEBKIT_FRAMEWORKS_DIR)/WebKit.framework/$(FRAMEWORK_CONTENT_DIRECTORY);
 
 APP_ICON = $(APP_ICON_$(CONFIGURATION));
index 67f594f..5932989 100644 (file)
@@ -23,8 +23,6 @@
 
 #include "BaseTarget.xcconfig"
 
-GCC_ENABLE_OBJC_GC = NO;
-
 INSTALL_PATH = $(INSTALL_PATH_$(WK_XPC_SERVICE_VARIANT));
 
 INSTALL_PATH_Normal[sdk=iphone*] = $(WEBKIT_FRAMEWORKS_DIR)/WebKit.framework/XPCServices;
index 6c99729..2a454b8 100644 (file)
@@ -69,7 +69,6 @@
 #import "_WKUserContentFilterInternal.h"
 #import "_WKUserStyleSheetInternal.h"
 #import "_WKVisitedLinkStoreInternal.h"
-#import <objc/objc-auto.h>
 
 namespace API {
 
@@ -260,11 +259,6 @@ void* Object::newObject(size_t size, Type type)
     Object& object = wrapper._apiObject;
     object.m_wrapper = wrapper;
 
-#if PLATFORM(MAC)
-    if (objc_collectingEnabled())
-        object.ref();
-#endif
-
     return &object;
 }
 
index 2280250..578648e 100644 (file)
@@ -1,3 +1,13 @@
+2015-12-03  Anders Carlsson  <andersca@apple.com>
+
+        Remove Objective-C GC support
+        https://bugs.webkit.org/show_bug.cgi?id=151819
+        rdar://problem/23746991
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/Base.xcconfig:
+
 2015-12-03  Michael Saboff  <msaboff@apple.com>
 
         bmalloc: extra large allocations could be more efficient
index 0593457..7d2e63c 100644 (file)
@@ -45,9 +45,6 @@ GCC_DYNAMIC_NO_PIC = NO;
 GCC_ENABLE_CPP_EXCEPTIONS = NO;
 GCC_ENABLE_CPP_RTTI = NO;
 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-GCC_ENABLE_OBJC_GC = $(GCC_ENABLE_OBJC_GC_$(PLATFORM_NAME)_$(USE_INTERNAL_SDK));
-GCC_ENABLE_OBJC_GC_macosx_ = NO;
-GCC_ENABLE_OBJC_GC_macosx_YES = supported;
 GCC_ENABLE_SYMBOL_SEPARATION = NO;
 GCC_FAST_OBJC_DISPATCH = YES;
 GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
index f9a9465..c7cb0cf 100644 (file)
@@ -1,3 +1,13 @@
+2015-12-03  Anders Carlsson  <andersca@apple.com>
+
+        Remove Objective-C GC support
+        https://bugs.webkit.org/show_bug.cgi?id=151819
+        rdar://problem/23746991
+
+        Reviewed by Dan Bernstein.
+
+        * asan/asan.xcconfig:
+
 2015-12-02  Yusuke Suzuki  <utatane.tea@gmail.com>
 
         Allow nil for unspecified benchmark pathes
index 20beaf5..7d591ed 100644 (file)
@@ -14,5 +14,3 @@ CLANG_ADDRESS_SANITIZER=YES
 
 ASAN_OTHER_CFLAGS = -fno-omit-frame-pointer -g;
 ASAN_OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CFLAGS);
-
-GCC_ENABLE_OBJC_GC = NO;