| Index: Source/core/inspector/InjectedScriptSource.js
|
| diff --git a/Source/core/inspector/InjectedScriptSource.js b/Source/core/inspector/InjectedScriptSource.js
|
| index f19222580644d20339a30fabdfe6b4d83301d94a..e63edab3f577d8fb751d991f9aef0ebfa039b8e3 100644
|
| --- a/Source/core/inspector/InjectedScriptSource.js
|
| +++ b/Source/core/inspector/InjectedScriptSource.js
|
| @@ -110,6 +110,17 @@ function nullifyObjectProto(obj)
|
| }
|
|
|
| /**
|
| + * @param {string} name
|
| + * @return {boolean}
|
| + */
|
| +function isArrayIndexPropertyName(name)
|
| +{
|
| + // Array index check according to the ES5-15.4.
|
| + var index = name >>> 0;
|
| + return toString(index) === name && index !== 0xffffffff;
|
| +}
|
| +
|
| +/**
|
| * @constructor
|
| */
|
| var InjectedScript = function()
|
| @@ -1012,8 +1023,9 @@ InjectedScript.RemoteObject.prototype = {
|
| descriptors.push(nameToDescriptors["#" + firstLevelKeys[i]]);
|
| }
|
|
|
| + var isArray = (this.subtype === "array");
|
| for (var i = 0; i < descriptors.length; ++i) {
|
| - if (propertiesThreshold.indexes < 0 || propertiesThreshold.properties < 0)
|
| + if (propertiesThreshold.indexes < 0 && propertiesThreshold.properties < 0)
|
| break;
|
|
|
| var descriptor = descriptors[i];
|
| @@ -1023,13 +1035,15 @@ InjectedScript.RemoteObject.prototype = {
|
| preview.lossless = false;
|
| continue;
|
| }
|
| - if (!descriptor.enumerable && !descriptor.isOwn)
|
| - continue;
|
|
|
| var name = descriptor.name;
|
| if (name === "__proto__")
|
| continue;
|
| - if (this.subtype === "array" && name === "length")
|
| + if (isArray && name === "length")
|
| + continue;
|
| +
|
| + var isArrayIndex = isArray && isArrayIndexPropertyName(name);
|
| + if (!descriptor.enumerable && !descriptor.isOwn && !isArrayIndex)
|
| continue;
|
|
|
| if (!("value" in descriptor)) {
|
| @@ -1097,11 +1111,12 @@ InjectedScript.RemoteObject.prototype = {
|
| */
|
| _appendPropertyPreview: function(preview, property, propertiesThreshold)
|
| {
|
| - if (toString(property.name >>> 0) === property.name)
|
| - propertiesThreshold.indexes--;
|
| + var threshold;
|
| + if (isArrayIndexPropertyName(property.name))
|
| + threshold = --propertiesThreshold.indexes;
|
| else
|
| - propertiesThreshold.properties--;
|
| - if (propertiesThreshold.indexes < 0 || propertiesThreshold.properties < 0) {
|
| + threshold = --propertiesThreshold.properties;
|
| + if (threshold < 0) {
|
| preview.overflow = true;
|
| preview.lossless = false;
|
| } else {
|
|
|