ScriptState has been RefCounted for a long time (may be since its beginning). Now Oilpan (Blink GC) is ready and we can change ScriptState from RefCounted to GarbageCollectedFinalized. Once we make the change, it must be much simpler to maintain the lifetime of ScriptState, etc. Let's do this.
Sorry, I stopped working on this for a while. Coming back to it now. I'm stuck not knowing what to do with ScriptPromise and ScriptValue.
yukishiino@, haraken@: I wrote some notes on what I've tried. Can you take a look and/or cc other people to help with the approach I should take:
https://docs.google.com/a/chromium.org/document/d/1yz_py5TFlU7C58VmwQc5vwAR8RkbT3s2OED6QhVqa-0/
Thanks!
I'm out for the next few weeks and will be transitioning to a new team when I return, so unfortunately I won't have time to finish this. yukishiino@ assigning you to take or redirect.
Here's a CL for the mechanical part of updating all scoped_refptr<ScriptState> users. https://chromium-review.googlesource.com/#/c/835148/
The remaining work is more complicated: fixing ScriptPromise and ScriptValue. yukishiino@ has suggested the refactoring of removing ScriptState from both of them.
Thanks for having been working on this. Your investigation has helped us understand that ScriptValue and ScriptPromise are good targets to address first. Thanks and good luck. :)
Comment 1 by yukishiino@chromium.org
, Oct 11 2017