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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js

Issue 2102453003: [DevTools] Move collectionEntries to internalProperties in protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
index 0e0c4f8d28065b05a5f348091ce7784c29cfe994..d6bdba8b466aacd25b413eb55bec4c8a24de91ac 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js
@@ -827,19 +827,24 @@ InjectedScript.RemoteObject.prototype = {
// Add internal properties to preview.
var rawInternalProperties = InjectedScriptHost.getInternalProperties(object) || [];
var internalProperties = [];
+ var entries = null;
for (var i = 0; i < rawInternalProperties.length; i += 2) {
- push(internalProperties, {
- name: rawInternalProperties[i],
- value: rawInternalProperties[i + 1],
- isOwn: true,
- enumerable: true,
- __proto__: null
- });
+ if (rawInternalProperties[i] !== "[[Entries]]") {
dgozman 2016/06/28 01:20:47 if (.... === entries) { ... continue; }
kozy 2016/06/28 18:41:49 Done.
+ push(internalProperties, {
+ name: rawInternalProperties[i],
+ value: rawInternalProperties[i + 1],
+ isOwn: true,
+ enumerable: true,
+ __proto__: null
+ });
+ } else {
+ entries = /** @type {!Array<*>} */(rawInternalProperties[i + 1]);
+ }
}
this._appendPropertyDescriptors(preview, internalProperties, propertiesThreshold, secondLevelKeys, isTable);
if (this.subtype === "map" || this.subtype === "set" || this.subtype === "iterator")
- this._appendEntriesPreview(object, preview, skipEntriesPreview);
+ this._appendEntriesPreview(entries, preview, skipEntriesPreview);
} catch (e) {}
@@ -947,13 +952,12 @@ InjectedScript.RemoteObject.prototype = {
},
/**
- * @param {!Object} object
+ * @param {?Array<*>} entries
* @param {!RuntimeAgent.ObjectPreview} preview
* @param {boolean=} skipEntriesPreview
*/
- _appendEntriesPreview: function(object, preview, skipEntriesPreview)
+ _appendEntriesPreview: function(entries, preview, skipEntriesPreview)
{
- var entries = InjectedScriptHost.collectionEntries(object);
if (!entries)
return;
if (skipEntriesPreview) {

Powered by Google App Engine
This is Rietveld 408576698