| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }; |
| OLD | NEW |