| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 this.hasChildren = true; | 597 this.hasChildren = true; |
| 598 } | 598 } |
| 599 | 599 |
| 600 WebInspector.FunctionScopeMainTreeElement.prototype = { | 600 WebInspector.FunctionScopeMainTreeElement.prototype = { |
| 601 onpopulate: function() | 601 onpopulate: function() |
| 602 { | 602 { |
| 603 if (this.children.length && !this.shouldRefreshChildren) | 603 if (this.children.length && !this.shouldRefreshChildren) |
| 604 return; | 604 return; |
| 605 | 605 |
| 606 /** | 606 /** |
| 607 * @param {?Protocol.Error} error | 607 * @param {?DebuggerAgent.FunctionDetails} response |
| 608 * @param {!DebuggerAgent.FunctionDetails} response | |
| 609 * @this {WebInspector.FunctionScopeMainTreeElement} | 608 * @this {WebInspector.FunctionScopeMainTreeElement} |
| 610 */ | 609 */ |
| 611 function didGetDetails(error, response) | 610 function didGetDetails(response) |
| 612 { | 611 { |
| 613 if (error) { | 612 if (!response) |
| 614 console.error(error); | |
| 615 return; | 613 return; |
| 616 } | |
| 617 this.removeChildren(); | 614 this.removeChildren(); |
| 618 | 615 |
| 619 var scopeChain = response.scopeChain; | 616 var scopeChain = response.scopeChain; |
| 620 if (!scopeChain) | 617 if (!scopeChain) |
| 621 return; | 618 return; |
| 622 for (var i = 0; i < scopeChain.length; ++i) { | 619 for (var i = 0; i < scopeChain.length; ++i) { |
| 623 var scope = scopeChain[i]; | 620 var scope = scopeChain[i]; |
| 624 var title = null; | 621 var title = null; |
| 625 var isTrueObject; | 622 var isTrueObject; |
| 626 | 623 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 var property = runtimeModel.createScopedObject(title, remote
Object); | 655 var property = runtimeModel.createScopedObject(title, remote
Object); |
| 659 property.parentObject = null; | 656 property.parentObject = null; |
| 660 this.appendChild(new this.treeOutline.section.treeElementCon
structor(property)); | 657 this.appendChild(new this.treeOutline.section.treeElementCon
structor(property)); |
| 661 } else { | 658 } else { |
| 662 var scopeTreeElement = new WebInspector.ScopeTreeElement(tit
le, null, remoteObject); | 659 var scopeTreeElement = new WebInspector.ScopeTreeElement(tit
le, null, remoteObject); |
| 663 this.appendChild(scopeTreeElement); | 660 this.appendChild(scopeTreeElement); |
| 664 } | 661 } |
| 665 } | 662 } |
| 666 | 663 |
| 667 } | 664 } |
| 668 DebuggerAgent.getFunctionDetails(this._remoteObject.objectId, didGetDeta
ils.bind(this)); | 665 this._remoteObject.functionDetails(didGetDetails.bind(this)); |
| 669 }, | 666 }, |
| 670 | 667 |
| 671 __proto__: TreeElement.prototype | 668 __proto__: TreeElement.prototype |
| 672 } | 669 } |
| 673 | 670 |
| 674 /** | 671 /** |
| 675 * @constructor | 672 * @constructor |
| 676 * @extends {TreeElement} | 673 * @extends {TreeElement} |
| 677 * @param {!WebInspector.RemoteObject} remoteObject | 674 * @param {!WebInspector.RemoteObject} remoteObject |
| 678 */ | 675 */ |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 { | 984 { |
| 988 WebInspector.TextPrompt.call(this, WebInspector.runtimeModel.completionsForT
extPrompt.bind(WebInspector.runtimeModel)); | 985 WebInspector.TextPrompt.call(this, WebInspector.runtimeModel.completionsForT
extPrompt.bind(WebInspector.runtimeModel)); |
| 989 this.setSuggestBoxEnabled("generic-suggest"); | 986 this.setSuggestBoxEnabled("generic-suggest"); |
| 990 if (renderAsBlock) | 987 if (renderAsBlock) |
| 991 this.renderAsBlock(); | 988 this.renderAsBlock(); |
| 992 } | 989 } |
| 993 | 990 |
| 994 WebInspector.ObjectPropertyPrompt.prototype = { | 991 WebInspector.ObjectPropertyPrompt.prototype = { |
| 995 __proto__: WebInspector.TextPrompt.prototype | 992 __proto__: WebInspector.TextPrompt.prototype |
| 996 } | 993 } |
| OLD | NEW |