--
---
You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-caja-dis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Michael, the problem with any such mechanism is how to avoid corrupted state. The only consistent states for the heap, considered without the stack, are between turns when the stack is empty.
To do the metering, we're planning to do a source-to-source rewrite inserting the equivalent of calls to your interceptor at least at function entries and loop body entries.
Crucially, if the interceptor decides against continuing the computation, it does not throw an exception, as that would leave corrupted state. Instead it aborts the transaction, rolling back all effects that had happened so far during that turn.
Unfortunately, until both of those bits of engineering are done --- the source-to-source rewrite and the abortable turn bookkeeping --- I can't offer any practical advice.
--
---
You received this message because you are subscribed to a topic in the Google Groups "Google Caja Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-caja-discuss/swKiyyJ8hRw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-caja-dis...@googlegroups.com.
Michael.
I think I will also call the interceptor at the top of every catch block, to allow it to keep throwing all the way up the stack.
Michael.
--
---
You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-caja-dis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.