bem-archive / bem-bl-xjst

XJST Compiler for bem-bl. DEPRECATED. USE https://github.com/bem/bem-xjst
1 stars 0 forks source link

i-bem: re-entrant BEMContext #8

Closed indutny closed 9 years ago

indutny commented 9 years ago

Fall back to slower version of .apply() if exception was thrown or the BEMHTML.apply() was re-entered.

indutny commented 9 years ago

Please do not land it yet, investigating problems.

indutny commented 9 years ago

Ok, should be ready to go now :)

indutny commented 9 years ago

Note that it should be backported to bem-bl too.

indutny commented 9 years ago

The reason of the issue:

BEMContext instance is reused now, but when exception happens - it could end up in a mixed state (i.e. with not reverted local changes). Previously, BEMContext was created on each apply() call which had cleared the changes.