Use BaseScript in DebuggerScriptReferent
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: tcampbell, Assigned: tcampbell)
References
Details
Attachments
(10 files)
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
Now that we are able to root js::BaseScript pointers directly it should be possible to cleanup the DebuggerScriptReferent and remove separate code paths used for LazyScripts. It should be possible to achieve this even before the LazyScript/JSScript instances are combined.
Assignee | ||
Comment 1•5 years ago
|
||
In Bug 1512509 we simplified BaseScript::sourceObject() to never use
cross-compartment edges. As a result we can simplify the debugger access of
sourceObject within this patch.
Assignee | ||
Comment 2•5 years ago
|
||
- Simplify js::CheckDebugeeThing
- Simplify DelazifyScript
- Inline js::EnsureFunctionHasScript into callers and avoid using
JSFunction::nonLazyScript() method.
Depends on D64119
Assignee | ||
Comment 3•5 years ago
|
||
Replace the uses of ScriptVector and LazyScriptVector.
Depends on D64120
Assignee | ||
Comment 4•5 years ago
|
||
This lets us eventually combine the lazy and non-lazy lists. To make this
work, we need to explicitly pass the expected type of variant element instead
of deducing it from the map.
Depends on D64121
Assignee | ||
Comment 5•5 years ago
|
||
Replace with calls to wrapScript instead. Within wrapScript we now check if
script is lazy or not. This paves way to removing LazyScript* from the
DebuggerReferentVariant.
Depends on D64122
Assignee | ||
Comment 6•5 years ago
|
||
This can be combined with the Debugger::scripts map since keys will not
conflict. This is now all possible since we use js::BaseScript as the root
type.
Depends on D64123
Assignee | ||
Comment 7•5 years ago
|
||
Once we use BaseScript as the root type, we can combine the ScriptQuery
result vectors which will be concatenated anyways.
Depends on D64124
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
Eliminate the templates and use BaseScript type instead to simplify.
Assignee | ||
Comment 10•5 years ago
|
||
Add a BaseScript case to variant matcher classes in the debugger and forward
the JSScript and LazyScript cases to it. This will call DelazifyScript for
all cases, so fix a small issue where this failed on non-function scripts.
Subsequent patches will remove the JSScript/LazyScript cases once the variant
type is updated.
Depends on D64365
Assignee | ||
Comment 11•5 years ago
|
||
Fold the JSScript* and LazyScript* variant arms into a single case. The
debugger now either uses BaseScript accessors directly, or uses
DelazifyScript to ensure bytecode exists if needed.
Note that there are still seperate instances for LazyScript and JSScript so
Debugger::wrapVariantReferent continues to be careful about normalizing
references.
Comment 13•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a0f9c5c63d4f
https://hg.mozilla.org/mozilla-central/rev/07d450df0aab
https://hg.mozilla.org/mozilla-central/rev/3ef1e468e53a
https://hg.mozilla.org/mozilla-central/rev/388b7ae2e7f6
https://hg.mozilla.org/mozilla-central/rev/2c5176ed5752
https://hg.mozilla.org/mozilla-central/rev/30b40b53ff10
https://hg.mozilla.org/mozilla-central/rev/d36d060cd6a5
Comment 14•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 15•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d5935fae1300
https://hg.mozilla.org/mozilla-central/rev/2d06ad181243
https://hg.mozilla.org/mozilla-central/rev/7d3e520aa79a
Description
•