Backed out changeset 7f3e428b4a5d (bug 991904) for xpcshell failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 25 Apr 2014 14:08:12 -0400
changeset 180679 8364bff2be23003f9293b769d9efaa81427c4d45
parent 180678 ef18d9fd18a1cf2f199f39a77026745ba8ecfbbd
child 180680 0e91262606a631fbc4e0ea24c1447c0604787de1
child 180802 2fc524c6144b4e4b73aaa1e2c65f2945eddaaa39
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
bugs991904
milestone31.0a1
backs out7f3e428b4a5d494501fa273b29727e5f8e7f0fe9
Backed out changeset 7f3e428b4a5d (bug 991904) for xpcshell failures. CLOSED TREE
toolkit/devtools/Loader.jsm
toolkit/devtools/tests/unit/head_devtools.js
toolkit/devtools/tests/unit/test_require_lazy.js
toolkit/devtools/tests/unit/xpcshell.ini
--- a/toolkit/devtools/Loader.jsm
+++ b/toolkit/devtools/Loader.jsm
@@ -271,34 +271,16 @@ DevToolsLoader.prototype = {
    * @see setProvider
    */
   require: function() {
     this._chooseProvider();
     return this.require.apply(this, arguments);
   },
 
   /**
-   * Define a getter property on the given object that requires the given
-   * module. This enables delaying importing modules until the module is
-   * actually used.
-   *
-   * @param Object obj
-   *    The object to define the property on.
-   * @param String property
-   *    The property name.
-   * @param String module
-   *    The module path.
-   */
-  lazyRequireGetter: function (obj, property, module) {
-    Object.defineProperty(obj, property, {
-      get: () => this.require(module)
-    });
-  },
-
-  /**
    * Add a URI to the loader.
    * @param string id
    *    The module id that can be used within the loader to refer to this module.
    * @param string uri
    *    The URI to load as a module.
    * @returns The module's exports.
    */
   loadURI: function(id, uri) {
--- a/toolkit/devtools/tests/unit/head_devtools.js
+++ b/toolkit/devtools/tests/unit/head_devtools.js
@@ -1,15 +1,14 @@
 "use strict";
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
 const Cr = Components.results;
 
-Cu.import("resource://gre/modules/devtools/Loader.jsm");
 Cu.import("resource://gre/modules/devtools/DevToolsUtils.jsm");
 
 // Register a console listener, so console messages don't just disappear
 // into the ether.
 let errorCount = 0;
 let listener = {
   observe: function (aMessage) {
     errorCount++;
deleted file mode 100644
--- a/toolkit/devtools/tests/unit/test_require_lazy.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -*- Mode: js; js-indent-level: 2; -*- */
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-// Test devtools.lazyRequireGetter
-
-function run_test() {
-  const o = {};
-  devtools.lazyRequireGetter(o, "asyncUtils", "devtools/async-utils");
-  const asyncUtils = devtools.require("devtools/async-utils");
-  // XXX: do_check_eq only works on primitive types, so we have this
-  // do_check_true of an equality expression.
-  do_check_true(o.asyncUtils === asyncUtils);
-}
--- a/toolkit/devtools/tests/unit/xpcshell.ini
+++ b/toolkit/devtools/tests/unit/xpcshell.ini
@@ -2,9 +2,8 @@
 head = head_devtools.js
 tail =
 
 [test_independent_loaders.js]
 [test_invisible_loader.js]
 [test_safeErrorString.js]
 [test_defineLazyPrototypeGetter.js]
 [test_async-utils.js]
-[test_require_lazy.js]
\ No newline at end of file