From: commit-queue@webkit.org Date: Tue, 3 Jul 2012 06:24:19 +0000 (+0000) Subject: [WK2][EFL] Free Ewk_Intent calloc'd memory with free() instead of delete X-Git-Tag: 070512121124~165 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bd73de6f923a3d1d9428faccc104277d56132309;p=profile%2Fivi%2Fwebkit-efl.git [WK2][EFL] Free Ewk_Intent calloc'd memory with free() instead of delete https://bugs.webkit.org/show_bug.cgi?id=90433 Patch by Christophe Dumez on 2012-07-02 Reviewed by Kenneth Rohde Christiansen. Free calloc'd memory with free() instead of delete in Ewk_Intent. Add blank lines before return statements for consistency. * UIProcess/API/efl/ewk_intent.cpp: (ewk_intent_unref): (ewk_intent_action_get): (ewk_intent_type_get): (ewk_intent_service_get): (ewk_intent_suggestions_get): (ewk_intent_extra_get): (ewk_intent_extra_names_get): (ewk_intent_new): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121731 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 658165e..ee2bb93 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,23 @@ +2012-07-02 Christophe Dumez + + [WK2][EFL] Free Ewk_Intent calloc'd memory with free() instead of delete + https://bugs.webkit.org/show_bug.cgi?id=90433 + + Reviewed by Kenneth Rohde Christiansen. + + Free calloc'd memory with free() instead of delete in Ewk_Intent. + Add blank lines before return statements for consistency. + + * UIProcess/API/efl/ewk_intent.cpp: + (ewk_intent_unref): + (ewk_intent_action_get): + (ewk_intent_type_get): + (ewk_intent_service_get): + (ewk_intent_suggestions_get): + (ewk_intent_extra_get): + (ewk_intent_extra_names_get): + (ewk_intent_new): + 2012-07-02 Martin Robinson [TextureMapper] The TextureMapper should support edge-distance anti-antialiasing diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp index f94863e..a5e201a 100644 --- a/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp @@ -82,7 +82,7 @@ void ewk_intent_unref(Ewk_Intent* intent) eina_stringshare_del(intent->action); eina_stringshare_del(intent->type); eina_stringshare_del(intent->service); - delete intent; + free(intent); #endif } @@ -94,6 +94,7 @@ const char* ewk_intent_action_get(const Ewk_Intent* intent) WKRetainPtr wkAction(AdoptWK, WKIntentDataCopyAction(wkIntent)); Ewk_Intent* ewkIntent = const_cast(intent); eina_stringshare_replace(&ewkIntent->action, toImpl(wkAction.get())->string().utf8().data()); + return intent->action; #else return 0; @@ -108,6 +109,7 @@ const char* ewk_intent_type_get(const Ewk_Intent* intent) WKRetainPtr wkType(AdoptWK, WKIntentDataCopyType(wkIntent)); Ewk_Intent* ewkIntent = const_cast(intent); eina_stringshare_replace(&ewkIntent->type, toImpl(wkType.get())->string().utf8().data()); + return intent->type; #else return 0; @@ -122,6 +124,7 @@ const char* ewk_intent_service_get(const Ewk_Intent* intent) WKRetainPtr wkService(AdoptWK, WKIntentDataCopyService(wkIntent)); Ewk_Intent* ewkIntent = const_cast(intent); eina_stringshare_replace(&ewkIntent->service, toImpl(wkService.get())->string().utf8().data()); + return intent->service; #else return 0; @@ -140,6 +143,7 @@ Eina_List* ewk_intent_suggestions_get(const Ewk_Intent* intent) WKURLRef wkSuggestion = static_cast(WKArrayGetItemAtIndex(wkSuggestions.get(), i)); listOfSuggestions = eina_list_append(listOfSuggestions, strdup(toImpl(wkSuggestion)->string().utf8().data())); } + return listOfSuggestions; #else return 0; @@ -156,6 +160,7 @@ char* ewk_intent_extra_get(const Ewk_Intent* intent, const char* key) String value = toImpl(wkValue.get())->string(); if (value.isEmpty()) return 0; + return strdup(value.utf8().data()); #else return 0; @@ -175,6 +180,7 @@ Eina_List* ewk_intent_extra_names_get(const Ewk_Intent* intent) WKStringRef wkKey = static_cast(WKArrayGetItemAtIndex(wkKeys.get(), i)); listOfKeys = eina_list_append(listOfKeys, strdup(toImpl(wkKey)->string().utf8().data())); } + return listOfKeys; #else return 0; @@ -189,6 +195,7 @@ Ewk_Intent* ewk_intent_new(WKIntentDataRef intentData) Ewk_Intent* ewkIntent = static_cast(calloc(1, sizeof(Ewk_Intent))); ewkIntent->__ref = 1; ewkIntent->wkIntent = intentData; + return ewkIntent; } #endif