Closed Bug 1626069 Opened 5 years ago Closed 5 years ago

Remove JSScript::Create wrapper

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: caroline, Assigned: caroline)

References

Details

Attachments

(3 files)

Since hideScriptFromDebugger flag was removed the JSScript::Create wrapper can be removed.

Depends on: 1625021
Summary: Remove JSScript::Create hideScriptFromDebugger wrapper → Remove JSScript::Create wrapper

We might as well go further here. Let's try to move JSScript::New to BaseScript and then have BaseScript::CreateRawLazy use the new BaseScript::New so we have a single source of allocation. The places that previously used JSScript::Create can use the BaseScript::New directly, and the places that make lazy scripts can continue using CreateLazy/CreateRawLazy for now.

PRobably will need to fix the argument ordering to be consistent everywhere too.

Flags: needinfo?(ccullen)

EDIT: Ignore this comment. I was looking at an old tree... Comment 2 stands.

Actually.. maybe we should leave JSScript::Create as a wrapper around BaseScript::New for now since it also has the immutableFlags argument.

Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/43d1a93d10cb Remove JSScript::Create wrapper. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/8de231e97e58 Move JSScript::New to BaseScript and remove the rest of JSScript::Create. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/46cab189d719 Reorder JSScript::Create parameters so they match other call orderings. r=tcampbell

Because JSScript::Create returns a JSScript we cannot call BaseScript::New directly, It is still necessary to keep JSScript::Create around to do a static cast of the BaseScript.

Flags: needinfo?(ccullen)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: