Replace OSObjectPtr with RetainPtr/adoptOS
https://bugs.webkit.org/show_bug.cgi?id=137158

Reviewed by Dan Bernstein.

Source/WebKit2:

* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
(DatabaseServiceInitializer):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
(NetworkServiceInitializer):
* Platform/IPC/Connection.h:
(IPC::Connection::Identifier::Identifier):
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog):
(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
(PluginServiceInitializer):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
(WebKit::XPCServiceInitializer):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::checkEntitlements):
(WebKit::XPCServiceInitializerDelegate::hasEntitlement):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(WebKit::XPCServiceEventHandler):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceEventHandler):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
(WebKit::connectToReExecService):
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/OSObjectPtr.h: Removed.
* wtf/RetainPtr.h:
(WTF::adoptOS):
Added. This adopt function is slightly different than both adoptCF and adoptNS,
in that unlike adoptCF(), it can be passed an Objective-C type (since OS objects
are sometimes Objective-C objects, but not always), and unlike adoptNS() it doesn't 
require us to jump through hoops to appease GC (since OS objects are not Objective-C
objects if GC is enabled).

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/darwin/OSObjectPtr.cpp: Removed.
* TestWebKitAPI/Tests/WTF/darwin/RetainPtrOSObject.cpp: Copied from Tools/TestWebKitAPI/Tests/WTF/darwin/OSObjectPtr.cpp.
Rename and change test to use RetainPtr. Remove now unneeded part testing WTF::retainOSObject/WTF::releaseOSObject.



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