Bug 644641 - Fix perma-oranges browser-chrome tests on desktop - followup [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Fri, 25 Mar 2011 18:40:28 +0100
changeset 2942 c358e083b0ad1424bad1f17320c3b964cab569f3
parent 2941 5d77401196ed642b1abc80a03be31e42cada935f
child 2943 3f8519dfd4c69b4b94da34ce99304ac6e267e319
push id2481
push uservnicolas@mozilla.com
push dateFri, 25 Mar 2011 17:43:45 +0000
reviewersmfinkle
bugs644641
Bug 644641 - Fix perma-oranges browser-chrome tests on desktop - followup [r=mfinkle]
chrome/content/bindings.xml
--- a/chrome/content/bindings.xml
+++ b/chrome/content/bindings.xml
@@ -1001,17 +1001,24 @@
 
       <field name="scrollBoxObject">this._children.scrollBoxObject</field>
 
       <property name="items" readonly="true" onget="return this._children.childNodes"/>
 
       <!-- mobileRoot is a property otherwise if it is accessed before Places
            is ready the value will be bitrotted
       -->
-      <property name="mobileRoot" onget="return PlacesUtils.annotations.getItemsWithAnnotation('mobile/bookmarksRoot', {})[0];"/>
+      <field name="_mobileRoot">null</field>
+      <property name="mobileRoot">
+        <getter><![CDATA[
+          if (!this._mobileRoot)
+            this._mobileRoot = PlacesUtils.annotations.getItemsWithAnnotation('mobile/bookmarksRoot', {})[0];
+          return this._mobileRoot;
+        ]]></getter>
+      </property>
 
       <property name="isRootFolder" readonly="true">
         <getter>
           <![CDATA[
             let currentFolderId = this._parents.lastChild.itemId;
             return currentFolderId == this.mobileRoot;
           ]]>
         </getter>