Bug 903511 - Rename "GripClient" to "ObjectClient". r=fitzgen

This commit is contained in:
Anup Allamsetty 2013-08-13 12:08:30 -04:00
Родитель 4933a3c82a
Коммит a21b72cdf5
9 изменённых файлов: 28 добавлений и 28 удалений

Просмотреть файл

@ -131,7 +131,7 @@ let DebuggerView = {
// Attach a controller that handles interfacing with the debugger protocol.
VariablesViewController.attach(this.Variables, {
getGripClient: aObject => gThreadClient.pauseGrip(aObject)
getObjectClient: aObject => gThreadClient.pauseGrip(aObject)
});
// Relay events from the VariablesView.

Просмотреть файл

@ -38,7 +38,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "VariablesView",
XPCOMUtils.defineLazyModuleGetter(this, "VariablesViewController",
"resource:///modules/devtools/VariablesViewController.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "GripClient",
XPCOMUtils.defineLazyModuleGetter(this, "ObjectClient",
"resource://gre/modules/devtools/dbg-client.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "WebConsoleUtils",
@ -490,8 +490,8 @@ var Scratchpad = {
this._writePrimitiveAsComment(aResult).then(resolve, reject);
}
else {
let gripClient = new GripClient(this.debuggerClient, aResult);
gripClient.getDisplayString(aResponse => {
let objectClient = new ObjectClient(this.debuggerClient, aResult);
objectClient.getDisplayString(aResponse => {
if (aResponse.error) {
reportError("display", aResponse);
reject(aResponse);
@ -584,7 +584,7 @@ var Scratchpad = {
}
else {
let reject = aReason => deferred.reject(aReason);
let gripClient = new GripClient(this.debuggerClient, aError);
let objectClient = new ObjectClient(this.debuggerClient, aError);
// Because properties on Error objects are lazily added, this roundabout
// way of getting all the properties is required, rather than simply
@ -593,7 +593,7 @@ var Scratchpad = {
let promises = names.map(aName => {
let deferred = promise.defer();
gripClient.getProperty(aName, aResponse => {
objectClient.getProperty(aName, aResponse => {
if (aResponse.error) {
deferred.reject(aResponse);
}
@ -612,7 +612,7 @@ var Scratchpad = {
// We also need to use getPrototypeAndProperties to retrieve any
// safeGetterValues in case this is a DOM error.
let deferred = promise.defer();
gripClient.getPrototypeAndProperties(aResponse => {
objectClient.getPrototypeAndProperties(aResponse => {
if (aResponse.error) {
deferred.reject(aResponse);
}
@ -666,7 +666,7 @@ var Scratchpad = {
deferred.resolve(error.message + stack);
}
else {
gripClient.getDisplayString(aResult => {
objectClient.getDisplayString(aResult => {
if (aResult.error) {
deferred.reject(aResult);
}
@ -1767,8 +1767,8 @@ ScratchpadSidebar.prototype = {
});
VariablesViewController.attach(this.variablesView, {
getGripClient: aGrip => {
return new GripClient(this._scratchpad.debuggerClient, aGrip);
getObjectClient: aGrip => {
return new ObjectClient(this._scratchpad.debuggerClient, aGrip);
},
getLongStringClient: aActor => {
return this._scratchpad.webConsoleClient.longString(aActor);

Просмотреть файл

@ -42,7 +42,7 @@ this.EXPORTED_SYMBOLS = ["VariablesViewController"];
* The view to attach to.
* @param object aOptions
* Options for configuring the controller. Supported options:
* - getGripClient: callback for creating an object grip client
* - getObjectClient: callback for creating an object grip client
* - getLongStringClient: callback for creating a long string grip client
* - releaseActor: callback for releasing an actor when it's no longer needed
* - overrideValueEvalMacro: callback for creating an overriding eval macro
@ -52,7 +52,7 @@ this.EXPORTED_SYMBOLS = ["VariablesViewController"];
function VariablesViewController(aView, aOptions) {
this.addExpander = this.addExpander.bind(this);
this._getGripClient = aOptions.getGripClient;
this._getObjectClient = aOptions.getObjectClient;
this._getLongStringClient = aOptions.getLongStringClient;
this._releaseActor = aOptions.releaseActor;
@ -132,7 +132,7 @@ VariablesViewController.prototype = {
_populateFromObject: function(aTarget, aGrip) {
let deferred = promise.defer();
this._getGripClient(aGrip).getPrototypeAndProperties(aResponse => {
this._getObjectClient(aGrip).getPrototypeAndProperties(aResponse => {
let { ownProperties, prototype } = aResponse;
// safeGetterValues is new and isn't necessary defined on old actors
let safeGetterValues = aResponse.safeGetterValues || {};

Просмотреть файл

@ -26,7 +26,7 @@ loader.lazyGetter(this, "ConsoleOutput",
() => require("devtools/webconsole/console-output").ConsoleOutput);
loader.lazyGetter(this, "Messages",
() => require("devtools/webconsole/console-output").Messages);
loader.lazyImporter(this, "GripClient", "resource://gre/modules/devtools/dbg-client.jsm");
loader.lazyImporter(this, "ObjectClient", "resource://gre/modules/devtools/dbg-client.jsm");
loader.lazyImporter(this, "VariablesView", "resource:///modules/devtools/VariablesView.jsm");
loader.lazyImporter(this, "VariablesViewController", "resource:///modules/devtools/VariablesViewController.jsm");
@ -3422,8 +3422,8 @@ JSTerm.prototype = {
view.lazyAppend = this._lazyVariablesView;
VariablesViewController.attach(view, {
getGripClient: aGrip => {
return new GripClient(this.hud.proxy.client, aGrip);
getObjectClient: aGrip => {
return new ObjectClient(this.hud.proxy.client, aGrip);
},
getLongStringClient: aGrip => {
return this.webConsoleClient.longString(aGrip);

Просмотреть файл

@ -15,7 +15,7 @@ this.EXPORTED_SYMBOLS = ["DebuggerTransport",
"RootClient",
"debuggerSocketConnect",
"LongStringClient",
"GripClient"];
"ObjectClient"];
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
@ -1518,7 +1518,7 @@ ThreadClient.prototype = {
},
/**
* Return a GripClient object for the given object grip.
* Return a ObjectClient object for the given object grip.
*
* @param aGrip object
* A pause-lifetime object grip returned by the protocol.
@ -1528,7 +1528,7 @@ ThreadClient.prototype = {
return this._pauseGrips[aGrip.actor];
}
let client = new GripClient(this._client, aGrip);
let client = new ObjectClient(this._client, aGrip);
this._pauseGrips[aGrip.actor] = client;
return client;
},
@ -1581,7 +1581,7 @@ ThreadClient.prototype = {
* @param aGripCacheName
* The property name of the grip cache we want to clear.
*/
_clearGripClients: function TC_clearGrips(aGripCacheName) {
_clearObjectClients: function TC_clearGrips(aGripCacheName) {
for each (let grip in this[aGripCacheName]) {
grip.valid = false;
}
@ -1593,7 +1593,7 @@ ThreadClient.prototype = {
* clients.
*/
_clearPauseGrips: function TC_clearPauseGrips() {
this._clearGripClients("_pauseGrips");
this._clearObjectClients("_pauseGrips");
},
/**
@ -1601,7 +1601,7 @@ ThreadClient.prototype = {
* clients.
*/
_clearThreadGrips: function TC_clearPauseGrips() {
this._clearGripClients("_threadGrips");
this._clearObjectClients("_threadGrips");
},
/**
@ -1758,14 +1758,14 @@ eventSource(TraceClient.prototype);
* @param aGrip object
* A pause-lifetime object grip returned by the protocol.
*/
function GripClient(aClient, aGrip)
function ObjectClient(aClient, aGrip)
{
this._grip = aGrip;
this._client = aClient;
this.request = this._client.request;
}
GripClient.prototype = {
ObjectClient.prototype = {
get actor() { return this._grip.actor },
get _transport() { return this._client._transport; },

Просмотреть файл

@ -41,7 +41,7 @@ function onEvaluate(aState, aResponse)
ok(!aResponse.helperResult, "no helper result");
onInspect = onInspect.bind(null, aState);
let client = new GripClient(aState.dbgClient, aResponse.result);
let client = new ObjectClient(aState.dbgClient, aResponse.result);
client.getPrototypeAndProperties(onInspect);
}

Просмотреть файл

@ -154,7 +154,7 @@ function onConsoleCall(aState, aType, aPacket)
let args = aPacket.message.arguments;
onProperties = onProperties.bind(null, aState);
let client = new GripClient(aState.dbgClient, args[1]);
let client = new ObjectClient(aState.dbgClient, args[1]);
client.getPrototypeAndProperties(onProperties);
}

Просмотреть файл

@ -75,7 +75,7 @@ function onConsoleCall(aState, aType, aPacket)
let args = aPacket.message.arguments;
onProperties = onProperties.bind(null, aState);
let client = new GripClient(aState.dbgClient, args[1]);
let client = new ObjectClient(aState.dbgClient, args[1]);
client.getPrototypeAndProperties(onProperties);
}

Просмотреть файл

@ -54,7 +54,7 @@ function onConsoleCall(aState, aType, aPacket)
let args = aPacket.message.arguments;
onProperties = onProperties.bind(null, aState);
let client = new GripClient(aState.dbgClient, args[1]);
let client = new ObjectClient(aState.dbgClient, args[1]);
client.getPrototypeAndProperties(onProperties);
}