[Webkit-unassigned] [Bug 75543] [GTK] Add webkit_web_view_run_javascript() to WebKit2 GTK+

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 16 09:07:26 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=75543


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #132244|review?                     |review+
               Flag|                            |




--- Comment #17 from Martin Robinson <mrobinson at webkit.org>  2012-03-16 09:07:25 PST ---
(From update of attachment 132244)
View in context: https://bugs.webkit.org/attachment.cgi?id=132244&action=review

> Source/WebKit2/UIProcess/API/gtk/WebKitJavascriptResult.cpp:38
> +struct _WebKitJavascriptResult {
> +    _WebKitJavascriptResult(WebKitWebView* view, WKSerializedScriptValueRef wkSerializedScriptValue)
> +        : webView(view)
> +        , referenceCount(1)
> +        {
> +            value = WKSerializedScriptValueDeserialize(wkSerializedScriptValue, webkit_web_view_get_javascript_global_context(view), 0);
> +        }
> +
> +    GRefPtr<WebKitWebView> webView;
> +    JSValueRef value;
> +
> +    int referenceCount;
> +};

Instead of implementing your own reference counted type you could make this class extend from RefCounted<_WebKitJavaScriptResult> and use ref() and unref().

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:1504
> +        g_set_error_literal(&error, WEBKIT_JAVASCRIPT_ERROR, WEBKIT_JAVASCRIPT_ERROR_SCRIPT_FAILED, _("An exception was raised in Javascript"));

Javascript -> JavaScript

-- 
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