| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 object = new Boolean(false); | 444 object = new Boolean(false); |
| 445 else | 445 else |
| 446 object = this; | 446 object = this; |
| 447 | 447 |
| 448 var resultSet = {}; | 448 var resultSet = {}; |
| 449 for (var o = object; o; o = o.__proto__) { | 449 for (var o = object; o; o = o.__proto__) { |
| 450 try { | 450 try { |
| 451 if (type === "array" && o === object && ArrayBuffer.isVi
ew(o) && o.length > 9999) | 451 if (type === "array" && o === object && ArrayBuffer.isVi
ew(o) && o.length > 9999) |
| 452 continue; | 452 continue; |
| 453 var names = Object.getOwnPropertyNames(o); | 453 var names = Object.getOwnPropertyNames(o); |
| 454 for (var i = 0; i < names.length; ++i) | 454 var isArray = Array.isArray(o); |
| 455 for (var i = 0; i < names.length; ++i) { |
| 456 // Skip array elements indexes. |
| 457 if (isArray && /^[0-9]/.test(names[i])) |
| 458 continue; |
| 455 resultSet[names[i]] = true; | 459 resultSet[names[i]] = true; |
| 460 } |
| 456 } catch (e) { | 461 } catch (e) { |
| 457 } | 462 } |
| 458 } | 463 } |
| 459 return resultSet; | 464 return resultSet; |
| 460 } | 465 } |
| 461 | 466 |
| 462 if (result.type === "object" || result.type === "function") | 467 if (result.type === "object" || result.type === "function") |
| 463 result.callFunctionJSON(getCompletions, [WebInspector.RemoteObje
ct.toCallArgument(result.subtype)], receivedPropertyNames.bind(this)); | 468 result.callFunctionJSON(getCompletions, [WebInspector.RemoteObje
ct.toCallArgument(result.subtype)], receivedPropertyNames.bind(this)); |
| 464 else if (result.type === "string" || result.type === "number" || res
ult.type === "boolean") | 469 else if (result.type === "string" || result.type === "number" || res
ult.type === "boolean") |
| 465 this.evaluate("(" + getCompletions + ")(\"" + result.type + "\")
", "completion", false, true, true, false, receivedPropertyNamesFromEval.bind(th
is)); | 470 this.evaluate("(" + getCompletions + ")(\"" + result.type + "\")
", "completion", false, true, true, false, receivedPropertyNamesFromEval.bind(th
is)); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 /** | 686 /** |
| 682 * @param {string} listenerType | 687 * @param {string} listenerType |
| 683 */ | 688 */ |
| 684 setListenerType: function(listenerType) | 689 setListenerType: function(listenerType) |
| 685 { | 690 { |
| 686 this._listenerType = listenerType; | 691 this._listenerType = listenerType; |
| 687 }, | 692 }, |
| 688 | 693 |
| 689 __proto__: WebInspector.SDKObject.prototype | 694 __proto__: WebInspector.SDKObject.prototype |
| 690 } | 695 } |
| OLD | NEW |