Changeset 128413 in webkit
- Timestamp:
- Sep 13, 2012 12:35:59 AM (12 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r128403 r128413 1 2012-09-13 Christophe Dumez <christophe.dumez@intel.com> 2 3 [EFL][WK2] Make _ref() functions return the object 4 https://bugs.webkit.org/show_bug.cgi?id=96604 5 6 Reviewed by Gyuyoung Kim. 7 8 Make _ref() functions return the ref'd object to 9 make them more convenient to use. Also fix their 10 usage to make use of the newly returned value. 11 12 This change is consistent with eina_stringshare_ref() 13 in EFL and g_object_ref() in glib. 14 15 * UIProcess/API/efl/ewk_back_forward_list.cpp: 16 (createEinaList): 17 * UIProcess/API/efl/ewk_back_forward_list_item.cpp: 18 (ewk_back_forward_list_item_ref): 19 * UIProcess/API/efl/ewk_back_forward_list_item.h: 20 * UIProcess/API/efl/ewk_context.cpp: 21 (ewk_context_download_job_add): 22 * UIProcess/API/efl/ewk_download_job.cpp: 23 (ewk_download_job_ref): 24 (ewk_download_job_response_set): 25 * UIProcess/API/efl/ewk_download_job.h: 26 * UIProcess/API/efl/ewk_form_submission_request.cpp: 27 (ewk_form_submission_request_ref): 28 * UIProcess/API/efl/ewk_form_submission_request.h: 29 * UIProcess/API/efl/ewk_intent.cpp: 30 (ewk_intent_ref): 31 * UIProcess/API/efl/ewk_intent.h: 32 * UIProcess/API/efl/ewk_intent_service.cpp: 33 (ewk_intent_service_ref): 34 * UIProcess/API/efl/ewk_intent_service.h: 35 * UIProcess/API/efl/ewk_navigation_policy_decision.cpp: 36 (ewk_navigation_policy_decision_ref): 37 * UIProcess/API/efl/ewk_navigation_policy_decision.h: 38 * UIProcess/API/efl/ewk_url_request.cpp: 39 (ewk_url_request_ref): 40 * UIProcess/API/efl/ewk_url_request.h: 41 * UIProcess/API/efl/ewk_url_response.cpp: 42 (ewk_url_response_ref): 43 * UIProcess/API/efl/ewk_url_response.h: 44 * UIProcess/API/efl/ewk_url_scheme_request.cpp: 45 (ewk_url_scheme_request_ref): 46 * UIProcess/API/efl/ewk_url_scheme_request.h: 47 * UIProcess/API/efl/ewk_view.cpp: 48 (ewk_view_resource_load_initiated): 49 * UIProcess/API/efl/ewk_web_resource.cpp: 50 (ewk_web_resource_ref): 51 * UIProcess/API/efl/ewk_web_resource.h: 52 1 53 2012-09-12 Sheriff Bot <webkit.review.bot@gmail.com> 2 54 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.cpp
r126926 r128413 96 96 WKBackForwardListItemRef wkItem = static_cast<WKBackForwardListItemRef>(WKArrayGetItemAtIndex(wkList, i)); 97 97 Ewk_Back_Forward_List_Item* item = addItemToWrapperCache(list, wkItem); 98 ewk_back_forward_list_item_ref(item); 99 result = eina_list_append(result, item); 98 result = eina_list_append(result, ewk_back_forward_list_item_ref(item)); 100 99 } 101 100 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp
r125969 r128413 66 66 WKBackForwardListItemRef wkItem_ = (item)->wkItem.get() 67 67 68 voidewk_back_forward_list_item_ref(Ewk_Back_Forward_List_Item* item)68 Ewk_Back_Forward_List_Item* ewk_back_forward_list_item_ref(Ewk_Back_Forward_List_Item* item) 69 69 { 70 EINA_SAFETY_ON_NULL_RETURN (item);70 EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0); 71 71 ++item->__ref; 72 73 return item; 72 74 } 73 75 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h
r124875 r128413 45 45 * 46 46 * @param item the back-forward list item instance to increase the reference count 47 * 48 * @return a pointer to the object on success, @c NULL otherwise. 47 49 */ 48 EAPI voidewk_back_forward_list_item_ref(Ewk_Back_Forward_List_Item *item);50 EAPI Ewk_Back_Forward_List_Item *ewk_back_forward_list_item_ref(Ewk_Back_Forward_List_Item *item); 49 51 50 52 /** -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
r127195 r128413 152 152 return; 153 153 154 ewk_download_job_ref(ewkDownload); 155 ewkContext->downloadJobs.add(downloadId, ewkDownload); 154 ewkContext->downloadJobs.add(downloadId, ewk_download_job_ref(ewkDownload)); 156 155 } 157 156 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp
r125671 r128413 77 77 }; 78 78 79 voidewk_download_job_ref(Ewk_Download_Job* download)80 { 81 EINA_SAFETY_ON_NULL_RETURN (download);79 Ewk_Download_Job* ewk_download_job_ref(Ewk_Download_Job* download) 80 { 81 EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0); 82 82 83 83 ++download->__ref; 84 85 return download; 84 86 } 85 87 … … 222 224 EINA_SAFETY_ON_NULL_RETURN(response); 223 225 224 ewk_url_response_ref(response); 225 download->response = response; 226 download->response = ewk_url_response_ref(response); 226 227 } 227 228 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_download_job.h
r123882 r128413 71 71 * 72 72 * @param download the download object to increase the reference count 73 */ 74 EAPI void ewk_download_job_ref(Ewk_Download_Job *download); 73 * 74 * @return a pointer to the object on success, @c NULL otherwise. 75 */ 76 EAPI Ewk_Download_Job *ewk_download_job_ref(Ewk_Download_Job *download); 75 77 76 78 /** -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.cpp
r123742 r128413 66 66 }; 67 67 68 voidewk_form_submission_request_ref(Ewk_Form_Submission_Request* request)68 Ewk_Form_Submission_Request* ewk_form_submission_request_ref(Ewk_Form_Submission_Request* request) 69 69 { 70 EINA_SAFETY_ON_NULL_RETURN (request);70 EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0); 71 71 ++request->__ref; 72 73 return request; 72 74 } 73 75 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h
r123742 r128413 48 48 * 49 49 * @param request the request object to increase the reference count 50 * 51 * @return a pointer to the object on success, @c NULL otherwise. 50 52 */ 51 EAPI voidewk_form_submission_request_ref(Ewk_Form_Submission_Request *request);53 EAPI Ewk_Form_Submission_Request *ewk_form_submission_request_ref(Ewk_Form_Submission_Request *request); 52 54 53 55 /** -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp
r125671 r128413 80 80 WKIntentDataRef wkIntent_ = (intent)->wkIntent.get() 81 81 82 voidewk_intent_ref(Ewk_Intent* intent)82 Ewk_Intent* ewk_intent_ref(Ewk_Intent* intent) 83 83 { 84 84 #if ENABLE(WEB_INTENTS) 85 EINA_SAFETY_ON_NULL_RETURN (intent);85 EINA_SAFETY_ON_NULL_RETURN_VAL(intent, 0); 86 86 ++intent->__ref; 87 87 #endif 88 89 return intent; 88 90 } 89 91 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_intent.h
r123604 r128413 45 45 * 46 46 * @param intent the intent object to increase the reference count 47 * 48 * @return a pointer to the object on success, @c NULL otherwise. 47 49 */ 48 EAPI voidewk_intent_ref(Ewk_Intent *intent);50 EAPI Ewk_Intent *ewk_intent_ref(Ewk_Intent *intent); 49 51 50 52 /** -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.cpp
r125671 r128413 68 68 }; 69 69 70 voidewk_intent_service_ref(Ewk_Intent_Service* service)70 Ewk_Intent_Service* ewk_intent_service_ref(Ewk_Intent_Service* service) 71 71 { 72 72 #if ENABLE(WEB_INTENTS_TAG) 73 EINA_SAFETY_ON_NULL_RETURN (service);73 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0); 74 74 ++service->__ref; 75 75 #endif 76 77 return service; 76 78 } 77 79 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h
r122868 r128413 45 45 * 46 46 * @param service the intent service object to increase the reference count 47 * 48 * @return a pointer to the object on success, @c NULL otherwise. 47 49 */ 48 EAPI voidewk_intent_service_ref(Ewk_Intent_Service *service);50 EAPI Ewk_Intent_Service *ewk_intent_service_ref(Ewk_Intent_Service *service); 49 51 50 52 /** -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.cpp
r125671 r128413 74 74 }; 75 75 76 voidewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision* decision)76 Ewk_Navigation_Policy_Decision* ewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision* decision) 77 77 { 78 EINA_SAFETY_ON_NULL_RETURN (decision);78 EINA_SAFETY_ON_NULL_RETURN_VAL(decision, 0); 79 79 80 80 ++decision->__ref; 81 82 return decision; 81 83 } 82 84 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h
r122742 r128413 71 71 * 72 72 * @param decision the policy decision object to increase the reference count 73 * 74 * @return a pointer to the object on success, @c NULL otherwise. 73 75 */ 74 EAPI voidewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision *decision);76 EAPI Ewk_Navigation_Policy_Decision *ewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision *decision); 75 77 76 78 /** -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_request.cpp
r125671 r128413 61 61 }; 62 62 63 voidewk_url_request_ref(Ewk_Url_Request* request)63 Ewk_Url_Request* ewk_url_request_ref(Ewk_Url_Request* request) 64 64 { 65 EINA_SAFETY_ON_NULL_RETURN (request);65 EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0); 66 66 ++request->__ref; 67 68 return request; 67 69 } 68 70 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_request.h
r122868 r128413 45 45 * 46 46 * @param request the URL request object to increase the reference count 47 * 48 * @return a pointer to the object on success, @c NULL otherwise. 47 49 */ 48 EAPI voidewk_url_request_ref(Ewk_Url_Request *request);50 EAPI Ewk_Url_Request *ewk_url_request_ref(Ewk_Url_Request *request); 49 51 50 52 /** -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_response.cpp
r125671 r128413 59 59 }; 60 60 61 voidewk_url_response_ref(Ewk_Url_Response* response)61 Ewk_Url_Response* ewk_url_response_ref(Ewk_Url_Response* response) 62 62 { 63 EINA_SAFETY_ON_NULL_RETURN (response);63 EINA_SAFETY_ON_NULL_RETURN_VAL(response, 0); 64 64 ++response->__ref; 65 66 return response; 65 67 } 66 68 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_response.h
r123882 r128413 45 45 * 46 46 * @param response the URL response object to increase the reference count 47 * 48 * @return a pointer to the object on success, @c NULL otherwise. 47 49 */ 48 EAPI voidewk_url_response_ref(Ewk_Url_Response *response);50 EAPI Ewk_Url_Response *ewk_url_response_ref(Ewk_Url_Response *response); 49 51 50 52 /** -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.cpp
r123752 r128413 68 68 }; 69 69 70 voidewk_url_scheme_request_ref(Ewk_Url_Scheme_Request* request)70 Ewk_Url_Scheme_Request* ewk_url_scheme_request_ref(Ewk_Url_Scheme_Request* request) 71 71 { 72 EINA_SAFETY_ON_NULL_RETURN (request);72 EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0); 73 73 ++request->__ref; 74 75 return request; 74 76 } 75 77 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h
r123752 r128413 45 45 * 46 46 * @param request the URL scheme request object to increase the reference count 47 * 48 * @return a pointer to the object on success, @c NULL otherwise. 47 49 */ 48 EAPI voidewk_url_scheme_request_ref(Ewk_Url_Scheme_Request *request);50 EAPI Ewk_Url_Scheme_Request *ewk_url_scheme_request_ref(Ewk_Url_Scheme_Request *request); 49 51 50 52 /** -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
r128163 r128413 890 890 891 891 // Keep the resource internally to reuse it later. 892 ewk_web_resource_ref(resource); 893 priv->loadingResourcesMap.add(resourceIdentifier, resource); 892 priv->loadingResourcesMap.add(resourceIdentifier, ewk_web_resource_ref(resource)); 894 893 895 894 evas_object_smart_callback_call(ewkView, "resource,request,new", &resourceRequest); -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_web_resource.cpp
r125671 r128413 48 48 }; 49 49 50 voidewk_web_resource_ref(Ewk_Web_Resource* resource)50 Ewk_Web_Resource* ewk_web_resource_ref(Ewk_Web_Resource* resource) 51 51 { 52 EINA_SAFETY_ON_NULL_RETURN (resource);52 EINA_SAFETY_ON_NULL_RETURN_VAL(resource, 0); 53 53 54 54 ++resource->__ref; 55 56 return resource; 55 57 } 56 58 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_web_resource.h
r122868 r128413 45 45 * 46 46 * @param resource the resource object to increase the reference count 47 * 48 * @return a pointer to the object on success, @c NULL otherwise. 47 49 */ 48 EAPI voidewk_web_resource_ref(Ewk_Web_Resource *resource);50 EAPI Ewk_Web_Resource *ewk_web_resource_ref(Ewk_Web_Resource *resource); 49 51 50 52 /**
Note: See TracChangeset
for help on using the changeset viewer.