browser/components/sessionstore/SessionWorker.jsm
author B2G Bumper Bot <release+b2gbumper@mozilla.com>
Sat, 17 Oct 2015 20:09:34 -0700
changeset 303388 e580ff9c0a3e16c9546cfae4de4f588039fc7c36
parent 219147 e102b0c9d37e263ce220d22cabfd81199d82c375
child 455769 d4a7c018420e408fbe0a13ffddd2861623fda5a7
permissions -rw-r--r--
Bumping manifests a=b2g-bump

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

"use strict";

/**
 * Interface to a dedicated thread handling I/O
 */

const Cu = Components.utils;
const Cc = Components.classes;
const Ci = Components.interfaces;
const Cr = Components.results;

Cu.import("resource://gre/modules/PromiseWorker.jsm", this);
Cu.import("resource://gre/modules/osfile.jsm", this);

this.EXPORTED_SYMBOLS = ["SessionWorker"];

this.SessionWorker = new BasePromiseWorker("resource:///modules/sessionstore/SessionWorker.js");
// As the Session Worker performs I/O, we can receive instances of
// OS.File.Error, so we need to install a decoder.
this.SessionWorker.ExceptionHandlers["OS.File.Error"] = OS.File.Error.fromMsg;