Closed Bug 775719 Opened 12 years ago Closed 12 years ago

"entries.nextFile is not a function" in TelemetryPing.js during startup

Categories

(Toolkit :: Telemetry, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: jruderman, Assigned: froydnj)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Steps to reproduce using a Tinderbox debug build:

1. mkdir ~/pxd/
2. firefox -profile ~/pxd/
3. Use about:config to set
      user_pref("toolkit.telemetry.enabled", true);
4. firefox -profile ~/pxd/

During startup:

************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "'[JavaScript Error: "entries.nextFile is not a function" {file: "resource:///components/TelemetryPing.js" line: 744}]' when calling method: [nsIObserver::observe]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: yes]
************************************************************

I'm guessing this is a regression from bug 763524.
Attached patch patch (obsolete) — Splinter Review
Almost checked this in under r=obvious, but you never know...
Attachment #643999 - Flags: review?(taras.mozilla)
Assignee: nobody → nfroyd
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86_64 → All
Attached patch patchSplinter Review
Sigh, let's not reintroduce the opposite problem...
Attachment #643999 - Attachment is obsolete: true
Attachment #643999 - Flags: review?(taras.mozilla)
Attachment #644001 - Flags: review?(taras.mozilla)
Attachment #644001 - Flags: review?(taras.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/360686937a0a
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
This patch changed the first argument to loadHistograms:
  old:  entries.nextFile 
  new:  entries.nextFile()

Is that a problem?
I think you mean the reverse, and no, that was the point of this bug. nextFile is an attribute, not a function.
(In reply to Josh Matthews [:jdm] from comment #6)
> I think you mean the reverse, and no, that was the point of this bug.
> nextFile is an attribute, not a function.

Yes.  This is an unfortunate wart in the nsIDirectoryEnumerator API, IMHO.  A TranslateWeirdXPCOMAPIsToSaneJavascript.jsm would be appreciated...
Depends on: 782117
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: