зеркало из 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)
|
||||
{
|
||||
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 */
|
||||
|
|
|
@ -3474,7 +3474,6 @@ class CGClearCachedValueMethod(CGAbstractMethod):
|
|||
JSAutoCompartment ac(aCx, obj);
|
||||
if (!get_${name}(aCx, obj, aObject, args)) {
|
||||
js::SetReservedSlot(obj, ${slotIndex}, oldValue);
|
||||
nsJSUtils::ReportPendingException(aCx);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче