bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.
The initial work done in bug 1186530 includes a WeakPtr ownership model, where the Java object owns a WeakPtr to the actual C++ object. This bug will add a support for a direct ownership model where the Java object owns the C++ object itself.
Created attachment 8641728 [details] [diff] [review] Support direct ownership of C++ objects by Java objects (v1) Add a direct ownership model where the Java object owns the corresponding C++ object directly, in addition to the WeakPtr model where the Java object owns a WeakPtr to the C++ object. The WeakPtr model is chosen when the implementing C++ class inherits from SupportsWeakPtr. Otherwise, the direct ownership model is chosen. Under the direct ownership model, a UniquePtr object must be used to attach the containing C++ object to a Java object, to ensure ownership is passed on to the Java object.
Attachment #8641728 - Flags: review?(snorp)
Created attachment 8641729 [details] [diff] [review] Make NativeJSContainer use direct ownership model (v1) Make NativeJSContainer/NativeJSObject Java objects own their corresponding C++ objects directly, to reduce an extra allocation/deallocation for each object and to simplify code.
Attachment #8641729 - Flags: review?(snorp)
Attachment #8641728 - Flags: review?(snorp) → review+
Attachment #8641729 - Flags: review?(snorp) → review+
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox42: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
You need to log in before you can comment on or make changes to this bug.