Bug 1206488 - Unable to get URL of a livemark from a bookmarks tree. r=gijs
authorMarco Bonardo <mbonardo@mozilla.com>
Wed, 14 Oct 2015 18:49:19 +0200
changeset 267671 6eadb1d830395453fbb10a56cbb7ab10dd1238da
parent 267670 a12d60c18af96fbd0a5064b8a1daf2adb3476b20
child 267672 a7eb74116e1b86183d0e618080218d4a1915a11c
push id29526
push userkwierso@gmail.com
push dateWed, 14 Oct 2015 21:40:05 +0000
treeherdermozilla-central@1b59270acb13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgijs
bugs1206488
milestone44.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 1206488 - Unable to get URL of a livemark from a bookmarks tree. r=gijs
toolkit/components/places/PlacesUtils.jsm
--- a/toolkit/components/places/PlacesUtils.jsm
+++ b/toolkit/components/places/PlacesUtils.jsm
@@ -576,21 +576,21 @@ this.PlacesUtils = {
     // query options are excluding them.
     // This can happen when copying from the left hand pane of the bookmarks
     // organizer.
     // @return [node, shouldClose]
     function gatherDataFromNode(node, gatherDataFunc) {
       if (PlacesUtils.nodeIsFolder(node) &&
           node.type != Ci.nsINavHistoryResultNode.RESULT_TYPE_FOLDER_SHORTCUT &&
           asQuery(node).queryOptions.excludeItems) {
-        let node = PlacesUtils.getFolderContents(node.itemId, false, true).root;
+        let folderRoot = PlacesUtils.getFolderContents(node.itemId, false, true).root;
         try {
-          return gatherDataFunc(node);
+          return gatherDataFunc(folderRoot);
         } finally {
-          node.containerOpen = false;
+          folderRoot.containerOpen = false;
         }
       }
       // If we didn't create our own query, do not alter the node's state.
       return gatherDataFunc(node);
     }
 
     function gatherDataHtml(node) {
       let htmlEscape = s => s.replace(/&/g, "&amp;")