Closed Bug 624230 Opened 14 years ago Closed 13 years ago

Error: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsINavHistoryService.executeQueries]

Categories

(Firefox :: Bookmarks & History, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: tabutils+bugzilla, Unassigned)

References

Details

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
Line: 83

Please try ... catch the executeQueries for invalid query, like what is done in Firefox 3.6.


Reproducible: Always

Steps to Reproduce:
Execute the following in Javascript shell:

if (PlacesToolbarHelper._viewElt._placesView)
  PlacesToolbarHelper._viewElt.controllers
  .removeController(PlacesToolbarHelper._viewElt._placesView._controller);

PlacesToolbarHelper.customizeStart();
PlacesToolbarHelper._place = "place:folder=-1";
PlacesToolbarHelper.customizeDone();
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();
query.setFolders([folder], 1);
historyService.executeQuery(query, options);
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.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Depends on: 641074
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.