Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Leak in CompartmentPrivate::RegisterDOMExpandoObject

RESOLVED FIXED in mozilla10

Status

()

Core
XPConnect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Ms2ger, Assigned: peterv)

Tracking

Trunk
mozilla10
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
http://mxr.mozilla.org/mozilla-central/source/js/src/xpconnect/src/xpcprivate.h?mark=4511-4516#4509

If Init fails, domExpandoMap is leaked.
(Assignee)

Comment 1

6 years ago
Created attachment 566534 [details] [diff] [review]
v1
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Attachment #566534 - Flags: review?(Ms2ger)
(Reporter)

Comment 2

6 years ago
Comment on attachment 566534 [details] [diff] [review]
v1

>--- a/js/src/xpconnect/src/xpcprivate.h
>+++ b/js/src/xpconnect/src/xpcprivate.h
>     bool RegisterExpandoObject(XPCWrappedNative *wn, JSObject *expando) {
>         if (!expandoMap) {
>             expandoMap = new nsDataHashtable<nsPtrHashKey<XPCWrappedNative>, JSObject *>();
>             if (!expandoMap->Init(8))
>+            {

{ on the same line, as above, please.

r=me, for what that's worth.
Attachment #566534 - Flags: review?(Ms2ger) → review+
(Assignee)

Comment 3

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/fd296c912d24
Target Milestone: --- → mozilla10

Comment 4

6 years ago
https://hg.mozilla.org/mozilla-central/rev/fd296c912d24
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.