Changeset 146937 in webkit
- Timestamp:
- Mar 26, 2013 3:04:36 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r146935 r146937 1 2013-03-26 Timothy Hatcher <timothy@apple.com> 2 3 Make the Web Inspector console work in strict mode with JavaScriptCore. 4 5 https://webkit.org/b/65829 6 rdar://problem/11271238 7 8 Reviewed by Joseph Pecoraro. 9 10 * inspector/InjectedScriptSource.js: 11 (InjectedScript.prototype._evaluateOn): Don't use 'eval' parameter (it isn't 12 allowed in strict mode). Swap window.eval with our known eval instead. 13 1 14 2013-03-26 Ryosuke Niwa <rniwa@webkit.org> 2 15 -
trunk/Source/WebCore/inspector/InjectedScriptSource.js
r146840 r146937 558 558 var thisObject = isEvalOnCallFrame ? object : null; 559 559 var parameters = [InjectedScriptHost.evaluate, expression]; 560 var expressionFunctionBody = "var __originalEval = window.eval; window.eval = __eval; try { return eval(__currentExpression); } finally { window.eval = __originalEval; }"; 560 561 561 562 if (injectCommandLineAPI) { … … 572 573 parameters.push(commandLineAPI[parameterNames[i]]); 573 574 574 var expressionFunctionString = "(function( eval, __currentExpression, " + parameterNames.join(", ") + ") { return eval(__currentExpression);})";575 var expressionFunctionString = "(function(__eval, __currentExpression, " + parameterNames.join(", ") + ") { " + expressionFunctionBody + " })"; 575 576 } else { 576 577 // Use a closure in this case too to keep the same behavior of 'var' being captured by the closure instead 577 578 // of leaking out into the calling scope. 578 579 var expressionFunctionString = "(function(eval, __currentExpression) { return eval(__currentExpression); })"; 579 var expressionFunctionString = "(function(__eval, __currentExpression) { " + expressionFunctionBody + " })"; 580 580 } 581 581
Note: See TracChangeset
for help on using the changeset viewer.