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

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

Issue 1141553003: DevTools: make getInternalProperties work when Debugger is not enabled (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed failing test Created 5 years, 7 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/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp ('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 dacd06463036f8475994f70f69ee13414b634d17..8c9a9b1e16e46790ca25701c53aed77def13d76b 100644
--- a/Source/core/inspector/InjectedScriptSource.js
+++ b/Source/core/inspector/InjectedScriptSource.js
@@ -482,11 +482,10 @@ InjectedScript.prototype = {
var descriptors = [];
var internalProperties = InjectedScriptHost.getInternalProperties(object);
if (internalProperties) {
- for (var i = 0; i < internalProperties.length; i++) {
- var property = internalProperties[i];
+ for (var i = 0; i < internalProperties.length; i += 2) {
var descriptor = {
- name: property.name,
- value: this._wrapObject(property.value, objectGroupName),
+ name: internalProperties[i],
+ value: this._wrapObject(internalProperties[i + 1], objectGroupName),
__proto__: null
};
push(descriptors, descriptor);
@@ -1398,11 +1397,16 @@ InjectedScript.RemoteObject.prototype = {
return preview;
// Add internal properties to preview.
- var internalProperties = InjectedScriptHost.getInternalProperties(object) || [];
- for (var i = 0; i < internalProperties.length; ++i) {
- internalProperties[i] = nullifyObjectProto(internalProperties[i]);
- internalProperties[i].isOwn = true;
- internalProperties[i].enumerable = true;
+ var rawInternalProperties = InjectedScriptHost.getInternalProperties(object) || [];
+ var internalProperties = [];
+ for (var i = 0; i < rawInternalProperties.length; i += 2) {
+ push(internalProperties, {
+ name: rawInternalProperties[i],
+ value: rawInternalProperties[i + 1],
+ isOwn: true,
+ enumerable: true,
+ __proto__: null
+ });
}
this._appendPropertyDescriptors(preview, internalProperties, propertiesThreshold, secondLevelKeys, isTable);
« no previous file with comments | « Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698