Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

RemoteSelector: make the access to built-in actors types simplier

  • Loading branch information...
commit 67793419c02f1f7d85c6dccdd52d1e3761ceac86 1 parent e912899
@janodvarko janodvarko authored
View
27 RemoteSelector/chrome/content/elementActor.js
@@ -15,30 +15,7 @@ var Cc = Components.classes;
var Ci = Components.interfaces;
var Cu = Components.utils;
-Cu.import("resource:///modules/devtools/dbg-server.jsm");
-
-//xxxHonza: it should be easier to get the built-in data types.
-function loadSubScript(aURL)
-{
- try {
- let loader = Cc["@mozilla.org/moz/jssubscript-loader;1"]
- .getService(Ci.mozIJSSubScriptLoader);
- loader.loadSubScript(aURL, this);
- } catch(e) {
- dump("Error loading: " + aURL + ": " + e + " - " + e.stack + "\n");
- throw e;
- }
-}
-
-//Load the debugging server in a sandbox with its own compartment.
-var systemPrincipal = Cc["@mozilla.org/systemprincipal;1"].createInstance(Ci.nsIPrincipal);
-var DBGServer = Cu.Sandbox(systemPrincipal);
-DBGServer.importFunction(loadSubScript);
-try {
- DBGServer.loadSubScript("chrome://global/content/devtools/dbg-script-actors.js");
-} catch (e) {
- //xxxHonza: ignore the exception 'Debugger not defined'
-}
+Cu.import("resource://gre/modules/devtools/dbg-server.jsm");
// ********************************************************************************************* //
// Implementation
@@ -49,7 +26,7 @@ function ElementActor(aObj, aThreadActor)
this.threadActor = aThreadActor;
}
-ElementActor.prototype = Object.create(DBGServer.ObjectActor.prototype);
+ElementActor.prototype = Object.create(DebuggerServer.ObjectActor.prototype);
ElementActor.prototype = Obj.extend(ElementActor.prototype,
{
constructor: ElementActor,
View
2  RemoteSelector/chrome/content/selectorModule.js
@@ -69,7 +69,7 @@ var SelectorModule = Obj.extend(Firebug.Module,
FBTrace.sysout("remoteSelector; SelectorModule.onTabNavigated;");
},
- onThreadAttached: function(context)
+ onThreadAttached: function(context, reload)
{
var client = Firebug.debuggerClient;
Please sign in to comment.
Something went wrong with that request. Please try again.