Chromium Code Reviews| 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 502 expression, | 502 expression, |
| 503 objectGroup, | 503 objectGroup, |
| 504 includeCommandLineAPI, | 504 includeCommandLineAPI, |
| 505 silent, | 505 silent, |
| 506 returnByValue, | 506 returnByValue, |
| 507 generatePreview, | 507 generatePreview, |
| 508 userGesture, | 508 userGesture, |
| 509 callback) { | 509 callback) { |
| 510 // FIXME: It will be moved to separate ExecutionContext. | 510 // FIXME: It will be moved to separate ExecutionContext. |
| 511 if (this.debuggerModel.selectedCallFrame()) { | 511 if (this.debuggerModel.selectedCallFrame()) { |
| 512 this.debuggerModel.evaluateOnSelectedCallFrame( | 512 this.debuggerModel.evaluateOnSelectedCallFrame( |
|
einbinder
2017/03/02 01:48:56
Did you test this behavior? Expression will be 'th
dgozman
2017/03/03 23:27:14
Works nicely.
| |
| 513 expression, objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview, callback); | 513 expression, objectGroup, includeCommandLineAPI, silent, returnByValue, generatePreview, callback); |
| 514 return; | 514 return; |
| 515 } | 515 } |
| 516 this._evaluateGlobal.apply(this, arguments); | 516 this._evaluateGlobal.apply(this, arguments); |
| 517 } | 517 } |
| 518 | 518 |
| 519 /** | 519 /** |
| 520 * @param {string} objectGroup | 520 * @param {string} objectGroup |
| 521 * @param {boolean} generatePreview | 521 * @param {boolean} generatePreview |
| 522 * @param {function(?SDK.RemoteObject, !Protocol.Runtime.ExceptionDetails=)} c allback | 522 * @param {function(?SDK.RemoteObject, !Protocol.Runtime.ExceptionDetails=)} c allback |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 537 */ | 537 */ |
| 538 _evaluateGlobal( | 538 _evaluateGlobal( |
| 539 expression, | 539 expression, |
| 540 objectGroup, | 540 objectGroup, |
| 541 includeCommandLineAPI, | 541 includeCommandLineAPI, |
| 542 silent, | 542 silent, |
| 543 returnByValue, | 543 returnByValue, |
| 544 generatePreview, | 544 generatePreview, |
| 545 userGesture, | 545 userGesture, |
| 546 callback) { | 546 callback) { |
| 547 if (!expression) { | |
| 548 // There is no expression, so the completion should happen against global properties. | |
| 549 expression = 'this'; | |
| 550 } | |
| 551 | |
| 552 /** | 547 /** |
| 553 * @this {SDK.ExecutionContext} | 548 * @this {SDK.ExecutionContext} |
| 554 * @param {?Protocol.Error} error | 549 * @param {?Protocol.Error} error |
| 555 * @param {!Protocol.Runtime.RemoteObject} result | 550 * @param {!Protocol.Runtime.RemoteObject} result |
| 556 * @param {!Protocol.Runtime.ExceptionDetails=} exceptionDetails | 551 * @param {!Protocol.Runtime.ExceptionDetails=} exceptionDetails |
| 557 */ | 552 */ |
| 558 function evalCallback(error, result, exceptionDetails) { | 553 function evalCallback(error, result, exceptionDetails) { |
| 559 if (error) { | 554 if (error) { |
| 560 console.error(error); | 555 console.error(error); |
| 561 callback(null); | 556 callback(null); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 810 this._type === 'wheel'; | 805 this._type === 'wheel'; |
| 811 } | 806 } |
| 812 }; | 807 }; |
| 813 | 808 |
| 814 /** @enum {string} */ | 809 /** @enum {string} */ |
| 815 SDK.EventListener.Origin = { | 810 SDK.EventListener.Origin = { |
| 816 Raw: 'Raw', | 811 Raw: 'Raw', |
| 817 Framework: 'Framework', | 812 Framework: 'Framework', |
| 818 FrameworkUser: 'FrameworkUser' | 813 FrameworkUser: 'FrameworkUser' |
| 819 }; | 814 }; |
| OLD | NEW |