Closed Bug 1728954 Opened 3 years ago Closed 3 years ago

Simplify BaseScript::functionOrGlobal_ field

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

after bug 1662152, ScriptSourceObject is always canonical, and it means the ScriptSourceObject and BaseScript can always be in same realm.

and in that case global script can use sourceObject_->realm() instead of holding the global object in BaseScript::functionOrGlobal_ field

Changing severity to S4.

Severity: -- → S4
Priority: -- → P3

BaseScript::functionOrGlobal_ is renamed to BaseScript::function_ and holds
JSFunction only when the script is function.

BaseScript ctor is moved to JSScript.cpp because GCPtr<JSFunction*> ctor
requires JSFunction definition.

Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/057e1437a1f7
Use ScriptSourceObject as a source of realm/compartment in BaseScript. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: