Changeset 65780 in webkit


Ignore:
Timestamp:
Aug 21, 2010 6:58:28 PM (14 years ago)
Author:
weinig@apple.com
Message:

Remove specialized retain/release functions in favor of a single one for WKTypeRefs
https://bugs.webkit.org/show_bug.cgi?id=44386

Reviewed by Dan Bernstein.

WebKit2:

  • UIProcess/API/C/WKArray.cpp:

(WKArrayGetSize):

  • UIProcess/API/C/WKArray.h:
  • UIProcess/API/C/WKBackForwardList.cpp:

(WKBackForwardListCopyForwardListWithLimit):

  • UIProcess/API/C/WKBackForwardList.h:
  • UIProcess/API/C/WKBackForwardListItem.cpp:

(WKBackForwardListItemCopyTitle):

  • UIProcess/API/C/WKBackForwardListItem.h:
  • UIProcess/API/C/WKBase.h:
  • UIProcess/API/C/WKContext.cpp:
  • UIProcess/API/C/WKContext.h:
  • UIProcess/API/C/WKData.cpp:

(WKDataGetSize):

  • UIProcess/API/C/WKData.h:
  • UIProcess/API/C/WKDictionary.cpp:

(WKDictionaryCopyKeys):

  • UIProcess/API/C/WKDictionary.h:
  • UIProcess/API/C/WKError.h:
  • UIProcess/API/C/WKFormSubmissionListener.cpp:

(WKFormSubmissionListenerContinue):

  • UIProcess/API/C/WKFormSubmissionListener.h:
  • UIProcess/API/C/WKFrame.cpp:

(WKFrameGetPage):

  • UIProcess/API/C/WKFrame.h:
  • UIProcess/API/C/WKFramePolicyListener.cpp:

(WKFramePolicyListenerIgnore):

  • UIProcess/API/C/WKFramePolicyListener.h:
  • UIProcess/API/C/WKNavigationData.cpp:

(WKNavigationDataCopyURL):

  • UIProcess/API/C/WKNavigationData.h:
  • UIProcess/API/C/WKPage.cpp:
  • UIProcess/API/C/WKPage.h:
  • UIProcess/API/C/WKPageNamespace.cpp:

(WKPageNamespaceGetContext):

  • UIProcess/API/C/WKPageNamespace.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesCreate):
(WKPreferencesGetLocalStorageEnabled):

  • UIProcess/API/C/WKPreferences.h:
  • UIProcess/API/C/WKString.cpp:
  • UIProcess/API/C/WKString.h:
  • UIProcess/API/C/WKType.cpp:

(WKRetain):
(WKRelease):

  • UIProcess/API/C/WKType.h:
  • UIProcess/API/C/WKURL.cpp:

(WKURLGetTypeID):

  • UIProcess/API/C/WKURL.h:
  • UIProcess/API/cpp/WKRetainPtr.h:
  • UIProcess/API/win/WKView.cpp:
  • UIProcess/API/win/WKView.h:
  • UIProcess/WebPreferences.cpp:

(WebKit::WebPreferences::shared):

  • WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:

(WKBundleNodeHandleGetTypeID):

  • WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h:
  • WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:

(WKBundleScriptWorldNormalWorld):

  • WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:

WebKitTools:

  • MiniBrowser/mac/AppDelegate.m:

(didRecieveMessageFromInjectedBundle):
(didNavigateWithNavigationData):
(-[BrowserAppDelegate init]):
(-[BrowserAppDelegate applicationWillTerminate:]):

  • MiniBrowser/mac/BrowserStatisticsWindowController.m:

(-[BrowserStatisticsWindowController initWithThreadedWKContextRef:processWKContextRef:]):
(-[BrowserStatisticsWindowController dealloc]):

  • MiniBrowser/mac/BrowserWindowController.m:

(-[BrowserWindowController initWithPageNamespace:]):
(-[BrowserWindowController fetch:]):
(-[BrowserWindowController windowWillClose:]):
(-[BrowserWindowController applicationTerminating]):
(closePage):
(runJavaScriptAlert):
(runJavaScriptConfirm):
(runJavaScriptPrompt):
(-[BrowserWindowController updateProvisionalURLForFrame:]):

  • MiniBrowser/mac/WebBundle/WebBundleMain.m:

(didClearWindowObjectForFrame):

  • MiniBrowser/win/BrowserView.cpp:

(BrowserView::goToURL):

  • WebKitTestRunner/win/PlatformWebViewWin.cpp:

(WTR::PlatformWebView::~PlatformWebView):

Location:
trunk
Files:
44 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r65751 r65780  
     12010-08-21  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Remove specialized retain/release functions in favor of a single one for WKTypeRefs
     6        https://bugs.webkit.org/show_bug.cgi?id=44386
     7
     8        * UIProcess/API/C/WKArray.cpp:
     9        (WKArrayGetSize):
     10        * UIProcess/API/C/WKArray.h:
     11        * UIProcess/API/C/WKBackForwardList.cpp:
     12        (WKBackForwardListCopyForwardListWithLimit):
     13        * UIProcess/API/C/WKBackForwardList.h:
     14        * UIProcess/API/C/WKBackForwardListItem.cpp:
     15        (WKBackForwardListItemCopyTitle):
     16        * UIProcess/API/C/WKBackForwardListItem.h:
     17        * UIProcess/API/C/WKBase.h:
     18        * UIProcess/API/C/WKContext.cpp:
     19        * UIProcess/API/C/WKContext.h:
     20        * UIProcess/API/C/WKData.cpp:
     21        (WKDataGetSize):
     22        * UIProcess/API/C/WKData.h:
     23        * UIProcess/API/C/WKDictionary.cpp:
     24        (WKDictionaryCopyKeys):
     25        * UIProcess/API/C/WKDictionary.h:
     26        * UIProcess/API/C/WKError.h:
     27        * UIProcess/API/C/WKFormSubmissionListener.cpp:
     28        (WKFormSubmissionListenerContinue):
     29        * UIProcess/API/C/WKFormSubmissionListener.h:
     30        * UIProcess/API/C/WKFrame.cpp:
     31        (WKFrameGetPage):
     32        * UIProcess/API/C/WKFrame.h:
     33        * UIProcess/API/C/WKFramePolicyListener.cpp:
     34        (WKFramePolicyListenerIgnore):
     35        * UIProcess/API/C/WKFramePolicyListener.h:
     36        * UIProcess/API/C/WKNavigationData.cpp:
     37        (WKNavigationDataCopyURL):
     38        * UIProcess/API/C/WKNavigationData.h:
     39        * UIProcess/API/C/WKPage.cpp:
     40        * UIProcess/API/C/WKPage.h:
     41        * UIProcess/API/C/WKPageNamespace.cpp:
     42        (WKPageNamespaceGetContext):
     43        * UIProcess/API/C/WKPageNamespace.h:
     44        * UIProcess/API/C/WKPreferences.cpp:
     45        (WKPreferencesCreate):
     46        (WKPreferencesGetLocalStorageEnabled):
     47        * UIProcess/API/C/WKPreferences.h:
     48        * UIProcess/API/C/WKString.cpp:
     49        * UIProcess/API/C/WKString.h:
     50        * UIProcess/API/C/WKType.cpp:
     51        (WKRetain):
     52        (WKRelease):
     53        * UIProcess/API/C/WKType.h:
     54        * UIProcess/API/C/WKURL.cpp:
     55        (WKURLGetTypeID):
     56        * UIProcess/API/C/WKURL.h:
     57        * UIProcess/API/cpp/WKRetainPtr.h:
     58        * UIProcess/API/win/WKView.cpp:
     59        * UIProcess/API/win/WKView.h:
     60        * UIProcess/WebPreferences.cpp:
     61        (WebKit::WebPreferences::shared):
     62        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
     63        (WKBundleNodeHandleGetTypeID):
     64        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h:
     65        * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
     66        (WKBundleScriptWorldNormalWorld):
     67        * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
     68
    1692010-08-20  Balazs Kelemen  <kb@inf.u-szeged.hu>
    270
  • trunk/WebKit2/UIProcess/API/C/WKArray.cpp

    r64386 r65780  
    5757    return toWK(arrayRef)->size();
    5858}
    59 
    60 WKArrayRef WKArrayRetain(WKArrayRef arrayRef)
    61 {
    62     toWK(arrayRef)->ref();
    63     return arrayRef;
    64 }
    65 
    66 void WKArrayRelease(WKArrayRef arrayRef)
    67 {
    68     toWK(arrayRef)->deref();
    69 }
  • trunk/WebKit2/UIProcess/API/C/WKArray.h

    r65379 r65780  
    4343WK_EXPORT size_t WKArrayGetSize(WKArrayRef array);
    4444
    45 WK_EXPORT WKArrayRef WKArrayRetain(WKArrayRef array);
    46 WK_EXPORT void WKArrayRelease(WKArrayRef array);
    47 
    4845#ifdef __cplusplus
    4946}
    5047#endif
    5148
    52 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKArray)
    53 
    5449#endif // WKArray_h
  • trunk/WebKit2/UIProcess/API/C/WKBackForwardList.cpp

    r64386 r65780  
    7070    return toRef(toWK(listRef)->forwardListAsImmutableArrayWithLimit(limit).releaseRef());   
    7171}
    72 
    73 WKBackForwardListRef WKBackForwardListRetain(WKBackForwardListRef listRef)
    74 {
    75     toWK(listRef)->ref();
    76     return listRef;
    77 }
    78 
    79 void WKBackForwardListRelease(WKBackForwardListRef listRef)
    80 {
    81     toWK(listRef)->deref();
    82 }
  • trunk/WebKit2/UIProcess/API/C/WKBackForwardList.h

    r64253 r65780  
    4545WK_EXPORT WKArrayRef WKBackForwardListCopyForwardListWithLimit(WKBackForwardListRef list, unsigned limit);
    4646
    47 WK_EXPORT WKBackForwardListRef WKBackForwardListRetain(WKBackForwardListRef list);
    48 WK_EXPORT void WKBackForwardListRelease(WKBackForwardListRef list);
    49 
    5047#ifdef __cplusplus
    5148}
    5249#endif
    5350
    54 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKBackForwardList)
    55 
    5651#endif // WKBackForwardList_h
  • trunk/WebKit2/UIProcess/API/C/WKBackForwardListItem.cpp

    r64386 r65780  
    5050    return toCopiedRef(toWK(itemRef)->title());
    5151}
    52 
    53 WKBackForwardListItemRef WKBackForwardListItemRetain(WKBackForwardListItemRef itemRef)
    54 {
    55     toWK(itemRef)->ref();
    56     return itemRef;
    57 }
    58 
    59 void WKBackForwardListItemRelease(WKBackForwardListItemRef itemRef)
    60 {
    61     toWK(itemRef)->deref();
    62 }
  • trunk/WebKit2/UIProcess/API/C/WKBackForwardListItem.h

    r64253 r65780  
    3939WK_EXPORT WKStringRef WKBackForwardListItemCopyTitle(WKBackForwardListItemRef item);
    4040
    41 WK_EXPORT WKBackForwardListItemRef WKBackForwardListItemRetain(WKBackForwardListItemRef item);
    42 WK_EXPORT void WKBackForwardListItemRelease(WKBackForwardListItemRef item);
    43 
    4441#ifdef __cplusplus
    4542}
    4643#endif
    4744
    48 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKBackForwardListItem)
    49 
    5045#endif /* WKBackForwardListItem_h */
  • trunk/WebKit2/UIProcess/API/C/WKBase.h

    r65379 r65780  
    6868#endif
    6969
    70 #ifdef __cplusplus
    71 #define WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKType) \
    72     inline void WKRetain(WKType##Ref p) { WKType##Retain(p); } \
    73     inline void WKRelease(WKType##Ref p) { WKType##Release(p); } \
    74     // end of macro
    75 #else
    76 #define WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKType)
    77 #endif
    78 
    79 
    8070#endif /* WKBase_h */
  • trunk/WebKit2/UIProcess/API/C/WKContext.cpp

    r65465 r65780  
    100100}
    101101
    102 WKContextRef WKContextRetain(WKContextRef contextRef)
    103 {
    104     toWK(contextRef)->ref();
    105     return contextRef;
    106 }
    107 
    108 void WKContextRelease(WKContextRef contextRef)
    109 {
    110     toWK(contextRef)->deref();
    111 }
    112 
    113102void _WKContextSetAdditionalPluginsDirectory(WKContextRef contextRef, WKStringRef pluginsDirectory)
    114103{
  • trunk/WebKit2/UIProcess/API/C/WKContext.h

    r64492 r65780  
    7777WK_EXPORT void WKContextAddVisitedLink(WKContextRef context, WKStringRef visitedURL);
    7878
    79 WK_EXPORT WKContextRef WKContextRetain(WKContextRef context);
    80 WK_EXPORT void WKContextRelease(WKContextRef context);
    81 
    8279#ifdef __cplusplus
    8380}
    8481#endif
    8582
    86 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKContext)
    87 
    8883#endif /* WKContext_h */
  • trunk/WebKit2/UIProcess/API/C/WKData.cpp

    r64662 r65780  
    5151    return toWK(dataRef)->size();
    5252}
    53 
    54 WKDataRef WKDataRetain(WKDataRef dataRef)
    55 {
    56     toWK(dataRef)->ref();
    57     return dataRef;
    58 }
    59 
    60 void WKDataRelease(WKDataRef dataRef)
    61 {
    62     toWK(dataRef)->deref();
    63 }
  • trunk/WebKit2/UIProcess/API/C/WKData.h

    r65379 r65780  
    4242WK_EXPORT size_t WKDataGetSize(WKDataRef data);
    4343
    44 WK_EXPORT WKDataRef WKDataRetain(WKDataRef data);
    45 WK_EXPORT void WKDataRelease(WKDataRef data);
    46 
    4744#ifdef __cplusplus
    4845}
    4946#endif
    5047
    51 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKData)
    52 
    5348#endif // WKData_h
  • trunk/WebKit2/UIProcess/API/C/WKDictionary.cpp

    r65675 r65780  
    5252    return toRef(keys.release().releaseRef());
    5353}
    54 
    55 WKDictionaryRef WKDictionaryRetain(WKDictionaryRef dictionaryRef)
    56 {
    57     toWK(dictionaryRef)->ref();
    58     return dictionaryRef;
    59 }
    60 
    61 void WKDictionaryRelease(WKDictionaryRef dictionaryRef)
    62 {
    63     toWK(dictionaryRef)->deref();
    64 }
  • trunk/WebKit2/UIProcess/API/C/WKDictionary.h

    r65675 r65780  
    4242WK_EXPORT WKArrayRef WKDictionaryCopyKeys(WKDictionaryRef dictionary);
    4343
    44 WK_EXPORT WKDictionaryRef WKDictionaryRetain(WKDictionaryRef dictionary);
    45 WK_EXPORT void WKDictionaryRelease(WKDictionaryRef dictionary);
    46 
    4744#ifdef __cplusplus
    4845}
    4946#endif
    5047
    51 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKDictionary)
    52 
    5348#endif /* WKDictionary_h */
  • trunk/WebKit2/UIProcess/API/C/WKError.h

    r64688 r65780  
    3535WK_EXPORT WKTypeID WKErrorGetTypeID();
    3636
    37 WK_EXPORT WKErrorRef WKErrorRetain(WKErrorRef error);
    38 WK_EXPORT void WKErrorRelease(WKErrorRef error);
    39 
    4037#ifdef __cplusplus
    4138}
    4239#endif
    4340
    44 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKError)
    45 
    4641#endif // WKError_h
  • trunk/WebKit2/UIProcess/API/C/WKFormSubmissionListener.cpp

    r65337 r65780  
    4040    toWK(submissionListener)->continueSubmission();
    4141}
    42 
    43 WKFormSubmissionListenerRef WKFormSubmissionListenerRetain(WKFormSubmissionListenerRef submissionListenerRef)
    44 {
    45     toWK(submissionListenerRef)->ref();
    46     return submissionListenerRef;
    47 }
    48 
    49 void WKFormSubmissionListenerRelease(WKFormSubmissionListenerRef submissionListenerRef)
    50 {
    51     toWK(submissionListenerRef)->deref();
    52 }
  • trunk/WebKit2/UIProcess/API/C/WKFormSubmissionListener.h

    r65337 r65780  
    3737WK_EXPORT void WKFormSubmissionListenerContinue(WKFormSubmissionListenerRef submissionListener);
    3838
    39 WK_EXPORT WKFormSubmissionListenerRef WKFormSubmissionListenerRetain(WKFormSubmissionListenerRef submissionListener);
    40 WK_EXPORT void WKFormSubmissionListenerRelease(WKFormSubmissionListenerRef submissionListener);
    41 
    4239#ifdef __cplusplus
    4340}
    4441#endif
    4542
    46 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKFormSubmissionListener)
    47 
    4843#endif /* WKFormSubmissionListener_h */
  • trunk/WebKit2/UIProcess/API/C/WKFrame.cpp

    r64386 r65780  
    7171    return toRef(toWK(frameRef)->page());
    7272}
    73 
    74 WKFrameRef WKFrameRetain(WKFrameRef frameRef)
    75 {
    76     toWK(frameRef)->ref();
    77     return frameRef;
    78 }
    79 
    80 void WKFrameRelease(WKFrameRef frameRef)
    81 {
    82     toWK(frameRef)->deref();
    83 }
  • trunk/WebKit2/UIProcess/API/C/WKFrame.h

    r64253 r65780  
    5353WK_EXPORT WKPageRef WKFrameGetPage(WKFrameRef frame);
    5454
    55 WK_EXPORT WKFrameRef WKFrameRetain(WKFrameRef frame);
    56 WK_EXPORT void WKFrameRelease(WKFrameRef frame);
    57 
    5855#ifdef __cplusplus
    5956}
    6057#endif
    6158
    62 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKFrame)
    63 
    6459#endif /* WKFrame_h */
  • trunk/WebKit2/UIProcess/API/C/WKFramePolicyListener.cpp

    r64386 r65780  
    5151    toWK(policyListenerRef)->ignore();
    5252}
    53 
    54 WKFramePolicyListenerRef WKFramePolicyListenerRetain(WKFramePolicyListenerRef policyListenerRef)
    55 {
    56     toWK(policyListenerRef)->ref();
    57     return policyListenerRef;
    58 }
    59 
    60 void WKFramePolicyListenerRelease(WKFramePolicyListenerRef policyListenerRef)
    61 {
    62     toWK(policyListenerRef)->deref();
    63 }
  • trunk/WebKit2/UIProcess/API/C/WKFramePolicyListener.h

    r64253 r65780  
    3939WK_EXPORT void WKFramePolicyListenerIgnore(WKFramePolicyListenerRef policyListener);
    4040
    41 WK_EXPORT WKFramePolicyListenerRef WKFramePolicyListenerRetain(WKFramePolicyListenerRef policyListener);
    42 WK_EXPORT void WKFramePolicyListenerRelease(WKFramePolicyListenerRef policyListener);
    43 
    4441#ifdef __cplusplus
    4542}
    4643#endif
    4744
    48 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKFramePolicyListener)
    49 
    5045#endif /* WKFramePolicyListener_h */
  • trunk/WebKit2/UIProcess/API/C/WKNavigationData.cpp

    r64386 r65780  
    4545    return toCopiedURLRef(toWK(navigationDataRef)->url());
    4646}
    47 
    48 WKNavigationDataRef WKNavigationDataRetain(WKNavigationDataRef navigationDataRef)
    49 {
    50     toWK(navigationDataRef)->ref();
    51     return navigationDataRef;
    52 }
    53 
    54 void WKNavigationDataRelease(WKNavigationDataRef navigationDataRef)
    55 {
    56     toWK(navigationDataRef)->deref();
    57 }
  • trunk/WebKit2/UIProcess/API/C/WKNavigationData.h

    r64253 r65780  
    3838WK_EXPORT WKURLRef WKNavigationDataCopyURL(WKNavigationDataRef navigationData);
    3939
    40 WK_EXPORT WKNavigationDataRef WKNavigationDataRetain(WKNavigationDataRef navigationData);
    41 WK_EXPORT void WKNavigationDataRelease(WKNavigationDataRef navigationData);
    42 
    4340#ifdef __cplusplus
    4441}
    4542#endif
    4643
    47 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKNavigationData)
    48 
    4944#endif /* WKNavigationData_h */
  • trunk/WebKit2/UIProcess/API/C/WKPage.cpp

    r65644 r65780  
    210210}
    211211#endif
    212 
    213 WKPageRef WKPageRetain(WKPageRef pageRef)
    214 {
    215     toWK(pageRef)->ref();
    216     return pageRef;
    217 }
    218 
    219 void WKPageRelease(WKPageRef pageRef)
    220 {
    221     toWK(pageRef)->deref();
    222 }
  • trunk/WebKit2/UIProcess/API/C/WKPage.h

    r65699 r65780  
    198198#endif
    199199
    200 
    201 WK_EXPORT WKPageRef WKPageRetain(WKPageRef page);
    202 WK_EXPORT void WKPageRelease(WKPageRef page);
    203 
    204200#ifdef __cplusplus
    205201}
    206202#endif
    207203
    208 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKPage)
    209 
    210204#endif /* WKPage_h */
  • trunk/WebKit2/UIProcess/API/C/WKPageNamespace.cpp

    r64386 r65780  
    4747    return toRef(toWK(pageNamespaceRef)->context());
    4848}
    49 
    50 WKPageNamespaceRef WKPageNamespaceRetain(WKPageNamespaceRef pageNamespaceRef)
    51 {
    52     toWK(pageNamespaceRef)->ref();
    53     return pageNamespaceRef;
    54 }
    55 
    56 void WKPageNamespaceRelease(WKPageNamespaceRef pageNamespaceRef)
    57 {
    58     toWK(pageNamespaceRef)->deref();
    59 }
  • trunk/WebKit2/UIProcess/API/C/WKPageNamespace.h

    r64253 r65780  
    3939WK_EXPORT WKContextRef WKPageNamespaceGetContext(WKPageNamespaceRef pageNamespace);
    4040
    41 WK_EXPORT WKPageNamespaceRef WKPageNamespaceRetain(WKPageNamespaceRef pageNamespace);
    42 WK_EXPORT void WKPageNamespaceRelease(WKPageNamespaceRef pageNamespace);
    43 
    4441#ifdef __cplusplus
    4542}
    4643#endif
    4744
    48 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKPageNamespace)
    49 
    5045#endif /* WKPageNamespace_h */
  • trunk/WebKit2/UIProcess/API/C/WKPreferences.cpp

    r64386 r65780  
    4141{
    4242    RefPtr<WebPreferences> preferences = WebPreferences::create();
    43     return toRef(preferences.release().releaseRef());
     43    return toRef(preferences.release().leakRef());
    4444}
    4545
     
    8989    return toWK(preferencesRef)->localStorageEnabled();
    9090}
    91 
    92 WKPreferencesRef WKPreferencesRetain(WKPreferencesRef preferencesRef)
    93 {
    94     toWK(preferencesRef)->ref();
    95     return preferencesRef;
    96 }
    97 
    98 void WKPreferencesRelease(WKPreferencesRef preferencesRef)
    99 {
    100     toWK(preferencesRef)->deref();
    101 }
  • trunk/WebKit2/UIProcess/API/C/WKPreferences.h

    r64253 r65780  
    5858WK_EXPORT bool WKPreferencesGetLocalStorageEnabled(WKPreferencesRef preferences);
    5959
    60 WK_EXPORT WKPreferencesRef WKPreferencesRetain(WKPreferencesRef preferences);
    61 WK_EXPORT void WKPreferencesRelease(WKPreferencesRef preferences);
    62 
    6360#ifdef __cplusplus
    6461}
    6562#endif
    6663
    67 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKPreferences)
    68 
    6964#endif /* WKPreferences_h */
  • trunk/WebKit2/UIProcess/API/C/WKString.cpp

    r64386 r65780  
    3535}
    3636
    37 WKStringRef WKStringRetain(WKStringRef stringRef)
    38 {
    39     toWK(stringRef)->ref();
    40     return stringRef;
    41 }
    42 
    43 void WKStringRelease(WKStringRef stringRef)
    44 {
    45     toWK(stringRef)->deref();
    46 }
    47 
    4837bool WKStringIsEmpty(WKStringRef stringRef)
    4938{
  • trunk/WebKit2/UIProcess/API/C/WKString.h

    r64253 r65780  
    3939WK_EXPORT WKTypeID WKStringGetTypeID();
    4040
    41 WK_EXPORT WKStringRef WKStringRetain(WKStringRef string);
    42 WK_EXPORT void WKStringRelease(WKStringRef string);
    43 
    4441WK_EXPORT bool WKStringIsEmpty(WKStringRef string);
    4542
     
    4845#endif
    4946
    50 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKString)
    51 
    5247#endif /* WKString_h */
  • trunk/WebKit2/UIProcess/API/C/WKType.cpp

    r64380 r65780  
    3535    return toRef(static_cast<APIObject*>(typeRef)->type());
    3636}
     37
     38WKTypeRef WKRetain(WKTypeRef typeRef)
     39{
     40    static_cast<APIObject*>(typeRef)->ref();
     41    return typeRef;
     42}
     43
     44void WKRelease(WKTypeRef typeRef)
     45{
     46    static_cast<APIObject*>(typeRef)->deref();
     47}
  • trunk/WebKit2/UIProcess/API/C/WKType.h

    r64253 r65780  
    3535WK_EXPORT WKTypeID WKGetTypeID(WKTypeRef type);
    3636
     37WK_EXPORT WKTypeRef WKRetain(WKTypeRef type);
     38WK_EXPORT void WKRelease(WKTypeRef type);
     39
    3740#ifdef __cplusplus
    3841}
  • trunk/WebKit2/UIProcess/API/C/WKURL.cpp

    r64386 r65780  
    3434    return toRef(WebURL::APIType);
    3535}
    36 
    37 WKURLRef WKURLRetain(WKURLRef URLRef)
    38 {
    39     toWK(URLRef)->ref();
    40     return URLRef;
    41 }
    42 
    43 void WKURLRelease(WKURLRef URLRef)
    44 {
    45     toWK(URLRef)->deref();
    46 }
  • trunk/WebKit2/UIProcess/API/C/WKURL.h

    r64253 r65780  
    3535WK_EXPORT WKTypeID WKURLGetTypeID();
    3636
    37 WK_EXPORT WKURLRef WKURLRetain(WKURLRef URL);
    38 WK_EXPORT void WKURLRelease(WKURLRef URL);
    39 
    4037#ifdef __cplusplus
    4138}
    4239#endif
    4340
    44 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKURL)
    45 
    4641#endif /* WKURL_h */
  • trunk/WebKit2/UIProcess/API/cpp/WKRetainPtr.h

    r65130 r65780  
    2727#define WKRetainPtr_h
    2828
     29#include <WebKit2/WKType.h>
    2930#include <algorithm>
    3031
     
    106107    void swap(WKRetainPtr&);
    107108
    108     // FIXME: Remove once all callers are calling leakRef.
    109     PtrType releaseRef() { leakRef(); }
    110 
    111109private:
    112110    PtrType m_ptr;
  • trunk/WebKit2/UIProcess/API/win/WKView.cpp

    r64253 r65780  
    5757}
    5858
    59 WKViewRef WKViewRetain(WKViewRef viewRef)
    60 {
    61     toWK(viewRef)->ref();
    62     return viewRef;
    63 }
    64 
    65 void WKViewRelease(WKViewRef viewRef)
    66 {
    67     toWK(viewRef)->deref();
    68 }
    69 
    7059void WKViewSetHostWindow(WKViewRef viewRef, HWND hostWindow)
    7160{
  • trunk/WebKit2/UIProcess/API/win/WKView.h

    r64253 r65780  
    4343WK_EXPORT WKPageRef WKViewGetPage(WKViewRef view);
    4444
    45 WK_EXPORT WKViewRef WKViewRetain(WKViewRef view);
    46 WK_EXPORT void WKViewRelease(WKViewRef view);
    47 
    4845WK_EXPORT void WKViewSetHostWindow(WKViewRef view, HWND hostWindow);
    4946WK_EXPORT void WKViewWindowAncestryDidChange(WKViewRef view);
     
    5350#endif
    5451
    55 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKView)
    56 
    5752#endif /* WKView_h */
  • trunk/WebKit2/UIProcess/WebPreferences.cpp

    r64888 r65780  
    3232WebPreferences* WebPreferences::shared()
    3333{
    34     static WebPreferences* sharedPreferences = WebPreferences::create().releaseRef();
     34    static WebPreferences* sharedPreferences = WebPreferences::create().leakRef();
    3535    return sharedPreferences;
    3636}
  • trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp

    r64778 r65780  
    3636    return toRef(InjectedBundleNodeHandle::APIType);
    3737}
    38 
    39 WKBundleNodeHandleRef WKBundleNodeHandleRetain(WKBundleNodeHandleRef nodeHandleRef)
    40 {
    41     toWK(nodeHandleRef)->ref();
    42     return nodeHandleRef;
    43 }
    44 
    45 void WKBundleNodeHandleRelease(WKBundleNodeHandleRef nodeHandleRef)
    46 {
    47     toWK(nodeHandleRef)->deref();
    48 }
  • trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h

    r65620 r65780  
    3737WK_EXPORT WKTypeID WKBundleNodeHandleGetTypeID();
    3838
    39 WK_EXPORT WKBundleNodeHandleRef WKBundleNodeHandleRetain(WKBundleNodeHandleRef nodeHandle);
    40 WK_EXPORT void WKBundleNodeHandleRelease(WKBundleNodeHandleRef nodeHandle);
    41 
    4239#ifdef __cplusplus
    4340}
    4441#endif
    4542
    46 WK_DECLARE_RETAIN_RELEASE_OVERLOADS(WKBundleNodeHandle)
    47 
    4843#endif /* WKBundleNodeHandle_h */
  • trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp

    r64788 r65780  
    4747    return toRef(InjectedBundleScriptWorld::normalWorld());
    4848}
    49 
    50 WKBundleScriptWorldRef WKBundleScriptWorldRetain(WKBundleScriptWorldRef scriptWorldRef)
    51 {
    52     toWK(scriptWorldRef)->ref();
    53     return scriptWorldRef;
    54 }
    55 
    56 void WKBundleScriptWorldRelease(WKBundleScriptWorldRef scriptWorldRef)
    57 {
    58     toWK(scriptWorldRef)->deref();
    59 }
  • trunk/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h

    r64788 r65780  
    3939WK_EXPORT WKBundleScriptWorldRef WKBundleScriptWorldNormalWorld();
    4040
    41 WK_EXPORT WKBundleScriptWorldRef WKBundleScriptWorldRetain(WKBundleScriptWorldRef scriptWorld);
    42 WK_EXPORT void WKBundleScriptWorldRelease(WKBundleScriptWorldRef scriptWorld);
    43 
    4441#ifdef __cplusplus
    4542}
  • trunk/WebKitTools/ChangeLog

    r65773 r65780  
     12010-08-21  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Remove specialized retain/release functions in favor of a single one for WKTypeRefs
     6        https://bugs.webkit.org/show_bug.cgi?id=44386
     7
     8        * MiniBrowser/mac/AppDelegate.m:
     9        (didRecieveMessageFromInjectedBundle):
     10        (didNavigateWithNavigationData):
     11        (-[BrowserAppDelegate init]):
     12        (-[BrowserAppDelegate applicationWillTerminate:]):
     13        * MiniBrowser/mac/BrowserStatisticsWindowController.m:
     14        (-[BrowserStatisticsWindowController initWithThreadedWKContextRef:processWKContextRef:]):
     15        (-[BrowserStatisticsWindowController dealloc]):
     16        * MiniBrowser/mac/BrowserWindowController.m:
     17        (-[BrowserWindowController initWithPageNamespace:]):
     18        (-[BrowserWindowController fetch:]):
     19        (-[BrowserWindowController windowWillClose:]):
     20        (-[BrowserWindowController applicationTerminating]):
     21        (closePage):
     22        (runJavaScriptAlert):
     23        (runJavaScriptConfirm):
     24        (runJavaScriptPrompt):
     25        (-[BrowserWindowController updateProvisionalURLForFrame:]):
     26        * MiniBrowser/mac/WebBundle/WebBundleMain.m:
     27        (didClearWindowObjectForFrame):
     28        * MiniBrowser/win/BrowserView.cpp:
     29        (BrowserView::goToURL):
     30        * WebKitTestRunner/win/PlatformWebViewWin.cpp:
     31        (WTR::PlatformWebView::~PlatformWebView):
     32
    1332010-08-20  Benjamin Poulain  <benjamin.poulain@nokia.com>
    234
Note: See TracChangeset for help on using the changeset viewer.