git://git.webkit.org
/
WebKit-https.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2011-03-08 Ilya Tikhonovsky <loislo@chromium.org>
[WebKit-https.git]
/
Source
/
WebCore
/
inspector
/
InjectedScriptSource.js
diff --git
a/Source/WebCore/inspector/InjectedScriptSource.js
b/Source/WebCore/inspector/InjectedScriptSource.js
index 9c662e80039114708b7ab65bb32a4bf8d95e47be..c11475033b0f4b5f17c76dea02b48dce0235f719 100644
(file)
--- a/
Source/WebCore/inspector/InjectedScriptSource.js
+++ b/
Source/WebCore/inspector/InjectedScriptSource.js
@@
-46,6
+46,7
@@
var InjectedScript = function()
{
this._lastBoundObjectId = 1;
this._idToWrappedObject = {};
{
this._lastBoundObjectId = 1;
this._idToWrappedObject = {};
+ this._idToObjectGroupName = {};
this._objectGroups = {};
}
this._objectGroups = {};
}
@@
-104,7
+105,7
@@
InjectedScript.prototype = {
this._objectGroups[objectGroupName] = group;
}
group.push(id);
this._objectGroups[objectGroupName] = group;
}
group.push(id);
-
objectId.groupName
= objectGroupName;
+
this._idToObjectGroupName[id]
= objectGroupName;
}
}
return InjectedScript.RemoteObject.fromObject(object, objectId, abbreviate);
}
}
return InjectedScript.RemoteObject.fromObject(object, objectId, abbreviate);
@@
-124,7
+125,7
@@
InjectedScript.prototype = {
if (!group)
return;
for (var i = 0; i < group.length; i++)
if (!group)
return;
for (var i = 0; i < group.length; i++)
-
delete this._idToWrappedObject[group[i]]
;
+
this._releaseObject(group[i])
;
delete this._objectGroups[objectGroupName];
},
delete this._objectGroups[objectGroupName];
},
@@
-143,6
+144,7
@@
InjectedScript.prototype = {
{
var parsedObjectId = this._parseObjectId(objectId);
var object = this._objectForId(parsedObjectId);
{
var parsedObjectId = this._parseObjectId(objectId);
var object = this._objectForId(parsedObjectId);
+ var objectGroupName = this._idToObjectGroupName[parsedObjectId.id];
if (!this._isDefined(object))
return false;
if (!this._isDefined(object))
return false;
@@
-161,7
+163,7
@@
InjectedScript.prototype = {
var isGetter = object["__lookupGetter__"] && object.__lookupGetter__(propertyName);
if (!isGetter) {
try {
var isGetter = object["__lookupGetter__"] && object.__lookupGetter__(propertyName);
if (!isGetter) {
try {
- property.value = this._wrapObject(object[propertyName],
parsedObjectId.g
roupName, abbreviate);
+ property.value = this._wrapObject(object[propertyName],
objectG
roupName, abbreviate);
} catch(e) {
property.value = new InjectedScript.RemoteObject.fromException(e);
}
} catch(e) {
property.value = new InjectedScript.RemoteObject.fromException(e);
}
@@
-213,7
+215,13
@@
InjectedScript.prototype = {
releaseObject: function(objectId)
{
var parsedObjectId = this._parseObjectId(objectId);
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)
},
_populatePropertyNames: function(object, resultSet)