From c116e7b9116b3f1ff6821a92be1257465b40b057 Mon Sep 17 00:00:00 2001 From: Gregor Wagner Date: Thu, 14 Jun 2012 11:28:02 -0700 Subject: [PATCH] Bug 764928 - Support short in dictionaries. r=khuey --- js/xpconnect/src/dictionary_helper_gen.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/xpconnect/src/dictionary_helper_gen.py b/js/xpconnect/src/dictionary_helper_gen.py index 895658324d32..6cc820d03675 100644 --- a/js/xpconnect/src/dictionary_helper_gen.py +++ b/js/xpconnect/src/dictionary_helper_gen.py @@ -316,6 +316,10 @@ def write_getter(a, iface, fd): fd.write(" uint32_t u;\n") fd.write(" NS_ENSURE_STATE(JS_ValueToECMAUint32(aCx, v, &u));\n") fd.write(" aDict.%s = u;\n" % a.name) + elif realtype.count("PRInt16"): + fd.write(" int32_t i;\n") + fd.write(" NS_ENSURE_STATE(JS_ValueToECMAInt32(aCx, v, &i));\n") + fd.write(" aDict.%s = i;\n" % a.name) elif realtype.count("nsAString"): if a.nullable: fd.write(" xpc_qsDOMString d(aCx, v, &v, xpc_qsDOMString::eNull, xpc_qsDOMString::eNull);\n")