[webkit-reviews] review granted: [Bug 75543] [GTK] Add webkit_web_view_run_javascript() to WebKit2 GTK+ : [Attachment 132244] New patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Mar 16 09:07:25 PDT 2012
Martin Robinson <mrobinson at webkit.org> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 75543: [GTK] Add webkit_web_view_run_javascript() to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=75543
Attachment 132244: New patch
https://bugs.webkit.org/attachment.cgi?id=132244&action=review
------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
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
More information about the webkit-reviews
mailing list