mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1278831 - DOMEventTargetHelper must release itself when disconnected from the owner and when kept alive by some event listener, r=smaug
This commit is contained in:
parent
49cbe794ae
commit
059ca97fce
@ -295,20 +295,22 @@ DOMEventTargetHelper::MaybeUpdateKeepAlive()
|
|||||||
{
|
{
|
||||||
bool shouldBeKeptAlive = false;
|
bool shouldBeKeptAlive = false;
|
||||||
|
|
||||||
if (!mKeepingAliveTypes.mAtoms.IsEmpty()) {
|
if (NS_SUCCEEDED(CheckInnerWindowCorrectness())) {
|
||||||
for (uint32_t i = 0; i < mKeepingAliveTypes.mAtoms.Length(); ++i) {
|
if (!mKeepingAliveTypes.mAtoms.IsEmpty()) {
|
||||||
if (HasListenersFor(mKeepingAliveTypes.mAtoms[i])) {
|
for (uint32_t i = 0; i < mKeepingAliveTypes.mAtoms.Length(); ++i) {
|
||||||
shouldBeKeptAlive = true;
|
if (HasListenersFor(mKeepingAliveTypes.mAtoms[i])) {
|
||||||
break;
|
shouldBeKeptAlive = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!shouldBeKeptAlive && !mKeepingAliveTypes.mStrings.IsEmpty()) {
|
if (!shouldBeKeptAlive && !mKeepingAliveTypes.mStrings.IsEmpty()) {
|
||||||
for (uint32_t i = 0; i < mKeepingAliveTypes.mStrings.Length(); ++i) {
|
for (uint32_t i = 0; i < mKeepingAliveTypes.mStrings.Length(); ++i) {
|
||||||
if (HasListenersFor(mKeepingAliveTypes.mStrings[i])) {
|
if (HasListenersFor(mKeepingAliveTypes.mStrings[i])) {
|
||||||
shouldBeKeptAlive = true;
|
shouldBeKeptAlive = true;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user