Title: [121731] trunk/Source/WebKit2
Revision
121731
Author
[email protected]
Date
2012-07-02 23:24:19 -0700 (Mon, 02 Jul 2012)

Log Message

[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 <[email protected]> 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):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (121730 => 121731)


--- trunk/Source/WebKit2/ChangeLog	2012-07-03 04:42:46 UTC (rev 121730)
+++ trunk/Source/WebKit2/ChangeLog	2012-07-03 06:24:19 UTC (rev 121731)
@@ -1,3 +1,23 @@
+2012-07-02  Christophe Dumez  <[email protected]>
+
+        [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  <[email protected]>
 
         [TextureMapper] The TextureMapper should support edge-distance anti-antialiasing

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp (121730 => 121731)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp	2012-07-03 04:42:46 UTC (rev 121730)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp	2012-07-03 06:24:19 UTC (rev 121731)
@@ -82,7 +82,7 @@
     eina_stringshare_del(intent->action);
     eina_stringshare_del(intent->type);
     eina_stringshare_del(intent->service);
-    delete intent;
+    free(intent);
 #endif
 }
 
@@ -94,6 +94,7 @@
     WKRetainPtr<WKStringRef> wkAction(AdoptWK, WKIntentDataCopyAction(wkIntent));
     Ewk_Intent* ewkIntent = const_cast<Ewk_Intent*>(intent);
     eina_stringshare_replace(&ewkIntent->action, toImpl(wkAction.get())->string().utf8().data());
+
     return intent->action;
 #else
     return 0;
@@ -108,6 +109,7 @@
     WKRetainPtr<WKStringRef> wkType(AdoptWK, WKIntentDataCopyType(wkIntent));
     Ewk_Intent* ewkIntent = const_cast<Ewk_Intent*>(intent);
     eina_stringshare_replace(&ewkIntent->type, toImpl(wkType.get())->string().utf8().data());
+
     return intent->type;
 #else
     return 0;
@@ -122,6 +124,7 @@
     WKRetainPtr<WKURLRef> wkService(AdoptWK, WKIntentDataCopyService(wkIntent));
     Ewk_Intent* ewkIntent = const_cast<Ewk_Intent*>(intent);
     eina_stringshare_replace(&ewkIntent->service, toImpl(wkService.get())->string().utf8().data());
+
     return intent->service;
 #else
     return 0;
@@ -140,6 +143,7 @@
         WKURLRef wkSuggestion = static_cast<WKURLRef>(WKArrayGetItemAtIndex(wkSuggestions.get(), i));
         listOfSuggestions = eina_list_append(listOfSuggestions, strdup(toImpl(wkSuggestion)->string().utf8().data()));
     }
+
     return listOfSuggestions;
 #else
     return 0;
@@ -156,6 +160,7 @@
     String value = toImpl(wkValue.get())->string();
     if (value.isEmpty())
         return 0;
+
     return strdup(value.utf8().data());
 #else
     return 0;
@@ -175,6 +180,7 @@
         WKStringRef wkKey = static_cast<WKStringRef>(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* ewkIntent = static_cast<Ewk_Intent*>(calloc(1, sizeof(Ewk_Intent)));
     ewkIntent->__ref = 1;
     ewkIntent->wkIntent = intentData;
+
     return ewkIntent;
 }
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to