mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 905392 - Need way to throw web-console-visible exception-message from JS-implemented webidl object - bustage fix on a CLOSED TREE.
This commit is contained in:
parent
80dd167737
commit
19de89f34e
@ -85,11 +85,12 @@ Throw(JSContext* cx, nsresult rv)
|
||||
return false;
|
||||
}
|
||||
|
||||
template<bool mainThread, bool reportJSContentExceptions = false>
|
||||
template<bool mainThread>
|
||||
inline bool
|
||||
ThrowMethodFailedWithDetails(JSContext* cx, ErrorResult& rv,
|
||||
const char* ifaceName,
|
||||
const char* memberName)
|
||||
const char* memberName,
|
||||
bool reportJSContentExceptions = false)
|
||||
{
|
||||
if (rv.IsTypeError()) {
|
||||
rv.ReportTypeError(cx);
|
||||
|
@ -4929,11 +4929,11 @@ if (!${obj}) {
|
||||
jsImplemented = ""
|
||||
if self.descriptor.interface.isJSImplemented():
|
||||
jsImplemented = ", true"
|
||||
return CGGeneric('return ThrowMethodFailedWithDetails<%s%s>(cx, rv, "%s", "%s");'
|
||||
return CGGeneric('return ThrowMethodFailedWithDetails<%s>(cx, rv, "%s", "%s"%s);'
|
||||
% (toStringBool(not self.descriptor.workers),
|
||||
jsImplemented,
|
||||
self.descriptor.interface.identifier.name,
|
||||
self.idlNode.identifier.name))
|
||||
self.idlNode.identifier.name,
|
||||
jsImplemented))
|
||||
|
||||
def define(self):
|
||||
return (self.cgRoot.define() + "\n" + self.wrap_return_value())
|
||||
|
Loading…
Reference in New Issue
Block a user