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

RESOLVED FIXED

Status

()

Firefox
Bookmarks & History
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: ithinc, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
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.

Comment 2

6 years ago
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

Comment 4

6 years ago
(In reply to comment #3)
> sounds correct to me, if folder doesn't exist it should throw

Sorry, it's my fault, thanks
(Reporter)

Comment 5

6 years ago
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
Last Resolved: 6 years ago
Depends on: 641074
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.