Changeset 56676 in webkit
- Timestamp:
- Mar 27, 2010 7:32:49 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r56673 r56676 1 2010-03-27 Dmitry Gorbik <socket.h@gmail.com> 2 3 Reviewed by Pavel Feldman. 4 5 Fix the regression caused by r28078: a global variable 6 definition masks a local one in an inspector console 7 https://bugs.webkit.org/show_bug.cgi?id=32442 8 9 * inspector/front-end/InjectedScript.js: 10 (injectedScriptConstructor): 11 1 12 2010-03-27 Dan Bernstein <mitz@apple.com> 2 13 -
trunk/WebCore/inspector/front-end/InjectedScript.js
r56532 r56676 235 235 return props; 236 236 if (expression) 237 expressionResult = InjectedScript._evaluateOn(callFrame.evaluate, callFrame, expression );237 expressionResult = InjectedScript._evaluateOn(callFrame.evaluate, callFrame, expression, true); 238 238 else { 239 239 // Evaluate into properties in scope of the selected call frame. … … 263 263 } 264 264 265 InjectedScript._evaluateAndWrap = function(evalFunction, object, expression, objectGroup )265 InjectedScript._evaluateAndWrap = function(evalFunction, object, expression, objectGroup, dontUseCommandLineAPI) 266 266 { 267 267 var result = {}; 268 268 try { 269 result.value = InjectedScript.wrapObject(InjectedScript._evaluateOn(evalFunction, object, expression ), objectGroup);269 result.value = InjectedScript.wrapObject(InjectedScript._evaluateOn(evalFunction, object, expression, dontUseCommandLineAPI), objectGroup); 270 270 271 271 // Handle error that might have happened while describing result. … … 281 281 } 282 282 283 InjectedScript._evaluateOn = function(evalFunction, object, expression )283 InjectedScript._evaluateOn = function(evalFunction, object, expression, dontUseCommandLineAPI) 284 284 { 285 285 InjectedScript._ensureCommandLineAPIInstalled(evalFunction, object); 286 286 // Surround the expression in with statements to inject our command line API so that 287 287 // the window object properties still take more precedent than our API functions. 288 expression = "with (window.console._inspectorCommandLineAPI) { with (window) {\n" + expression + "\n} }"; 288 if (!dontUseCommandLineAPI) 289 expression = "with (window.console._inspectorCommandLineAPI) { with (window) {\n" + expression + "\n} }"; 290 289 291 var value = evalFunction.call(object, expression); 290 292 … … 584 586 if (!callFrame) 585 587 return false; 586 return InjectedScript._evaluateAndWrap(callFrame.evaluate, callFrame, code, objectGroup );588 return InjectedScript._evaluateAndWrap(callFrame.evaluate, callFrame, code, objectGroup, true); 587 589 } 588 590
Note: See TracChangeset
for help on using the changeset viewer.