+2012-07-02 Christophe Dumez <christophe.dumez@intel.com>
+
+ [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 <mrobinson@igalia.com>
[TextureMapper] The TextureMapper should support edge-distance anti-antialiasing
eina_stringshare_del(intent->action);
eina_stringshare_del(intent->type);
eina_stringshare_del(intent->service);
- delete intent;
+ free(intent);
#endif
}
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;
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;
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;
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;
String value = toImpl(wkValue.get())->string();
if (value.isEmpty())
return 0;
+
return strdup(value.utf8().data());
#else
return 0;
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;
Ewk_Intent* ewkIntent = static_cast<Ewk_Intent*>(calloc(1, sizeof(Ewk_Intent)));
ewkIntent->__ref = 1;
ewkIntent->wkIntent = intentData;
+
return ewkIntent;
}
#endif