User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0b9pre) Gecko/20110108 Firefox/4.0b9pre
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b9pre) Gecko/20110108 Firefox/4.0b9pre
Error: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsINavHistoryService.executeQueries]
Source file: chrome://browser/content/places/browserPlacesViews.js
Please try ... catch the executeQueries for invalid query, like what is done in Firefox 3.6.
Steps to Reproduce:
PlacesToolbarHelper._place = "place:folder=-1";
I'm not sure we actually care about random queries that are not generated by us being forced to display here. Normal code paths that a user would hit are unit tested.
it's ok on ff 4.0 beta 11,but it's come out on ff 4.0 beta 12
Error: uncaught exception: addToLocal: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsINavHistoryService.executeQuery]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://gre/modules/PlacesUtils.jsm :: PU_getFolderContents :: line 790" data: no]
the code is:
var historyService = PlacesUtils.history;
var options = historyService.getNewQueryOptions();
var query = historyService.getNewQuery();
sounds correct to me, if folder doesn't exist it should throw
(In reply to comment #3)
> sounds correct to me, if folder doesn't exist it should throw
Sorry, it's my fault, thanks
This seems resolved in the nightly build, maybe by bug 641074?
Yes, that uniformed the behavior across invalid queries and invalid folder shortcuts. Indeed this case was throwing only for an invalid shortcut, but not for any invalid query, as I initially thought.