зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1099278 - Update nsGlobalWindow's StoreInSlot users to use a better error contract; r=bz
--HG-- extra : rebase_source : 7dd2ec19526925edfee8d819d99b7f892a0adbbb
This commit is contained in:
Родитель
df4c5ce286
Коммит
e22128b208
|
@ -14094,8 +14094,12 @@ void
|
||||||
nsGlobalWindow::ClearDocumentDependentSlots(JSContext* aCx)
|
nsGlobalWindow::ClearDocumentDependentSlots(JSContext* aCx)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(IsInnerWindow());
|
MOZ_ASSERT(IsInnerWindow());
|
||||||
WindowBinding::ClearCachedDocumentValue(aCx, this);
|
|
||||||
WindowBinding::ClearCachedPerformanceValue(aCx, this);
|
// If JSAPI OOMs here, there is basically nothing we can do to recover safely.
|
||||||
|
if (!WindowBinding::ClearCachedDocumentValue(aCx, this) ||
|
||||||
|
!WindowBinding::ClearCachedPerformanceValue(aCx, this)) {
|
||||||
|
MOZ_CRASH("Unhandlable OOM while clearing document dependent slots.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
|
|
|
@ -3474,7 +3474,6 @@ class CGClearCachedValueMethod(CGAbstractMethod):
|
||||||
JSAutoCompartment ac(aCx, obj);
|
JSAutoCompartment ac(aCx, obj);
|
||||||
if (!get_${name}(aCx, obj, aObject, args)) {
|
if (!get_${name}(aCx, obj, aObject, args)) {
|
||||||
js::SetReservedSlot(obj, ${slotIndex}, oldValue);
|
js::SetReservedSlot(obj, ${slotIndex}, oldValue);
|
||||||
nsJSUtils::ReportPendingException(aCx);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче