Closed Bug 495996 Opened 17 years ago Closed 17 years ago

Bookmark observer doesn't implement onBeforeItemRemoved method

Categories

(Cloud Services :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwkbugzilla, Assigned: jwkbugzilla)

References

Details

Attachments

(1 file)

With a trunk Weave build on Minefield, every time a bookmark gets removed I see this error message: Error: [Exception... "'JavaScript component does not have a method named: "onBeforeItemRemoved"' when calling method: [nsINavBookmarkObserver::onBeforeItemRemoved]" nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)" location: "JS frame :: file:///C:/Program%20Files/firefox/components/nsPlacesTransactionsService.js :: PRIT_doTransaction :: line 636" data: no] Source File: file:///C:/Program%20Files/firefox/components/nsPlacesTransactionsService.js Line: 636 It is particularly annoying when a live bookmark updates, then I get a few dozen of these messages. The observer causing this error has been added by Weave's bookmarks engine, it doesn't implement onBeforeItemRemoved method.
Attached patch Proposed patchSplinter Review
Assignee: nobody → trev.moz
Status: NEW → ASSIGNED
Attachment #381128 - Flags: review?(edilee)
Related bug 481327 where we got places to add onBeforeRemoved to act on items that are being removed to deal with not being able to remove items correctly.
Blocks: 481327
We should actually support onBeforeItemRemoved, and take out the workaround we have now (building and maintaining an id->guid mapping table). Note that this is also available on shiretoko, but in the interface nsINavBookmarkObserver_MOZILLA_1_9_1_ADDITIONS.
Attachment #381128 - Flags: review?(edilee) → review+
http://hg.mozilla.org/labs/weave/rev/bf459e48b7c3 This just gets rid of the exception, but we've got other bugs opened to do useful stuff with onBeforeItemRemoved.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: -- → 0.4
Component: Weave → General
Product: Mozilla Labs → Weave
Version: Trunk → unspecified
QA Contact: weave → general
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: