mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Make check for valid resumption value a bit more legible.
This commit is contained in:
parent
fd054f5c39
commit
041108b07b
@ -392,13 +392,19 @@ Debug::parseResumptionValue(AutoCompartment &ac, bool ok, const Value &rv, Value
|
|||||||
const Shape *shape;
|
const Shape *shape;
|
||||||
jsid returnId = ATOM_TO_JSID(cx->runtime->atomState.returnAtom);
|
jsid returnId = ATOM_TO_JSID(cx->runtime->atomState.returnAtom);
|
||||||
jsid throwId = ATOM_TO_JSID(cx->runtime->atomState.throwAtom);
|
jsid throwId = ATOM_TO_JSID(cx->runtime->atomState.throwAtom);
|
||||||
if (!rv.isObject() ||
|
bool okResumption = rv.isObject();
|
||||||
!(obj = &rv.toObject())->isObject() ||
|
if (okResumption) {
|
||||||
!(shape = obj->lastProperty())->previous() ||
|
obj = &rv.toObject();
|
||||||
shape->previous()->previous() ||
|
okResumption = obj->isObject();
|
||||||
(shape->propid != returnId && shape->propid != throwId) ||
|
}
|
||||||
!shape->isDataDescriptor())
|
if (okResumption) {
|
||||||
{
|
shape = obj->lastProperty();
|
||||||
|
okResumption = shape->previous() &&
|
||||||
|
!shape->previous()->previous() &&
|
||||||
|
(shape->propid == returnId || shape->propid == throwId) &&
|
||||||
|
shape->isDataDescriptor();
|
||||||
|
}
|
||||||
|
if (!okResumption) {
|
||||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_DEBUG_BAD_RESUMPTION);
|
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_DEBUG_BAD_RESUMPTION);
|
||||||
return handleUncaughtException(ac, vp, callHook);
|
return handleUncaughtException(ac, vp, callHook);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user