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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js

Issue 1685683006: DevTools: [Console] speedup array autocompletion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 10 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 | « third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-completions-on-call-frame.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
index d5a8cd049f92b6eee08e983864fce5919a438035..91933f123096f7270521623cf66f6eb4bf0d5253 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
@@ -451,8 +451,13 @@ WebInspector.ExecutionContext.prototype = {
if (type === "array" && o === object && ArrayBuffer.isView(o) && o.length > 9999)
continue;
var names = Object.getOwnPropertyNames(o);
- for (var i = 0; i < names.length; ++i)
+ var isArray = Array.isArray(o);
+ for (var i = 0; i < names.length; ++i) {
+ // Skip array elements indexes.
+ if (isArray && /^[0-9]/.test(names[i]))
+ continue;
resultSet[names[i]] = true;
+ }
} catch (e) {
}
}
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sources/debugger/debugger-completions-on-call-frame.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698