Bug 636828: check for aURI in nsINavBookmarkObserver handler. r=mak, a=johnath
authorRichard Newman <rnewman@mozilla.com>
Fri, 25 Feb 2011 18:07:25 -0800
changeset 63123 a0cd97a4231526c1042da16f009c7c786f2be993
parent 63122 d7961dc7e5f40bfd0896c8671898fa136cee4dec
child 63124 f20f6ca6be78703dad7c22df9f274c4ede9885d1
push id7
push userrnewman@mozilla.com
push dateSat, 26 Feb 2011 02:08:45 +0000
treeherderservices-central@a0cd97a42315 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, johnath
bugs636828
milestone2.0b13pre
Bug 636828: check for aURI in nsINavBookmarkObserver handler. r=mak, a=johnath
browser/base/content/browser-places.js
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -1043,17 +1043,17 @@ var PlacesStarButton = {
   // nsINavBookmarkObserver
   onItemAdded:
   function PSB_onItemAdded(aItemId, aFolder, aIndex, aItemType, aURI)
   {
     if (!this._starIcon) {
       return;
     }
 
-    if (aURI.equals(this._uri)) {
+    if (aURI && aURI.equals(this._uri)) {
       // If a new bookmark has been added to the tracked uri, register it.
       if (this._itemIds.indexOf(aItemId) == -1) {
         this._itemIds.push(aItemId);
         this._updateStateInternal();
       }
     }
   },