toolkit/components/osfile/osfile.jsm

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/components/osfile/osfile.jsm	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +/**
     1.9 + * Common front for various implementations of OS.File
    1.10 + */
    1.11 +
    1.12 +if (typeof Components != "undefined") {
    1.13 +  this.EXPORTED_SYMBOLS = ["OS"];
    1.14 +  Components.utils.import("resource://gre/modules/osfile/osfile_async_front.jsm", this);
    1.15 +} else {
    1.16 +  // At this stage, we need to import all sources at once to avoid
    1.17 +  // a unique failure on tbpl + talos that seems caused by a
    1.18 +  // what looks like a nested event loop bug (see bug 794091).
    1.19 +#ifdef XP_WIN
    1.20 +  importScripts(
    1.21 +    "resource://gre/modules/workers/require.js",
    1.22 +    "resource://gre/modules/osfile/osfile_win_back.jsm",
    1.23 +    "resource://gre/modules/osfile/osfile_shared_front.jsm",
    1.24 +    "resource://gre/modules/osfile/osfile_win_front.jsm"
    1.25 +  );
    1.26 +#else
    1.27 +  importScripts(
    1.28 +    "resource://gre/modules/workers/require.js",
    1.29 +    "resource://gre/modules/osfile/osfile_unix_back.jsm",
    1.30 +    "resource://gre/modules/osfile/osfile_shared_front.jsm",
    1.31 +    "resource://gre/modules/osfile/osfile_unix_front.jsm"
    1.32 +  );
    1.33 +#endif
    1.34 +  OS.Path = require("resource://gre/modules/osfile/ospath.jsm");
    1.35 +}

mercurial