mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Allow for nested filtering expressions in flag-setting and restoring (352605, r=jwalden).
This commit is contained in:
parent
5f0d68e853
commit
b7df3a74ce
@ -7962,9 +7962,9 @@ js_FilterXMLList(JSContext *cx, JSObject *obj, jsbytecode *pc, jsval *vp)
|
||||
{
|
||||
JSBool ok, match;
|
||||
JSStackFrame *fp;
|
||||
uint32 flags, i, n;
|
||||
JSObject *scobj, *listobj, *resobj, *withobj, *kidobj;
|
||||
JSXML *xml, *list, *result, *kid;
|
||||
uint32 i, n;
|
||||
|
||||
ok = js_EnterLocalRootScope(cx);
|
||||
if (!ok)
|
||||
@ -7973,7 +7973,8 @@ js_FilterXMLList(JSContext *cx, JSObject *obj, jsbytecode *pc, jsval *vp)
|
||||
/* All control flow after this point must exit via label out or bad. */
|
||||
*vp = JSVAL_NULL;
|
||||
fp = cx->fp;
|
||||
fp->flags |= JSFRAME_FILTERING;
|
||||
flags = fp->flags;
|
||||
fp->flags = flags | JSFRAME_FILTERING;
|
||||
scobj = js_GetScopeChain(cx, fp);
|
||||
withobj = NULL;
|
||||
if (!scobj)
|
||||
@ -8024,7 +8025,7 @@ js_FilterXMLList(JSContext *cx, JSObject *obj, jsbytecode *pc, jsval *vp)
|
||||
*vp = OBJECT_TO_JSVAL(resobj);
|
||||
|
||||
out:
|
||||
fp->flags &= ~JSFRAME_FILTERING;
|
||||
fp->flags = flags;
|
||||
if (withobj) {
|
||||
fp->scopeChain = scobj;
|
||||
JS_SetPrivate(cx, withobj, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user