Bug 895495 followup. Pass the needed second string to the exception message if the first argument of _create is not a Window. r=ms2ger
authorBoris Zbarsky <bzbarsky@mit.edu>
Sun, 28 Jul 2013 10:50:35 -0700
changeset 140277 980551965c2a463ad8760dcc00786979e91b3d5e
parent 140276 6ba07a3e0c80091257e86686b744d52a17a77efc
child 140278 12eedfb87ed6213320c33374bf32c68ab78a42a3
push id25023
push useremorley@mozilla.com
push dateMon, 29 Jul 2013 14:13:44 +0000
treeherdermozilla-central@8c89fe2a5c92 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersms2ger
bugs895495
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 895495 followup. Pass the needed second string to the exception message if the first argument of _create is not a Window. r=ms2ger
dom/bindings/Codegen.py
--- a/dom/bindings/Codegen.py
+++ b/dom/bindings/Codegen.py
@@ -9627,17 +9627,17 @@ class CGJSImplClass(CGBindingImplClass):
             "// GlobalObject will go through wrappers as needed for us, and\n"
             "// is simpler than the right UnwrapArg incantation.\n"
             "GlobalObject global(cx, &args[0].toObject());\n"
             "if (global.Failed()) {\n"
             "  return false;\n"
             "}\n"
             "nsCOMPtr<nsPIDOMWindow> window = do_QueryInterface(global.Get());\n"
             "if (!window) {\n"
-            '  return ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 1 of ${ifaceName}._create");\n'
+            '  return ThrowErrorMessage(cx, MSG_DOES_NOT_IMPLEMENT_INTERFACE, "Argument 1 of ${ifaceName}._create", "Window");\n'
             "}\n"
             "JS::Rooted<JSObject*> arg(cx, &args[1].toObject());\n"
             "nsRefPtr<${implName}> impl = new ${implName}(arg, window);\n"
             "return WrapNewBindingObject(cx, arg, impl, args.rval());").substitute({
                 "ifaceName": self.descriptor.interface.identifier.name,
                 "implName": self.descriptor.name
                 })