Closed Bug 1601698 Opened 1 year ago Closed 1 year ago

Make LazyScriptCreationData owned by FunctionCreationData


(Core :: JavaScript Engine, enhancement, P5)




Tracking Status
firefox73 --- fixed


(Reporter: mgaudet, Assigned: mgaudet)




(4 files)

As an enhancement and clarification, it would be nice to move the ownership of LazyScriptCreationData out of FunctionBox, and instead keep it on FunctionCreationData (if you have a LazyScriptCreationData then the Function you are compiling should also be deferred, and so it can live there).

The challenge right now is that LazyScriptCreationData is a move type due to it holding onto the closed over bindings and the FunctionBoxVector, wheras the FunctionCreationData was originally designed explicitly as a copy type.

This means that there is some challenge in trying to make this ownership happen; in particular, handling the rooting and ownership of FunctionCreationData when faced with trySyntaxParseInnerFunction

Assignee: nobody → mgaudet

Because you will always have a FunctionCreationData if you've got a
LazyScriptCreationData, we can make the latter owned by the former.

Depends on D57158

This was a leftover cleanup item after Bug 1592433

Depends on D57160

Pushed by
Replace GenerateFunctionCreationData with constructor r=caroline
Make LazyScriptCreationData owned by FunctionCreationData r=caroline
Rename publish functions to reflect current state r=caroline
Cleanup deferred mode comment r=caroline
You need to log in before you can comment on or make changes to this bug.