Closed
Bug 372051
Opened 18 years ago
Closed 18 years ago
Error: this._ans.setAnnotation is not a function when moving a livemark container
Categories
(Firefox :: Bookmarks & History, defect)
Firefox
Bookmarks & History
Tracking
()
RESOLVED
FIXED
Firefox 3 alpha3
People
(Reporter: asaf, Assigned: asaf)
References
Details
(Keywords: regression)
Attachments
(1 file, 3 obsolete files)
1.91 KB,
patch
|
asaf
:
review+
|
Details | Diff | Splinter Review |
There's no generic setAnnotation method.
Flags: in-testsuite-
Comment 1•18 years ago
|
||
what is the test case?
Comment 2•18 years ago
|
||
I am pretty surprised the existing tests didn't hit this
Flags: in-testsuite- → in-testsuite?
Comment 3•18 years ago
|
||
just use setAnnotationString since feedURIString and siteURIString are always strings
Comment 4•18 years ago
|
||
one more thing in LivemarkService.prototype.onContainerMoved
- siteURIString = this._ans.GetAnnotationString(oldURI, LMANNO_SITEURI);
+ siteURIString = this._ans.getAnnotationString(oldURI, LMANNO_SITEURI);
Comment 5•18 years ago
|
||
Attachment #261032 -
Flags: review?(mano)
Assignee | ||
Comment 6•18 years ago
|
||
Comment on attachment 261032 [details] [diff] [review]
patch
patching file toolkit/components/places/src/nsLivemarkService.js
patch unexpectedly ends in middle of line
Hunk #1 FAILED at 417.
1 out of 1 hunk FAILED -- saving rejects to file toolkit/components/places/src/nsLivemarkService.js.rej
We also need to extend test_livemarks.js to test livemark-movement.
Attachment #261032 -
Flags: review?(mano) → review-
Comment 7•18 years ago
|
||
fix the error in the previous file (hopefully)
Attachment #261032 -
Attachment is obsolete: true
Attachment #261119 -
Flags: review?(mano)
Comment 8•18 years ago
|
||
fix the error in the previous file (hopefully)
Attachment #261119 -
Attachment is obsolete: true
Attachment #261120 -
Flags: review?(mano)
Attachment #261119 -
Flags: review?(mano)
Assignee | ||
Comment 9•18 years ago
|
||
Comment on attachment 261120 [details] [diff] [review]
patch
I still get a failed hunk here only... How did you generate this patch? is your tree up-to-date?
Attachment #261120 -
Flags: review?(mano)
Comment 10•18 years ago
|
||
can you make new patch from this ?
onContainerMoved:
function LS_onContainerMoved(container, newFolder, newIndex) {
var index = this._getLivemarkIndex(container);
// Update the annotation that maps the folder URI to the livemark feed URI
var newURI = this._bms.getFolderURI(container);
var oldURI = this._livemarks[index].folderURI;
var feedURIString = this._ans.getAnnotationString(oldURI, LMANNO_FEEDURI);
this._ans.removeAnnotation(oldURI, LMANNO_FEEDURI);
- this._ans.setAnnotation(newURI, LMANNO_FEEDURI, feedURIString, 0,
- this._ans.EXPIRE_NEVER);
+ this._ans.setAnnotationString(newURI, LMANNO_FEEDURI, feedURIString, 0,
+ this._ans.EXPIRE_NEVER);
// Update the annotation that maps the folder URI to the livemark site URI
var siteURIString;
try {
- siteURIString = this._ans.GetAnnotationString(oldURI, LMANNO_SITEURI);
+ siteURIString = this._ans.getAnnotationString(oldURI, LMANNO_SITEURI);
}
catch (ex) {
// will throw if no annotation
}
if (siteURIString) {
this._ans.removeAnnotation(oldURI, LMANNO_SITEURI);
- this._ans.setAnnotation(newURI, LMANNO_SITEURI, siteURIString, 0,
- this._ans.EXPIRE_NEVER);
+ this._ans.setAnnotationString(newURI, LMANNO_SITEURI, siteURIString, 0,
+ this._ans.EXPIRE_NEVER);
}
},
Assignee | ||
Comment 11•18 years ago
|
||
onemen.one@gmail.com: for future, patches are generated using the |cvs diff| utility (or diff, if you're working with a non-cvs tree), you should never to do this manually.
Comment 12•18 years ago
|
||
this patch was generate with wincvs with up-to-date tree
i hope this will work
Attachment #261120 -
Attachment is obsolete: true
Attachment #261563 -
Flags: review?(mano)
Assignee | ||
Comment 13•18 years ago
|
||
Comment on attachment 261563 [details] [diff] [review]
patch
r=mano.
Attachment #261563 -
Flags: review?(mano) → review+
Comment 14•18 years ago
|
||
mano@mozilla.com:can you check-in this patch?
Comment 16•18 years ago
|
||
fix checked in. for bug #380090 I had the same patch, so adding in a r=sspitzer (on top of r=mano).
Checking in nsLivemarkService.js;
/cvsroot/mozilla/toolkit/components/places/src/nsLivemarkService.js,v <-- nsLivemarkService.js
new revision: 1.11; previous revision: 1.10
done
thanks onemen.one for the patch!
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 17•18 years ago
|
||
for simple steps to reproduce:
1) create a new profile
2) create a folder in the organize bookmarks dialog named "test"
3) attempt to dnd the "Latest Headlines" livemark into the "test" folder
you'll get the js errors:
************************************************************
* Call to xpconnect wrapped JSObject produced this error: *
[Exception... "'[JavaScript Error: "this._ans.setAnnotation is not a function" {file: "file:///Users/sspitzer/Desktop/trunk-no-places/debug-build/dist/MinefieldDebug.app/Contents/MacOS/components/nsLivemarkService.js" line: 1094}]' when calling method: [nsILivemarkService::onContainerMoved]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://browser/content/places/controller.js :: PMFT_doTransaction :: line 1737" data: yes]
************************************************************
WARNING: NS_ENSURE_TRUE(NS_SUCCEEDED(rv)) failed: file /Users/sspitzer/Desktop/trunk-no-places/mozilla/toolkit/components/places/src/nsNavBookmarks.cpp, line 1571
************************************************************
* Call to xpconnect wrapped JSObject produced this error: *
[Exception... "'[JavaScript Error: "this._ans.setAnnotation is not a function" {file: "file:///Users/sspitzer/Desktop/trunk-no-places/debug-build/dist/MinefieldDebug.app/Contents/MacOS/components/nsLivemarkService.js" line: 1094}]' when calling method: [nsILivemarkService::onContainerMoved]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://browser/content/places/controller.js :: PMFT_doTransaction :: line 1737" data: yes]
************************************************************
additionally, later you may get problems when trying to open the "test" folder. something along the lines of:
************************************************************
* Call to xpconnect wrapped JSObject produced this error: *
[Exception... "'Illegal value' when calling method: [nsILivemarkService::getSiteURI]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: chrome://browser/content/places/menu.xml :: _rebuild :: line 193" data: no]
************************************************************
(but this might depend on other changes to menu.xml which have not landed yet.)
Comment 18•15 years ago
|
||
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.
Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in
before you can comment on or make changes to this bug.
Description
•