On 7/18/13 9:27 PM, Benjamin Smedberg wrote:
My opinion is still that we should rip out most or
all of this mechanism, and replace it with an opt-in mechanism for
methods that actually do exception passthrough.

For what it's worth, that's how the mechanism for calling JS from C++ via WebIDL bindings works: Exceptions in JS are reported unless the C++ caller explicitly opts in to rethrowing them. And in that case we assert if it doesn't check whether it needs to rethrow, even if there is no exception thrown, so the exceptions won't disappear due to inattentiveness.

The xpidl story is a bit more complicated because it tries to make it transparent whether you're calling C++ or JS, so you can't just put the opt-in in the function signature like we do for WebIDL. But maybe we could just set up a simple RAII class for doing such opt-in...

-Boris

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to