nsINavBookmarksService.createFolder and insertBookmark fails when called from worker thread




10 years ago
9 years ago


(Reporter: mikek01, Unassigned)


Firefox Tracking Flags

(Not tracked)




10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2

I'm not sure if this is related to bug 462379. If it is, please excuse the dup.

When calling nsINavBookmarksService.createFolder or nsINavBookmarksService.insertBookmark from a worker thread, the following message is dumped to the error console: -

[JavaScript Error: "uncaught exception: [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIObserverService.notifyObservers]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox%203.1%20Beta%202/components/nsPlacesDBFlush.js :: DBFlush_handleCompletion :: line 198"  data: no]"]

The problem seems to occur intermittently. After a fresh restart, everything works fine, but after running the code a few times, the errors start to occur.

I have experimented with and without runInBatchMode. Using runInBatchMode seems to generate less errors, but errors are still dumped to the console.

The most worrying part is that Firefox abends after a while.

Reproducible: Sometimes

Steps to Reproduce:
1. Create a worker that adds a few folders and bookmarks using nsINavBookmarksService.createFolder and nsINavBookmarksService.insertBookmark
Actual Results:  
Dumps errors to console and sometimes causes Firefox to abend

Expected Results:  
Folders and bookmarks should be added without errors being dumped or Firefox abending.
You can't use arbitrary components on different threads.  These services are not threadsafe!
Last Resolved: 10 years ago
Resolution: --- → INVALID
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h".

In Thunderbird 3.0b, you do that as follows:
Tools | Message Filters
Make sure the correct account is selected. Click "New"
Conditions: Body   contains   places-to-b-and-h
Change the action to "Delete Message".
Select "Manually Run" from the dropdown at the top.
Click OK.

Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter.

Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.