OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
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 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 * @param {string} objectGroup | 631 * @param {string} objectGroup |
632 * @param {boolean} isEvalOnCallFrame | 632 * @param {boolean} isEvalOnCallFrame |
633 * @param {boolean} injectCommandLineAPI | 633 * @param {boolean} injectCommandLineAPI |
634 * @param {boolean} returnByValue | 634 * @param {boolean} returnByValue |
635 * @param {boolean} generatePreview | 635 * @param {boolean} generatePreview |
636 * @param {!Array.<!Object>=} scopeChain | 636 * @param {!Array.<!Object>=} scopeChain |
637 * @return {!Object} | 637 * @return {!Object} |
638 */ | 638 */ |
639 _evaluateAndWrap: function(evalFunction, object, expression, objectGroup, is
EvalOnCallFrame, injectCommandLineAPI, returnByValue, generatePreview, scopeChai
n) | 639 _evaluateAndWrap: function(evalFunction, object, expression, objectGroup, is
EvalOnCallFrame, injectCommandLineAPI, returnByValue, generatePreview, scopeChai
n) |
640 { | 640 { |
641 try { | 641 return { wasThrown: false, |
642 return { wasThrown: false, | 642 result: this._wrapObject(this._evaluateOn(evalFunction, object,
objectGroup, expression, isEvalOnCallFrame, injectCommandLineAPI, scopeChain),
objectGroup, returnByValue, generatePreview), |
643 result: this._wrapObject(this._evaluateOn(evalFunction, obj
ect, objectGroup, expression, isEvalOnCallFrame, injectCommandLineAPI, scopeChai
n), objectGroup, returnByValue, generatePreview), | 643 __proto__: null }; |
644 __proto__: null }; | |
645 } catch (e) { | |
646 return this._createThrownValue(e, objectGroup); | |
647 } | |
648 }, | 644 }, |
649 | 645 |
650 /** | 646 /** |
651 * @param {*} value | 647 * @param {*} value |
652 * @param {string} objectGroup | 648 * @param {string} objectGroup |
653 * @return {!Object} | 649 * @return {!Object} |
654 */ | 650 */ |
655 _createThrownValue: function(value, objectGroup) | 651 _createThrownValue: function(value, objectGroup) |
656 { | 652 { |
657 var remoteObject = this._wrapObject(value, objectGroup); | 653 var remoteObject = this._wrapObject(value, objectGroup); |
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1621 */ | 1617 */ |
1622 _logEvent: function(event) | 1618 _logEvent: function(event) |
1623 { | 1619 { |
1624 inspectedWindow.console.log(event.type, event); | 1620 inspectedWindow.console.log(event.type, event); |
1625 } | 1621 } |
1626 } | 1622 } |
1627 | 1623 |
1628 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); | 1624 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); |
1629 return injectedScript; | 1625 return injectedScript; |
1630 }) | 1626 }) |
OLD | NEW |