mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1457157 P0 Don't call DisconnectFromOwner() in DOMMozPromiseRequestHolder::Complete(). r=baku
This commit is contained in:
parent
4df707e69c
commit
d269a40f2e
@ -42,6 +42,16 @@ namespace dom {
|
||||
* global->EventTargetFor(TaskCategory::Other), __func__,
|
||||
* [holder, outer] (const Result& aResult) {
|
||||
* holder->Complete();
|
||||
*
|
||||
* // Note, you can access the holder's bound global in
|
||||
* // your reaction handler. Its mostly likely set if
|
||||
* // the handler fires, but you still must check for
|
||||
* // its existence since something could disconnect
|
||||
* // the global between when the MozPromise reaction
|
||||
* // runnable is queued and when it actually runs.
|
||||
* nsIGlobalObject* global = holder->GetParentObject();
|
||||
* NS_ENSURE_TRUE_VOID(global);
|
||||
*
|
||||
* outer->MaybeResolve(aResult);
|
||||
* }, [holder, outer] (nsresult aRv) {
|
||||
* holder->Complete();
|
||||
@ -101,7 +111,6 @@ public:
|
||||
Complete()
|
||||
{
|
||||
mHolder.Complete();
|
||||
DisconnectFromOwner();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user