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

RESOLVED INACTIVE

Status

()

RESOLVED INACTIVE
8 years ago
7 months ago

People

(Reporter: jst, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
Created attachment 470651 [details] [diff] [review]
Fix.

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...

Comment 1

7 months ago
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
Last Resolved: 7 months ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.