mirror of
https://github.com/servo/servo.git
synced 2025-06-12 18:34:39 +00:00
Throw a TypeError when a non-object is passed where one is expected.
This commit is contained in:
parent
ea621676f2
commit
83cc23089a
7 changed files with 83 additions and 18 deletions
|
@ -497,7 +497,7 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
|
|||
return CGWrapper(
|
||||
CGGeneric(
|
||||
failureCode or
|
||||
('//XXXjdm ThrowErrorMessage(cx, MSG_NOT_OBJECT, "%s");\n'
|
||||
('throw_type_error(cx, "%s is not an object.");\n'
|
||||
'%s' % (firstCap(sourceDescription), exceptionCode))),
|
||||
post="\n")
|
||||
def onFailureBadType(failureCode, typeName):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue