[Webkit-unassigned] [Bug 101904] [EFL][WK2] Add API to execute js script
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 14 01:52:24 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=101904
--- Comment #7 from Mikhail Pozdnyakov <mikhail.pozdnyakov at intel.com> 2012-12-14 01:54:44 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:931
> +typedef struct _Ewk_View_Script_Execute_Callback_Context Ewk_View_Script_Execute_Callback_Context;
could be just 'struct EwkViewScriptExecuteCallbackContext'
> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:935
> + EINA_SAFETY_ON_NULL_RETURN(context);
maybe assert is better since 'runJavaScriptCallback' is always invoked internally? How context can be '0'?
>> 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.
indeed.
> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:961
> +Eina_Bool ewk_view_script_execute(Evas_Object* ewkView, const char* script, Ewk_View_Script_Execute_Cb callback, void* userData)
isn't it worth mentioning where the script will be executed? like "runJavaScriptInMainFrame"
> Source/WebKit2/UIProcess/API/efl/ewk_view.cpp:967
> + context->scriptExecuteCallback = callback;
maybe this could be done inside structure constructor?
--
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