Closed Bug 592150 Opened 14 years ago Closed 7 years ago

jsval in params unnecessarily allocate jsval on the heap, some times.

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED INACTIVE

People

(Reporter: jst, Unassigned)

Details

Attachments

(1 file)

Attached patch Fix.Splinter Review
After bug 578547 (and related bugs) landed we now allocate a jsval on the heap for each jsval in arguments when calling from JS into C++. This allocation happens in XPCConvert::JSData2Native() in the T_JSVAL case, if useAllocator is set. We can, however, avoid this allocation in the case where we simply have the jsval argument passed into XPConnect, but due to the XPCConvert API we can't call into it in those cases. Patch attached showing how this can be done. This is however not a common path in our code, so there's no real urgency to make this change...
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: