Chromium Code Reviews| Index: Source/core/inspector/InjectedScriptSource.js |
| diff --git a/Source/core/inspector/InjectedScriptSource.js b/Source/core/inspector/InjectedScriptSource.js |
| index b60be3e95288e365eddde8188f7fb2b7acba3747..7388835d1d222accdebda2d11a6e90d401b2a8fa 100644 |
| --- a/Source/core/inspector/InjectedScriptSource.js |
| +++ b/Source/core/inspector/InjectedScriptSource.js |
| @@ -383,7 +383,7 @@ InjectedScript.prototype = { |
| var object = this._objectForId(parsedObjectId); |
| var objectGroupName = this._idToObjectGroupName[parsedObjectId.id]; |
| - if (!this._isDefined(object)) |
| + if (!this._isDefined(object) || this._isSymbol(object)) |
|
aandrey
2014/06/04 13:03:51
typeof object !== "object"
Alexandra Mikhaylova
2014/06/04 14:08:37
Done.
|
| return false; |
| var descriptors = this._propertyDescriptors(object, ownProperties, accessorPropertiesOnly); |
| @@ -415,7 +415,7 @@ InjectedScript.prototype = { |
| var parsedObjectId = this._parseObjectId(objectId); |
| var object = this._objectForId(parsedObjectId); |
| var objectGroupName = this._idToObjectGroupName[parsedObjectId.id]; |
| - if (!this._isDefined(object)) |
| + if (!this._isDefined(object) || this._isSymbol(object)) |
|
aandrey
2014/06/04 13:03:51
ditto
Alexandra Mikhaylova
2014/06/04 14:08:37
Done.
|
| return false; |
| var descriptors = []; |
| var internalProperties = InjectedScriptHost.getInternalProperties(object); |
| @@ -497,8 +497,7 @@ InjectedScript.prototype = { |
| continue; |
| var name = property; |
| - var type = typeof property; |
| - if (type === "symbol") |
| + if (injectedScript._isSymbol(property)) |
|
aandrey
2014/06/04 13:03:51
revert
Alexandra Mikhaylova
2014/06/04 14:08:37
Done.
|
| name = injectedScript._describe(property); |
| try { |
| @@ -532,7 +531,7 @@ InjectedScript.prototype = { |
| descriptor.name = name; |
| if (o === object) |
| descriptor.isOwn = true; |
| - if (type === "symbol") |
| + if (injectedScript._isSymbol(property)) |
| descriptor.symbol = property; |
| push(descriptors, descriptor); |
| } |
| @@ -874,7 +873,7 @@ InjectedScript.prototype = { |
| /** |
| * @param {Object} objectId |
| - * @return {Object} |
| + * @return {Object|symbol} |
| */ |
| _objectForId: function(objectId) |
| { |
| @@ -950,6 +949,16 @@ InjectedScript.prototype = { |
| }, |
| /** |
| + * @param {*} object |
| + * @return {boolean} |
| + */ |
| + _isSymbol: function(object) |
| + { |
| + var type = typeof object; |
| + return (type === "symbol"); |
| + }, |
| + |
| + /** |
| * @param {*} obj |
| * @return {string?} |
| */ |