[Webkit-unassigned] [Bug 101904] [EFL][WK2] Add API to execute js script
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 13 23:10:51 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=101904
--- Comment #4 from Christophe Dumez <christophe.dumez at intel.com> 2012-12-13 23:13:11 PST ---
(From update of attachment 173587)
View in context: https://bugs.webkit.org/attachment.cgi?id=173587&action=review
>> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:926
>> +struct _Ewk_View_Script_Execute_Callback_Context {
>
> I think ewk_view_private.h or EwkViewImpl.h is more better place for this struct.
Why? if this struct is used only in ewk_view.cpp, then I think this is the right place for it. However, we don't use _ prefix for such structures anymore.
> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:936
> + Ewk_View_Script_Execute_Callback_Context* callbackContext = static_cast<Ewk_View_Script_Execute_Callback_Context*>(context);
It is a good idea to use OwnPtr here and adopt to avoid having to call delete manually.
>> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:943
>> + JSGlobalContextRef jsGlobalContext = impl->ewkContext()->jsGlobalContext();
>
> Don't you need to free jsGlobalContext using JSGlobalContextRelease() after finishing to use it ?
Looks like the global context object is owned by Ewk_Context so I don't think we should free it here.
> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:950
> + JSRetainPtr<JSStringRef> jsStringValue(JSValueToStringCopy(jsGlobalContext, value, 0));
Looks like you may be leaking here. Don't you need to adopt the value returned by JSValueToStringCopy() ?
> Source/WebKit2/UIProcess/API/efl/ewk_view.h:822
> + * The result value for the executeion can be got from the asynchronous callback.
"execution"
"got" -> "retrieved"
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list