Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 780 /** | 780 /** |
| 781 * @param {!DebuggerAgent.BreakpointId} breakpointId | 781 * @param {!DebuggerAgent.BreakpointId} breakpointId |
| 782 * @param {function(!WebInspector.Event)} listener | 782 * @param {function(!WebInspector.Event)} listener |
| 783 * @param {!Object=} thisObject | 783 * @param {!Object=} thisObject |
| 784 */ | 784 */ |
| 785 removeBreakpointListener: function(breakpointId, listener, thisObject) | 785 removeBreakpointListener: function(breakpointId, listener, thisObject) |
| 786 { | 786 { |
| 787 this._breakpointResolvedEventTarget.removeEventListener(breakpointId, li stener, thisObject); | 787 this._breakpointResolvedEventTarget.removeEventListener(breakpointId, li stener, thisObject); |
| 788 }, | 788 }, |
| 789 | 789 |
| 790 /** | |
| 791 * @param {!Array<string>} patterns | |
| 792 * @return {!Promise<boolean>} | |
| 793 */ | |
| 794 setBlackboxPatterns: function(patterns) | |
| 795 { | |
| 796 return new Promise(setBlackboxPatterns.bind(this)); | |
|
dgozman
2016/04/20 02:06:40
Let's use lushnikov's wisdom!
| |
| 797 | |
| 798 /** | |
| 799 * @param {function(?)} fulfill | |
| 800 * @param {function(*)} reject | |
| 801 * @this {WebInspector.DebuggerModel} | |
| 802 */ | |
| 803 function setBlackboxPatterns(fulfill, reject) | |
| 804 { | |
| 805 this._agent.setBlackboxPatterns(patterns, callback); | |
| 806 /** | |
| 807 * @param {?Protocol.Error} error | |
| 808 */ | |
| 809 function callback(error) | |
| 810 { | |
| 811 if (error) | |
| 812 console.error(error); | |
| 813 fulfill(!error); | |
| 814 } | |
| 815 } | |
| 816 }, | |
| 790 | 817 |
| 791 /** | 818 /** |
| 792 * @param {!WebInspector.Event} event | 819 * @param {!WebInspector.Event} event |
| 793 */ | 820 */ |
| 794 _targetDisposed: function(event) | 821 _targetDisposed: function(event) |
| 795 { | 822 { |
| 796 var target = /** @type {!WebInspector.Target} */ (event.data); | 823 var target = /** @type {!WebInspector.Target} */ (event.data); |
| 797 if (target != this.target()) | 824 if (target != this.target()) |
| 798 return; | 825 return; |
| 799 WebInspector.moduleSetting("pauseOnExceptionEnabled").removeChangeListen er(this._pauseOnExceptionStateChanged, this); | 826 WebInspector.moduleSetting("pauseOnExceptionEnabled").removeChangeListen er(this._pauseOnExceptionStateChanged, this); |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1324 /** | 1351 /** |
| 1325 * @param {?WebInspector.Target} target | 1352 * @param {?WebInspector.Target} target |
| 1326 * @return {?WebInspector.DebuggerModel} | 1353 * @return {?WebInspector.DebuggerModel} |
| 1327 */ | 1354 */ |
| 1328 WebInspector.DebuggerModel.fromTarget = function(target) | 1355 WebInspector.DebuggerModel.fromTarget = function(target) |
| 1329 { | 1356 { |
| 1330 if (!target || !target.hasJSContext()) | 1357 if (!target || !target.hasJSContext()) |
| 1331 return null; | 1358 return null; |
| 1332 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); | 1359 return /** @type {?WebInspector.DebuggerModel} */ (target.model(WebInspector .DebuggerModel)); |
| 1333 } | 1360 } |
| OLD | NEW |