Changeset 125033 in webkit
- Timestamp:
- Aug 8, 2012 6:21:41 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r125026 r125033 1 2012-08-08 Pavel Feldman <pfeldman@chromium.org> 2 3 Web Inspector: store last evaluation result in $_ 4 https://bugs.webkit.org/show_bug.cgi?id=93377 5 6 Reviewed by Vsevolod Vlasov. 7 8 * inspector/console/console-last-result-expected.txt: Added. 9 * inspector/console/console-last-result.html: Added. 10 1 11 2012-08-08 KwangYong Choi <ky0.choi@samsung.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r125032 r125033 1 2012-08-08 Pavel Feldman <pfeldman@chromium.org> 2 3 Web Inspector: store last evaluation result in $_ 4 https://bugs.webkit.org/show_bug.cgi?id=93377 5 6 Reviewed by Vsevolod Vlasov. 7 8 All "console" evaluations end up in that variable on command line API. 9 10 Test: inspector/console/console-last-result.html 11 12 * inspector/InjectedScriptSource.js: 13 (.): 14 1 15 2012-08-08 Simon Hausmann <simon.hausmann@nokia.com> 2 16 -
trunk/Source/WebCore/inspector/InjectedScriptSource.js
r123651 r125033 405 405 try { 406 406 return { wasThrown: false, 407 result: this._wrapObject(this._evaluateOn(evalFunction, object, expression, isEvalOnCallFrame, injectCommandLineAPI), objectGroup, returnByValue) };407 result: this._wrapObject(this._evaluateOn(evalFunction, object, objectGroup, expression, isEvalOnCallFrame, injectCommandLineAPI), objectGroup, returnByValue) }; 408 408 } catch (e) { 409 409 return this._createThrownValue(e, objectGroup); … … 429 429 * @param {Function} evalFunction 430 430 * @param {Object} object 431 * @param {string} objectGroup 431 432 * @param {string} expression 432 433 * @param {boolean} isEvalOnCallFrame … … 434 435 * @return {*} 435 436 */ 436 _evaluateOn: function(evalFunction, object, expression, isEvalOnCallFrame, injectCommandLineAPI)437 _evaluateOn: function(evalFunction, object, objectGroup, expression, isEvalOnCallFrame, injectCommandLineAPI) 437 438 { 438 439 // Only install command line api object for the time of evaluation. … … 445 446 expression = "with ((window && window.console && window.console._commandLineAPI) || {}) {\n" + expression + "\n}"; 446 447 } 447 return evalFunction.call(object, expression); 448 var result = evalFunction.call(object, expression); 449 if (objectGroup === "console") 450 this._lastResult = result; 451 return result; 448 452 } finally { 449 453 if (injectCommandLineAPI && inspectedWindow.console) … … 798 802 this.__defineGetter__("$" + i, commandLineAPIImpl._inspectedObject.bind(commandLineAPIImpl, i)); 799 803 } 804 805 this.$_ = injectedScript._lastResult; 800 806 } 801 807
Note: See TracChangeset
for help on using the changeset viewer.