Move updating the bytecode offset into SaveSRIHash or a dedicated function.
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox126 | --- | fixed |
People
(Reporter: nbp, Assigned: nbp)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Currently the ScriptLoadRequest::mBytecodeOffset
is updated after saving the SRI hash in the mScriptBytecode
field.
However, the mBytecodeOffset
is here to encode the space taken by the SRI and the bytecode padding. We could move the resize of the buffer to a dedicated function, or into ScriptLoader::SaveSRIHash
to simplify reading the code and better understand the relationship between mBytecodeOffset
and SRI.
Assignee | ||
Comment 1•2 months ago
|
||
When saving the SRI Hash, we resize the btyecode buffer to the expected size of
the buffer. Previously, after saving the bytecode, the code surrounding
SaveSRIHash introduced the padding necessary for potentially saving bytecode
after.
This patch move the padding into SaveSRIHash, to reduce the overhead of
understanding why the btyecode buffer is being manipulated in what seems to be
out-of-context. Moving it into SaveSRIHash might seems strange but it closer to
other actions to the bytecode buffer which makes it less unexpected.
Updated•2 months ago
|
Comment 2•1 month ago
|
||
There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:nbp, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.
Assignee | ||
Updated•1 month ago
|
Updated•1 month ago
|
Pushed by smolnar@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/27aff6b9e920 Move padding of the bytecode vector into SaveSRIHash. r=arai https://hg.mozilla.org/mozilla-central/rev/615cec132182 1882789, 1882793: apply code formatting via Lando
Comment 4•1 month ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/27aff6b9e920
https://hg.mozilla.org/mozilla-central/rev/615cec132182
Description
•