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

Munez Bn munezbn.dev at gmail.com
Sat Jul 27 00:42:37 PDT 2019


I figured out the issue but not sure how to fix it.
The compiler by default uses* "--no-undefined"* linker flag,
Even though extension is not linked to any program during build time ( but
loaded in web process at run-time) , it is expected that extension library
throwing this error due to *"--no-undefined"*
But the main problem is that libwebkit doesnt have jsc_weak_xxx API. I
suspect that this is because linker doesn't link *JSCWeakValue.o *to*
libWPEwebkit *which is because there is no code in webkit which uses
*jsc_weak_xxx
*API internally.
This usually happens when we use *"--as-needed"* linker option. But this is
not the case for *jsc_value_xxxx *API which is used internally in webkit (
webview, jsccontext, jscexception etc).

Just to confirm above theory I added a *jsc_weak_xxxx* call in
JSCContext.cpp and recompiled libWPEwebkit, and indeed now libWPEWebkit has
all jsc_weak_xxxx symbols and was able to compile my web extension.
.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-wpe/attachments/20190727/70312302/attachment.html>


More information about the webkit-wpe mailing list