Skip to content

Commit 0176a5b

Browse files
jmb202tlsa
authored andcommitted
parse/language: ensure parse stack is unwound
handleEndBlockContent invokes handleBlockContent to flush through any pending tokens before unwinding the parse stack. The flush may fail, but the stack unwinding wants to happen anyway, so ensure that it does before returning the original result.
1 parent 03fbf19 commit 0176a5b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/parse/language.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -762,9 +762,6 @@ css_error handleEndBlockContent(css_language *c, const parserutils_vector *vecto
762762
* tokens we have left
763763
*/
764764
ret = handleBlockContent(c, vector);
765-
if (ret != CSS_OK) {
766-
return ret;
767-
}
768765

769766
/* Our goal here is to ensure that the language parse stack is in the
770767
* right state. We've encountered the end of a BlockContent such as
@@ -783,7 +780,7 @@ css_error handleEndBlockContent(css_language *c, const parserutils_vector *vecto
783780
entry = parserutils_stack_get_current(c->context);
784781
}
785782

786-
return CSS_OK;
783+
return ret;
787784
}
788785

789786
css_error handleDeclaration(css_language *c, const parserutils_vector *vector)

0 commit comments

Comments
 (0)