Closed Bug 441446 Opened 16 years ago Closed 14 years ago

NS_ERROR_IN_PROGRESS when setting nsIXMLHttpRequest.mozBackgroundRequest in xmpp/transportLayer.js

Categories

(Cloud Services :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID
Future

People

(Reporter: myk, Unassigned)

Details

Attachments

(1 file)

The following error message appeared in my JS console today:

Error: [Exception... "Component returned failure code: 0x804b000f (NS_ERROR_IN_PROGRESS) [nsIXMLHttpRequest.mozBackgroundRequest]"  nsresult: "0x804b000f (NS_ERROR_IN_PROGRESS)"  location: "JS frame :: file:///home/myk/Projects/weave/modules/xmpp/transportLayer.js :: anonymous :: line 259"  data: no]
Source File: file:///home/myk/Projects/weave/modules/xmpp/transportLayer.js
Line: 259

It looks like _doPost was called, reused this._request, and then tried to set mozBackgroundRequest on it (per my recent change), but this._request was "in progress", so that flag couldn't be set.

There is at least one and perhaps two bugs here:

1. We should set mozBackgroundRequest when we first define this._request rather than every time _doPost uses it.

2. Perhaps _doPost needs to make sure that this._request isn't in use before trying to use it for something else.
This fixes the first problem.  I'm not sure how to go about figuring out the second.

Note: this patch also uses an instance getter and a closure to avoid storing the request object in a second property.
Setting milestone to 0.3.
Target Milestone: -- → 0.3
These bugs need to be triaged, removing 0.3 milestone setting.
Target Milestone: 0.3 → Future
Component: Weave → General
Product: Mozilla Labs → Weave
QA Contact: weave → general
xmpp is currently dead (and hg removed).
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: