mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +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;
|
||||
|
||||
if (!mKeepingAliveTypes.mAtoms.IsEmpty()) {
|
||||
for (uint32_t i = 0; i < mKeepingAliveTypes.mAtoms.Length(); ++i) {
|
||||
if (HasListenersFor(mKeepingAliveTypes.mAtoms[i])) {
|
||||
shouldBeKeptAlive = true;
|
||||
break;
|
||||
if (NS_SUCCEEDED(CheckInnerWindowCorrectness())) {
|
||||
if (!mKeepingAliveTypes.mAtoms.IsEmpty()) {
|
||||
for (uint32_t i = 0; i < mKeepingAliveTypes.mAtoms.Length(); ++i) {
|
||||
if (HasListenersFor(mKeepingAliveTypes.mAtoms[i])) {
|
||||
shouldBeKeptAlive = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!shouldBeKeptAlive && !mKeepingAliveTypes.mStrings.IsEmpty()) {
|
||||
for (uint32_t i = 0; i < mKeepingAliveTypes.mStrings.Length(); ++i) {
|
||||
if (HasListenersFor(mKeepingAliveTypes.mStrings[i])) {
|
||||
shouldBeKeptAlive = true;
|
||||
break;
|
||||
if (!shouldBeKeptAlive && !mKeepingAliveTypes.mStrings.IsEmpty()) {
|
||||
for (uint32_t i = 0; i < mKeepingAliveTypes.mStrings.Length(); ++i) {
|
||||
if (HasListenersFor(mKeepingAliveTypes.mStrings[i])) {
|
||||
shouldBeKeptAlive = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user