Closed Bug 646887 Opened 13 years ago Closed 11 years ago

ChromeWorker and "@mozilla.org/xmlextras/domparser;1"

Categories

(Core :: General, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: erikvvold, Unassigned)

Details

Can "@mozilla.org/xmlextras/domparser;1" be made available to ChromeWorkers?
You can't access DOM nodes from off the main thread.  So the usability of domparser would be pretty darned minimal, no?
So the following is not possible in ChromeWorker:

var doc = Cc["@mozilla.org/xmlextras/domparser;1"].createInstance(Ci.nsIDOMParser).parseFromString("<UserScriptConfig/>", "text/xml");
var ele = doc.createElement("Script");
doc.firstChild.appendChild(ele);

because line 2 & 3 cannot be done off of the main thread?
The parseFromString in line 1 will almost certainly corrupt memory if done from a background thread.

(Note that |doc| above is a DOM node, by the way.)
ah alright, I'll prob use JSON for storage now them, thanks for the info!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.