Last Comment Bug 986080 - TypeError: stagingDirEntries is null at resource://gre/modules/addons/XPIProvider.jsm:2279
: TypeError: stagingDirEntries is null at resource://gre/modules/addons/XPIProv...
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: Add-ons Manager (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla31
Assigned To: :Irving Reid (No longer working on Firefox)
:
: Andy McKay [:andym]
Mentors:
Depends on: 952543
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-20 11:28 PDT by :Irving Reid (No longer working on Firefox)
Modified: 2014-03-21 17:09 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Don't return null from getDirectoryEntries (1.57 KB, patch)
2014-03-20 11:54 PDT, :Irving Reid (No longer working on Firefox)
dtownsend: review+
Details | Diff | Splinter Review

Description User image :Irving Reid (No longer working on Firefox) 2014-03-20 11:28:10 PDT
Another issue from exception telemetry. If for any reason we can't iterate the XPI staging directory, XPIProvider.jsm:getDirectoryEntries() returns null (and doesn't close its directory enumerator), but none of the callers check for null.
Comment 1 User image :Irving Reid (No longer working on Firefox) 2014-03-20 11:54:10 PDT
Created attachment 8394329 [details] [diff] [review]
Don't return null from getDirectoryEntries

(I was wrong about not closing the iterator, though we did try to close it even if we fail to get one)

Rather than spread the null check around to all the callers, I just return an empty array, since there's not much interesting the callers could do with knowledge of the failure.
Comment 2 User image Ryan VanderMeulen [:RyanVM] 2014-03-21 10:46:09 PDT
https://hg.mozilla.org/integration/fx-team/rev/29d33fe0614c
Comment 3 User image Wes Kocher (:KWierso) 2014-03-21 17:09:04 PDT
https://hg.mozilla.org/mozilla-central/rev/29d33fe0614c

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