[Webkit-unassigned] [Bug 184015] API::SharedJSContext caches its JSContext for at most one second

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Aug 16 11:48:28 PDT 2018


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

--- Comment #6 from Geoffrey Garen <ggaren at apple.com> ---
> > Keith / Saam, is there a reason SharedJSContext "expires" after one second?
> 
> I don't know of any reason.
> 
> Geoff, do you know?

It looks like I asked for some limit on this cache in bug 146416. Given that a JS VM retains a bunch of memory, I think it's an important goal that a WKWebView client should be able to allocate a WebView, do some work with it, and then throw it away without retaining a JS VM forever.

Here are some solutions that I think would be reasonable:

(1) Make allocation of a JSContext faster than 16ms. (Jeepers!)

(2) Change API::SerializedScriptValue::deserialize to accept a WKWebView argument, and keep a weak reference to that argument, and clear its cache when the set of all WebViews that has ever called API::SerializedScriptValue::deserialize becomes empty.

I think we should probably do both of these.

-- 
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/20180816/1b2a9314/attachment.html>


More information about the webkit-unassigned mailing list