Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: Source/core/inspector/InjectedScriptSource.js

Issue 312143003: This fixes bug with trying to get properties of non-object (symbol). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address review comments Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InjectedScriptExterns.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InjectedScriptSource.js
diff --git a/Source/core/inspector/InjectedScriptSource.js b/Source/core/inspector/InjectedScriptSource.js
index b60be3e95288e365eddde8188f7fb2b7acba3747..5c09e129498d56209e0399efec7b3b0953d256db 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) || typeof object !== "object")
aandrey 2014/06/04 15:39:08 I think "console.dir(function(){})" will no longer
Alexandra Mikhaylova 2014/06/05 13:27:43 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) || typeof object !== "object")
return false;
var descriptors = [];
var internalProperties = InjectedScriptHost.getInternalProperties(object);
@@ -874,7 +874,7 @@ InjectedScript.prototype = {
/**
* @param {Object} objectId
- * @return {Object}
+ * @return {Object|symbol}
*/
_objectForId: function(objectId)
{
@@ -883,7 +883,7 @@ InjectedScript.prototype = {
/**
* @param {string} objectId
- * @return {Object}
+ * @return {Object|symbol}
*/
findObjectById: function(objectId)
{
« no previous file with comments | « Source/core/inspector/InjectedScriptExterns.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698