Last Comment Bug 624230 - Error: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsINavHistoryService.executeQueries]
: Error: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsINavHistoryService.executeQueries]
Product: Firefox
Classification: Client Software
Component: Bookmarks & History (show other bugs)
: Trunk
: All All
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Marco Bonardo [::mak]
Depends on: 641074
  Show dependency treegraph
Reported: 2011-01-09 01:02 PST by ithinc
Modified: 2011-04-26 12:19 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image ithinc 2011-01-09 01:02:39 PST
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._place = "place:folder=-1";
Comment 1 User image Shawn Wilsher :sdwilsh 2011-01-09 06:06:16 PST
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 User image Rickfan 2011-03-03 18:56:17 PST
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);
Comment 3 User image Marco Bonardo [::mak] 2011-03-04 05:00:57 PST
sounds correct to me, if folder doesn't exist it should throw
Comment 4 User image Rickfan 2011-03-05 22:33:04 PST
(In reply to comment #3)
> sounds correct to me, if folder doesn't exist it should throw

Sorry, it's my fault, thanks
Comment 5 User image ithinc 2011-04-26 12:13:35 PDT
This seems resolved in the nightly build, maybe by bug 641074?
Comment 6 User image Marco Bonardo [::mak] 2011-04-26 12:19:07 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.