Bug 724832 - Fix mochitest leaks after the latest merge from fx-team; r=rcampbell default tip
authorPanos Astithas <past@mozilla.com>
Tue, 07 Feb 2012 19:12:14 +0200
changeset 86074 79ccc0e200bcb594acd664a743f384588d0bdb87
parent 86073 18dc28c2b90836aae05f73ed39ca515b3a4362dc
push id94
push userpastithas@mozilla.com
push dateTue, 07 Feb 2012 17:12:53 +0000
reviewersrcampbell
bugs724832
milestone13.0a1
Bug 724832 - Fix mochitest leaks after the latest merge from fx-team; r=rcampbell
browser/devtools/debugger/test/browser_dbg_script-switching.js
browser/devtools/debugger/test/head.js
--- a/browser/devtools/debugger/test/browser_dbg_script-switching.js
+++ b/browser/devtools/debugger/test/browser_dbg_script-switching.js
@@ -3,17 +3,19 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 /**
  * Make sure that switching the displayed script in the UI works as advertised.
  */
 
 const TAB_URL = "http://example.com/browser/browser/devtools/debugger/" +
                 "test/browser_dbg_script-switching.html";
-Cu.import("resource:///modules/source-editor.jsm");
+let tempScope = {};
+Cu.import("resource:///modules/source-editor.jsm", tempScope);
+let SourceEditor = tempScope.SourceEditor;
 
 var gPane = null;
 var gTab = null;
 var gDebuggee = null;
 var gDebugger = null;
 var gScripts = null;
 
 function test()
--- a/browser/devtools/debugger/test/head.js
+++ b/browser/devtools/debugger/test/head.js
@@ -1,18 +1,23 @@
 /* Any copyright is dedicated to the Public Domain.
    http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cu = Components.utils;
-Cu.import("resource:///modules/devtools/dbg-server.jsm");
-Cu.import("resource:///modules/devtools/dbg-client.jsm");
-Cu.import("resource:///modules/Services.jsm");
+let tempScope = {};
+Cu.import("resource:///modules/devtools/dbg-server.jsm", tempScope);
+Cu.import("resource:///modules/devtools/dbg-client.jsm", tempScope);
+Cu.import("resource:///modules/Services.jsm", tempScope);
+let DebuggerServer = tempScope.DebuggerServer;
+let DebuggerTransport = tempScope.DebuggerTransport;
+let DebuggerClient = tempScope.DebuggerClient;
+let Services = tempScope.Services;
 
 const TAB1_URL = "http://example.com/browser/browser/devtools/debugger/test/browser_dbg_tab1.html";
 
 const TAB2_URL = "http://example.com/browser/browser/devtools/debugger/test/browser_dbg_tab2.html";
 
 const STACK_URL = "http://example.com/browser/browser/devtools/debugger/test/browser_dbg_stack.html";
 
 if (!DebuggerServer.initialized) {