[Webkit-unassigned] [Bug 183448] [GTK][WPE] Add API to convert between DOM and JSCValue

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 16 17:41:07 PDT 2018


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

Michael Catanzaro <mcatanzaro at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mcatanzaro at igalia.com

--- Comment #3 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 335931
  --> https://bugs.webkit.org/attachment.cgi?id=335931
WIP patch

View in context: https://bugs.webkit.org/attachment.cgi?id=335931&action=review

> Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:27
>  #include <jsc/JSCContextPrivate.h>

Alphabetize jsc below WebCore and above wtf: all the uppercase headers come first.

> Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:154
> +JSCValue* webkit_frame_get_js_value_for_dom_object(WebKitFrame* frame, WebKitDOMObject* domObject)
> +{
> +    return webkit_frame_get_js_value_for_dom_object_in_script_world(frame, domObject, webkit_script_world_get_default());
> +}

Would it make sense to force users to explicitly pass a WebKitScriptWorld? Could prevent mistakes?

> Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp:168
> +        JSC::JSLockHolder lock(exec);

So why is a lock needed here, but not in webkit_dom_note_for_js_value()... because the JSC::ExecState is used?

> Tools/TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:47
> +    g_print("Leaked objects in WebProcess:");
> +    for (const auto object : s_watchedObjects)
> +        g_print(" %s(%p)", g_type_name_from_instance(reinterpret_cast<GTypeInstance*>(object)), object);
> +    g_print("\n");

This should use g_fprintf and stderr, so that it causes the test to fail.

> Tools/TestWebKitAPI/Tests/WebKitGtk/EditorTest.cpp:34
> +    bool testSelectionchanged(WebKitWebPage* page)

testSelectionChanged

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180317/e004218e/attachment-0001.html>


More information about the webkit-unassigned mailing list