зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 9205d38f866c (bug 1491313) for causing crashtests to fail. CLOSED TREE
This commit is contained in:
Родитель
f84345b543
Коммит
0939a6b3fa
|
@ -1084,7 +1084,6 @@ DoGetOrCreateDOMReflector(JSContext* cx, T* value,
|
|||
// At this point, obj is null, so just return false.
|
||||
// Callers seem to be testing JS_IsExceptionPending(cx) to
|
||||
// figure out whether WrapObject() threw.
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with WrapObject() on the C++ object throwing");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1114,37 +1113,19 @@ DoGetOrCreateDOMReflector(JSContext* cx, T* value,
|
|||
rval.set(JS::ObjectValue(*obj));
|
||||
|
||||
if (js::GetObjectCompartment(obj) == js::GetContextCompartment(cx)) {
|
||||
if (!TypeNeedsOuterization<T>::value) {
|
||||
return true;
|
||||
}
|
||||
if (TryToOuterize(rval)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with TryToOuterize failing");
|
||||
return false;
|
||||
return TypeNeedsOuterization<T>::value ? TryToOuterize(rval) : true;
|
||||
}
|
||||
|
||||
if (wrapBehavior == eDontWrapIntoContextCompartment) {
|
||||
if (TypeNeedsOuterization<T>::value) {
|
||||
JSAutoRealm ar(cx, obj);
|
||||
if (TryToOuterize(rval)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with TryToOuterize failing");
|
||||
return false;
|
||||
return TryToOuterize(rval);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (JS_WrapValue(cx, rval)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with JS_WrapValue failing");
|
||||
return false;
|
||||
return JS_WrapValue(cx, rval);
|
||||
}
|
||||
|
||||
} // namespace binding_detail
|
||||
|
|
|
@ -4022,7 +4022,6 @@ class CGClearCachedValueMethod(CGAbstractMethod):
|
|||
JSAutoRealm ar(aCx, obj);
|
||||
if (!get_${name}(aCx, obj, aObject, args)) {
|
||||
js::SetReservedSlot(obj, ${slotIndex}, oldValue);
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with the getter failing");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -6680,8 +6679,7 @@ def getWrapTemplateForType(type, descriptorProvider, result, successCode,
|
|||
wrap = "%s(%s)" % (wrapMethod, wrapArgs)
|
||||
# Can only fail to wrap as a new-binding object if they already
|
||||
# threw an exception.
|
||||
failed = ('MOZ_CRASH("Looks like bug 1488480/1405521, with getting the reflector failing");\n' +
|
||||
"MOZ_ASSERT(JS_IsExceptionPending(cx));\n" +
|
||||
failed = ("MOZ_ASSERT(JS_IsExceptionPending(cx));\n" +
|
||||
exceptionCode)
|
||||
else:
|
||||
if descriptor.notflattened:
|
||||
|
@ -7845,7 +7843,6 @@ class CGPerSignatureCall(CGThing):
|
|||
// Make a copy so that we don't do unnecessary wrapping on args.rval().
|
||||
JS::Rooted<JS::Value> storedVal(cx, args.rval());
|
||||
if (!${maybeWrap}(cx, &storedVal)) {
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with the other MaybeWrap failing");
|
||||
return false;
|
||||
}
|
||||
js::SetReservedSlot(slotStorage, slotIndex, storedVal);
|
||||
|
@ -7903,11 +7900,7 @@ class CGPerSignatureCall(CGThing):
|
|||
$*{slotStorageSteps}
|
||||
}
|
||||
// And now make sure args.rval() is in the caller realm.
|
||||
if (${maybeWrap}(cx, args.rval())) {
|
||||
return true;
|
||||
}
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with the third MaybeWrap failing");
|
||||
return false;
|
||||
return ${maybeWrap}(cx, args.rval());
|
||||
""",
|
||||
conversionScope=conversionScope,
|
||||
wrapCode=wrapCode,
|
||||
|
@ -8955,11 +8948,7 @@ class CGSpecializedGetter(CGAbstractStaticMethod):
|
|||
args.rval().set(cachedVal);
|
||||
// The cached value is in the compartment of slotStorage,
|
||||
// so wrap into the caller compartment as needed.
|
||||
if (${maybeWrap}(cx, args.rval())) {
|
||||
return true;
|
||||
}
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with cached value wrapping failing");
|
||||
return false;
|
||||
return ${maybeWrap}(cx, args.rval());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -92,9 +92,6 @@ JS::Compartment::wrap(JSContext* cx, JS::MutableHandleValue vp)
|
|||
|
||||
JS::RootedObject obj(cx, &vp.toObject());
|
||||
if (!wrap(cx, &obj)) {
|
||||
if (js::UncheckedUnwrap(&vp.toObject())->getClass()->isDOMClass()) {
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with the object version of Compartment::wrap failing");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
vp.setObject(*obj);
|
||||
|
|
|
@ -237,17 +237,11 @@ Compartment::getNonWrapperObjectForCurrentCompartment(JSContext* cx, MutableHand
|
|||
// see bug 809295.
|
||||
auto preWrap = cx->runtime()->wrapObjectCallbacks->preWrap;
|
||||
if (!CheckSystemRecursionLimit(cx)) {
|
||||
if (obj->getClass()->isDOMClass()) {
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with system recursion limit failing in getNonWrapperObjectForCurrentCompartment");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (preWrap) {
|
||||
preWrap(cx, cx->global(), obj, objectPassedToWrap, obj);
|
||||
if (!obj) {
|
||||
if (UncheckedUnwrap(objectPassedToWrap)->getClass()->isDOMClass()) {
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with preWrap failing in getNonWrapperObjectForCurrentCompartment");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -275,9 +269,6 @@ Compartment::getOrCreateWrapper(JSContext* cx, HandleObject existing, MutableHan
|
|||
auto wrap = cx->runtime()->wrapObjectCallbacks->wrap;
|
||||
RootedObject wrapper(cx, wrap(cx, existing, obj));
|
||||
if (!wrapper) {
|
||||
if (key.toObject().getClass()->isDOMClass()) {
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with wrap() call failing in Compartment::getOrCreateWrapper");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -294,9 +285,6 @@ Compartment::getOrCreateWrapper(JSContext* cx, HandleObject existing, MutableHan
|
|||
if (wrapper->is<CrossCompartmentWrapperObject>()) {
|
||||
NukeCrossCompartmentWrapper(cx, wrapper);
|
||||
}
|
||||
if (obj->getClass()->isDOMClass()) {
|
||||
MOZ_CRASH("Looks like bug 1488480/1405521, with hashtable ops failing in Compartment::getOrCreateWrapper");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче