Closed Bug 1620495 Opened 11 months ago Closed 10 months ago

Remove the js::LazyScript type


(Core :: JavaScript Engine, task, P2)




Tracking Status
firefox76 --- fixed


(Reporter: tcampbell, Assigned: tcampbell)




(7 files)

After Bug 1619803, we should remove all remaining uses of the js::LazyScript type. The remaining uses are primarily as a namespace for static methods, and as a type for method overload resolution.

The old limits were to due bit packing tricks of a very old form of the
LazyScript data structure. Replace this with a limit of UINT32_MAX. For
simplicity, just fail the parse if we hit this limit since the full parse
will also fail.

Replace with LazyScript::CreateRaw and move the custom initialization to

Depends on D66846

Cleanup up code in the Debugger and in PublicIterators that only used the
LazyScript for overload resolution. This changes are largely mechanical and
there is room to improve implementations in future

Depends on D66847

Remove miscelaneous uses of LazyScript type. Also move XDRScriptData from
LazyScript to BaseScript. Also remove JSFunction::lazyScript().

Depends on D66848

Move the methods to BaseScript and remove the LazyScript type entirely!

Depends on D66849

Patch stack removes the js::LazyScript type entirely. What remains is fixing up comments and filing follow-up bugs for optimizations and cleanups that are now possible.

Assignee: nobody → tcampbell
Pushed by
Cleanup LazyScript overflow checks r=mgaudet
Remove LazyScript::CreateForXDR r=mgaudet
Remove type-overloads using LazyScript r=mgaudet
Remove various uses of LazyScript r=mgaudet
Move LazyScript creation methods to BaseScript r=mgaudet
Fix up header include references to LazyScript r=mgaudet
Remove references to LazyScript in comments r=mgaudet
You need to log in before you can comment on or make changes to this bug.