Changeset 76699 in webkit
- Timestamp:
- Jan 26, 2011 10:24:19 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r76698 r76699 1 2011-01-25 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: evaluate in console may not work when window.console is substituted or deleted. 6 https://bugs.webkit.org/show_bug.cgi?id=53072 7 8 * inspector/console-substituted-expected.txt: Added. 9 * inspector/console-substituted.html: Added. 10 1 11 2011-01-26 Ryosuke Niwa <rniwa@webkit.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r76697 r76699 1 2011-01-25 Pavel Podivilov <podivilov@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 Web Inspector: evaluate in console may not work when window.console is substituted or deleted. 6 https://bugs.webkit.org/show_bug.cgi?id=53072 7 8 Test: inspector/console-substituted.html 9 10 * inspector/InjectedScriptSource.js: 11 (.): 12 1 13 2011-01-26 Carlos Garcia Campos <cgarcia@igalia.com> 2 14 -
trunk/Source/WebCore/inspector/InjectedScriptSource.js
r76680 r76699 254 254 // Surround the expression in with statements to inject our command line API so that 255 255 // the window object properties still take more precedent than our API functions. 256 inspectedWindow.console._commandLineAPI = this._commandLineAPI; 256 if (inspectedWindow.console) 257 inspectedWindow.console._commandLineAPI = this._commandLineAPI; 257 258 258 259 // We don't want local variables to be shadowed by global ones when evaluating on CallFrame. … … 260 261 expression = "with (window) {\n" + expression + "\n} "; 261 262 if (injectCommandLineAPI) 262 expression = "with ( window ? window.console._commandLineAPI :{}) {\n" + expression + "\n}";263 expression = "with ((window && window.console && window.console._commandLineAPI) || {}) {\n" + expression + "\n}"; 263 264 var value = evalFunction.call(object, expression); 264 265 265 delete inspectedWindow.console._commandLineAPI; 266 if (inspectedWindow.console) 267 delete inspectedWindow.console._commandLineAPI; 266 268 267 269 // When evaluating on call frame error is not thrown, but returned as a value.
Note: See TracChangeset
for help on using the changeset viewer.