Bug 917983 - BreakpointActor instances should be saved in the threadLifetimePool; r=past

This commit is contained in:
Nick Fitzgerald 2013-12-06 09:25:58 -08:00
parent a0a576fa5a
commit 8ba3698f2c
4 changed files with 6 additions and 65 deletions

View File

@ -381,32 +381,8 @@ RootActor.prototype = {
windowUtils.resumeTimeouts();
windowUtils.suppressEventHandling(false);
}
},
/* ChromeDebuggerActor hooks. */
/**
* Add the specified actor to the default actor pool connection, in order to
* keep it alive as long as the server is. This is used by breakpoints in the
* thread and chrome debugger actors.
*
* @param actor aActor
* The actor object.
*/
addToParentPool: function(aActor) {
this.conn.addActor(aActor);
},
/**
* Remove the specified actor from the default actor pool.
*
* @param BreakpointActor aActor
* The actor object.
*/
removeFromParentPool: function(aActor) {
this.conn.removeActor(aActor);
}
}
};
RootActor.prototype.requestTypes = {
"listTabs": RootActor.prototype.onListTabs,

View File

@ -403,9 +403,7 @@ EventLoop.prototype = {
*
* @param aHooks object
* An object with preNest and postNest methods for calling when entering
* and exiting a nested event loop, addToParentPool and
* removeFromParentPool methods for handling the lifetime of actors that
* will outlive the thread, like breakpoints.
* and exiting a nested event loop.
* @param aGlobal object [optional]
* An optional (for content debugging only) reference to the content
* window.
@ -1368,7 +1366,7 @@ ThreadActor.prototype = {
line: aLocation.line,
column: aLocation.column
});
this._hooks.addToParentPool(actor);
this.threadLifetimePool.addActor(actor);
}
// Find all scripts matching the given location
@ -3568,7 +3566,7 @@ BreakpointActor.prototype = {
onDelete: function (aRequest) {
// Remove from the breakpoint store.
this.threadActor.breakpointStore.removeBreakpoint(this.location);
this.threadActor._hooks.removeFromParentPool(this);
this.threadActor.threadLifetimePool.removeActor(this);
// Remove the actual breakpoint from the associated scripts.
this.removeScripts();
return { from: this.actorID };
@ -3818,9 +3816,7 @@ Object.defineProperty(Debugger.Frame.prototype, "line", {
*
* @param aHooks object
* An object with preNest and postNest methods for calling when entering
* and exiting a nested event loop and also addToParentPool and
* removeFromParentPool methods for handling the lifetime of actors that
* will outlive the thread, like breakpoints.
* and exiting a nested event loop.
*/
function ChromeDebuggerActor(aConnection, aHooks)
{

View File

@ -503,28 +503,6 @@ BrowserTabActor.prototype = {
_pendingNavigation: null,
/**
* Add the specified actor to the default actor pool connection, in order to
* keep it alive as long as the server is. This is used by breakpoints in the
* thread actor.
*
* @param actor aActor
* The actor object.
*/
addToParentPool: function BTA_addToParentPool(aActor) {
this.conn.addActor(aActor);
},
/**
* Remove the specified actor from the default actor pool.
*
* @param BreakpointActor aActor
* The actor object.
*/
removeFromParentPool: function BTA_removeFromParentPool(aActor) {
this.conn.removeActor(aActor);
},
// A constant prefix that will be used to form the actor ID by the server.
actorPrefix: "tab",

View File

@ -105,16 +105,7 @@ TestTabActor.prototype = {
/* Support for DebuggerServer.addTabActor. */
_createExtraActors: CommonCreateExtraActors,
_appendExtraActors: CommonAppendExtraActors,
// Hooks for use by TestTabActors.
addToParentPool: function(aActor) {
this.conn.addActor(aActor);
},
removeFromParentPool: function(aActor) {
this.conn.removeActor(aActor);
}
_appendExtraActors: CommonAppendExtraActors
};
TestTabActor.prototype.requestTypes = {