Bug 883287 - Add null checks to Prompt.jsm constructor. r=wesj

This commit is contained in:
Margaret Leibovic 2013-06-17 13:06:56 -04:00
parent 8ea9775a05
commit e1f8a8c273

View File

@ -18,13 +18,13 @@ function Prompt(aOptions) {
this.window = "window" in aOptions ? aOptions.window : null;
this.msg = { type: "Prompt:Show", async: true };
if ("title" in aOptions)
if ("title" in aOptions && aOptions.title != null)
this.msg.title = aOptions.title;
if ("message" in aOptions)
if ("message" in aOptions && aOptions.message != null)
this.msg.text = aOptions.message;
if ("buttons" in aOptions)
if ("buttons" in aOptions && aOptions.buttons != null)
this.msg.buttons = aOptions.buttons;
let idService = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator);