mirror of
https://github.com/servo/servo.git
synced 2025-06-10 17:43:16 +00:00
Throw a TypeError when unwrapping a this object fails.
This commit is contained in:
parent
715ae6ab55
commit
be7ef50f27
1 changed files with 4 additions and 1 deletions
|
@ -2377,7 +2377,10 @@ class CGAbstractBindingMethod(CGAbstractExternMethod):
|
|||
CGAbstractExternMethod.__init__(self, descriptor, name, "JSBool", args)
|
||||
|
||||
if unwrapFailureCode is None:
|
||||
self.unwrapFailureCode = "return 0; //XXXjdm return Throw(cx, rv);"
|
||||
self.unwrapFailureCode = (
|
||||
'throw_type_error(cx, "\\"this\\" object does not '
|
||||
'implement interface %s.");\n'
|
||||
'return 0;' % descriptor.interface.identifier.name)
|
||||
else:
|
||||
self.unwrapFailureCode = unwrapFailureCode
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue