Closed Bug 1780871 Opened 2 years ago Closed 2 years ago

Add more comments to NativeObject::growElements()

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: tjc, Assigned: tjc)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Safari/537.36

Steps to reproduce:

I was trying to figure out whether a NativeObject that's allocated with fixed elements can ever transition to having dynamic elements. The answer is yes, as evinced by https://searchfox.org/mozilla-central/source/js/src/vm/NativeObject.cpp#866 ; however, it took me an inordinate amount of time to figure this out.

The method that's responsible for this is NativeObject::growElements(), and it would be useful if it had more comments. I'll submit a patch that adds some comments.

Comments only, no code changes.

Assignee: nobody → tjc
Status: NEW → ASSIGNED
Severity: -- → N/A
Priority: -- → P1
Attachment #9286725 - Attachment description: Bug 1780871 - Add explanatory comments to NativeObject::growElements() r?jonco → Bug 1780871 - Add explanatory comments to NativeObject::growElements() r=jonco,jandem
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/d3ea3c0d2ee2 Add explanatory comments to NativeObject::growElements() r=jandem
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: