Closed Bug 1135827 Opened 9 years ago Closed 9 years ago

js::SavedStacks::insertFrames roots more than necessary

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: jimb, Assigned: fitzgen)

Details

Attachments

(1 file)

The use of AutoLookupRooter here seems to be unnecessary:

https://hg.mozilla.org/mozilla-central/file/360b5f211180/js/src/vm/SavedStacks.cpp#l629

The AutoLookupRooter ensures that its referent's 'trace' method is called when needed. However, the AutoLookupRooter's referent is always an element of stackChain; since that's an AutoLookupVector, it's already rooting its elements.

Nothing bad should come from calling a 'trace' method twice, so this is more a "bit of disorder" than a "bug". I just wanted to call it out.
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Comment on attachment 8568658 [details] [diff] [review]
Don't root more times than necessary in js::SavedStacks::insertFrames

Review of attachment 8568658 [details] [diff] [review]:
-----------------------------------------------------------------

Yay.
Attachment #8568658 - Flags: review?(jimb) → review+
https://hg.mozilla.org/mozilla-central/rev/5ad6b7250af0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: