mozilla/jschannel — pull request #22 by Tug (2013-10-23 15:17:34+00:00)
Title: Allow `Error` instances to be thrown in remote methods

If a remote method throws an `Error` instance, this is what we receive in the error callback :
first argument: "runtime_error"
second argument: "{}"

With this fix, this is what we get if, for instance, a ReferenceError is thrown:
first argument: "ReferenceError"
second argument: "x is not defined"