Bug 1263158 - Check if key is present in manifest object before using it. r=fabrice
authorMarco Castelluccio <mcastelluccio@mozilla.com>
Wed, 13 Apr 2016 16:47:01 +0100
changeset 330915 ac43dab284afd189ed2b0f4c1906a45e0c1736dd
parent 330914 8c8bded39b76cb9f32ded2f988209d46695d45ae
child 330916 b00232b9f65b6195f4f01167747325fd6c140a9c
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfabrice
bugs1263158
milestone48.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 1263158 - Check if key is present in manifest object before using it. r=fabrice
dom/apps/AppsUtils.jsm
--- a/dom/apps/AppsUtils.jsm
+++ b/dom/apps/AppsUtils.jsm
@@ -834,17 +834,17 @@ this.ManifestHelper = function(aManifest
       this._localeRoot = this._manifest.locales[lang];
   }
 };
 
 ManifestHelper.prototype = {
   _localeProp: function(aProp) {
     if (this._localeRoot[aProp] != undefined)
       return this._localeRoot[aProp];
-    return this._manifest[aProp];
+    return (aProp in this._manifest) ? this._manifest[aProp] : undefined;
   },
 
   get name() {
     return this._localeProp("name");
   },
 
   get short_name() {
     return this._localeProp("short_name");