[wpe-webkit] Using jsc_weak_xxxx API in WPE web-extensions

Munez Bn munezbn.dev at gmail.com
Sun Jul 21 08:50:28 PDT 2019


Hi All,

I was trying to add notification support in web-extension code and I was
referring to epiphany browser for the same.
They used *jsc_class_add_property *to define the name and get/set functions
and they used JSCWeakValue to store the function.



*  JSCValue             *js_function;  JSCWeakValue *weak_value;
weak_value = jsc_weak_value_new (js_function);*

I followed same thing and everything worked fine with WebKit GTK. But when
I tried it with WPE I hit compilation error  for all jsc_weak_xxxxx APIs

*undefined reference to `jsc_weak_value_get_type'*

Then  I realized that it is defined in LibJavaScriptCore which is a static
library in WPE and dynamic in WKGTK.

Can you please suggest what is the better way to handle this? I don't want
to link javacsriptcore library to my extension. And if I don't use
*jsc_weak_value
*then Im getting run-time error saying JSC_IS_VALUE failed while trying to
call that jsc_function using *jsc_value_function_call .*

Correct me if I am wrong, technically Javascriptcore is linked to
libwpewebkit which is loaded in WebProcess. And extension also loaded in
WebProcess
* ?*

Thanks & Regards
Munez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-wpe/attachments/20190721/444712b1/attachment.html>


More information about the webkit-wpe mailing list