bookmarks.removeTree() can remove special Bookmarks (other bookmarks...)

RESOLVED DUPLICATE of bug 1347386

Status

()

Toolkit
WebExtensions: General
RESOLVED DUPLICATE of bug 1347386
12 days ago
12 days ago

People

(Reporter: Morikko, Unassigned)

Tracking

57 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 days ago
Created attachment 8927674 [details]
Capture d'écran de 2017-11-12 18-36-00.png

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20171106144225

Steps to reproduce:

I did a search with an empty string. It returned all the ids of all the bookmarks, and next I removed them.

browser.bookmarks.search({
  title: ""
}).then((searchResults) => {
  searchResults.map((searchResult) => {
    console.log(searchResult.id);
    browser.bookmarks.removeTree(searchResult.id);
  });
}).catch((reason) => {
  reject("StorageManager.Bookmark.cleanGroups failed: " + reason);
});


Actual results:

It removed all the folders even the special ones you can't remove from the UI.

- Bookmarks Toolbar
- Bookmarks Menu
- Other Bookmarks

After that, you can't use the bookmarks any more until you restart Firefox. Then, the special bookmarks reappear but are empty.


Expected results:

Raise an error when someone try to delete a special bookmark folder.
(Reporter)

Comment 1

12 days ago
Updated code for reproducing the bug:


browser.bookmarks.search({
  title: ""
}).then((searchResults) => {
  searchResults.map((searchResult) => {
    console.log(searchResult.id);
    browser.bookmarks.removeTree(searchResult.id);
  });
}).catch((reason) => {

});

Updated

12 days ago
Component: Untriaged → WebExtensions: General
Product: Firefox → Toolkit
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 days ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1347386
You need to log in before you can comment on or make changes to this bug.