objectId : {
injectedScriptId : <number>
id : <number>
- groupName : "test"
}
type : "object"
description : "TestObject"
}
-----------------------------------------------------------
-RuntimeAgent.evaluateOn({"injectedScriptId":<number>,"id":<number>,"groupName":"test"},"this.assignedByEvaluateOn = \"evaluateOn function works fine\";")
+RuntimeAgent.evaluateOn({"injectedScriptId":<number>,"id":<number>},"this.assignedByEvaluateOn = \"evaluateOn function works fine\";")
request:
{
objectId : {
injectedScriptId : <number>
id : <number>
- groupName : "test"
}
expression : "this.assignedByEvaluateOn = "evaluateOn function works fine";"
}
}
-----------------------------------------------------------
-RuntimeAgent.setPropertyValue({"injectedScriptId":<number>,"id":<number>,"groupName":"test"},"assignedBySetPropertyValue","true")
+RuntimeAgent.setPropertyValue({"injectedScriptId":<number>,"id":<number>},"assignedBySetPropertyValue","true")
request:
{
objectId : {
injectedScriptId : <number>
id : <number>
- groupName : "test"
}
propertyName : "assignedBySetPropertyValue"
expression : "true"
}
-----------------------------------------------------------
-RuntimeAgent.setPropertyValue({"injectedScriptId":<number>,"id":<number>,"groupName":"test"},"removedBySetPropertyValue","")
+RuntimeAgent.setPropertyValue({"injectedScriptId":<number>,"id":<number>},"removedBySetPropertyValue","")
request:
{
objectId : {
injectedScriptId : <number>
id : <number>
- groupName : "test"
}
propertyName : "removedBySetPropertyValue"
expression : ""
}
-----------------------------------------------------------
-RuntimeAgent.getProperties({"injectedScriptId":<number>,"id":<number>,"groupName":"test"},false,false)
+RuntimeAgent.getProperties({"injectedScriptId":<number>,"id":<number>},false,false)
request:
{
objectId : {
injectedScriptId : <number>
id : <number>
- groupName : "test"
}
ignoreHasOwnProperty : false
abbreviate : false
objectId : {
injectedScriptId : <number>
id : <number>
- groupName : "test"
}
type : "object"
description : "TestObject"
}
-----------------------------------------------------------
-RuntimeAgent.releaseObject({"injectedScriptId":<number>,"id":<number>,"groupName":"test"})
+RuntimeAgent.releaseObject({"injectedScriptId":<number>,"id":<number>})
request:
{
objectId : {
injectedScriptId : <number>
id : <number>
- groupName : "test"
}
}
}
{
this._lastBoundObjectId = 1;
this._idToWrappedObject = {};
+ this._idToObjectGroupName = {};
this._objectGroups = {};
}
this._objectGroups[objectGroupName] = group;
}
group.push(id);
- objectId.groupName = objectGroupName;
+ this._idToObjectGroupName[id] = objectGroupName;
}
}
return InjectedScript.RemoteObject.fromObject(object, objectId, abbreviate);
if (!group)
return;
for (var i = 0; i < group.length; i++)
- delete this._idToWrappedObject[group[i]];
+ this._releaseObject(group[i]);
delete this._objectGroups[objectGroupName];
},
{
var parsedObjectId = this._parseObjectId(objectId);
var object = this._objectForId(parsedObjectId);
+ var objectGroupName = this._idToObjectGroupName[parsedObjectId.id];
if (!this._isDefined(object))
return false;
var isGetter = object["__lookupGetter__"] && object.__lookupGetter__(propertyName);
if (!isGetter) {
try {
- property.value = this._wrapObject(object[propertyName], parsedObjectId.groupName, abbreviate);
+ property.value = this._wrapObject(object[propertyName], objectGroupName, abbreviate);
} catch(e) {
property.value = new InjectedScript.RemoteObject.fromException(e);
}
releaseObject: function(objectId)
{
var parsedObjectId = this._parseObjectId(objectId);
- delete this._idToWrappedObject[parsedObjectId.id];
+ this._releaseObject(parsedObjectId.id);
+ },
+
+ _releaseObject: function(id)
+ {
+ delete this._idToWrappedObject[id];
+ delete this._idToObjectGroupName[id];
},
_populatePropertyNames: function(object, resultSet)