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

Side by Side Diff: webkit/glue/devtools/js/inject.js

Issue 160385: DevTools: Do not list getter functions in object properties. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Javascript that is being injected into the inspectable page 6 * @fileoverview Javascript that is being injected into the inspectable page
7 * while debugging. 7 * while debugging.
8 */ 8 */
9 goog.provide('devtools.Injected'); 9 goog.provide('devtools.Injected');
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if (!obj) { 91 if (!obj) {
92 return []; 92 return [];
93 } 93 }
94 94
95 // Go over properties, prepare results. 95 // Go over properties, prepare results.
96 for (var name in obj) { 96 for (var name in obj) {
97 if (protoDepth != -1 && 'hasOwnProperty' in obj && 97 if (protoDepth != -1 && 'hasOwnProperty' in obj &&
98 !obj.hasOwnProperty(name)) { 98 !obj.hasOwnProperty(name)) {
99 continue; 99 continue;
100 } 100 }
101 if (obj['__lookupGetter__'] && obj.__lookupGetter__(name)) {
102 continue;
103 }
104
101 var value = obj[name]; 105 var value = obj[name];
102 var type = typeof value; 106 var type = typeof value;
103 result.push(type); 107 result.push(type);
104 result.push(name); 108 result.push(name);
105 if (type == 'string') { 109 if (type == 'string') {
106 var str = value; 110 var str = value;
107 result.push(str.length > 99 ? str.substr(0, 99) + '...' : str); 111 result.push(str.length > 99 ? str.substr(0, 99) + '...' : str);
108 result.push(undefined); 112 result.push(undefined);
109 } else if (type == 'function') { 113 } else if (type == 'function') {
110 result.push(undefined); 114 result.push(undefined);
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 582
579 583
580 /** 584 /**
581 * Dispatches given method with given args on the host object. 585 * Dispatches given method with given args on the host object.
582 * @param {string} method Method name. 586 * @param {string} method Method name.
583 */ 587 */
584 devtools.Injected.prototype.InspectorController = function(method, var_args) { 588 devtools.Injected.prototype.InspectorController = function(method, var_args) {
585 var args = Array.prototype.slice.call(arguments, 1); 589 var args = Array.prototype.slice.call(arguments, 1);
586 return InspectorController[method].apply(InspectorController, args); 590 return InspectorController[method].apply(InspectorController, args);
587 }; 591 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698