/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
if (!skipNukeCrossCompartment) { // The compartment nuking phase might be too expensive, so do that // part off of idle dispatch.
// For the compartment nuking phase, we dispatch either an // inner-window-nuked or an outer-window-nuked notification. // This will allow tests to wait for compartment nuking to happen. if (mTopic.EqualsLiteral("inner-window-destroyed")) {
mTopic.AssignLiteral("inner-window-nuked");
} elseif (mTopic.EqualsLiteral("outer-window-destroyed")) {
mTopic.AssignLiteral("outer-window-nuked");
}
mPhase = Phase::Nuking;
nsCOMPtr<nsIPrincipal> pc =
nsJSPrincipals::get(JS::GetRealmPrincipals(realm));
if (BasePrincipal::Cast(pc)->AddonPolicy()) { // We want to nuke all references to the add-on realm.
xpc::NukeAllWrappersForRealm(cx, realm,
mIsInnerWindow
? js::DontNukeWindowReferences
: js::NukeWindowReferences);
} else { // We only want to nuke wrappers for the chrome->content case
js::NukeCrossCompartmentWrappers(
cx, BrowserCompartmentMatcher(), realm,
mIsInnerWindow ? js::DontNukeWindowReferences
: js::NukeWindowReferences,
js::NukeIncomingReferences);
}
}
}
} break;
}
if (nukedOuter) {
nsFocusManager* fm = nsFocusManager::GetFocusManager(); if (fm) {
fm->WasNuked(nukedOuter);
}
}
return NS_OK;
}
} // namespace mozilla
¤ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.