mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1019964 - CallWatcherActor no longer holds strong references in FunctionCallActor. r=vp
This commit is contained in:
parent
3b73ddebbe
commit
be7f7beda6
@ -73,15 +73,27 @@ let FunctionCallActor = protocol.ActorClass({
|
||||
protocol.Actor.prototype.initialize.call(this, conn);
|
||||
|
||||
this.details = {
|
||||
window: window,
|
||||
caller: caller,
|
||||
type: type,
|
||||
name: name,
|
||||
stack: stack,
|
||||
args: args,
|
||||
result: result
|
||||
};
|
||||
|
||||
// Store a weak reference to all objects so we don't
|
||||
// prevent natural GC.
|
||||
let weakRefs = {
|
||||
window: Cu.getWeakReference(window),
|
||||
caller: Cu.getWeakReference(caller),
|
||||
result: Cu.getWeakReference(result),
|
||||
args: Cu.getWeakReference(args)
|
||||
};
|
||||
|
||||
Object.defineProperties(this.details, {
|
||||
window: { get: () => weakRefs.window.get() },
|
||||
caller: { get: () => weakRefs.caller.get() },
|
||||
result: { get: () => weakRefs.result.get() },
|
||||
args: { get: () => weakRefs.args.get() }
|
||||
});
|
||||
|
||||
this.meta = {
|
||||
global: -1,
|
||||
previews: { caller: "", args: "" }
|
||||
|
Loading…
Reference in New Issue
Block a user