Changeset 48536 in webkit
- Timestamp:
- Sep 18, 2009 2:58:39 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r48533 r48536 1 2009-09-18 Yury Semikhatsky <yurys@chromium.org> 2 3 Reviewed by Timothy Hatcher. 4 5 Fix parameter substitutions in console.log(). 6 7 https://bugs.webkit.org/show_bug.cgi?id=29366 8 9 * inspector/front-end/ConsoleView.js: 10 (WebInspector.ConsoleMessage.prototype._format): 11 * inspector/front-end/InjectedScript.js: 12 (InjectedScript.getPrototypes): 13 (InjectedScript.CallFrameProxy.prototype._wrapScopeChain): 14 * inspector/front-end/utilities.js: 15 (): 16 1 17 2009-09-18 Sam Weinig <sam@webkit.org> 2 18 -
trunk/WebCore/inspector/front-end/ConsoleView.js
r48497 r48536 640 640 } 641 641 642 if ( typeof parameters[0]=== "string") {642 if (Object.proxyType(parameters[0]) === "string") { 643 643 var formatters = {} 644 644 for (var i in String.standardFormatters) … … 661 661 } 662 662 663 var result = String.format(parameters[0] , parameters.slice(1), formatters, formattedResult, append);663 var result = String.format(parameters[0].description, parameters.slice(1), formatters, formattedResult, append); 664 664 formattedResult = result.formattedResult; 665 665 parameters = result.unusedSubstitutions; -
trunk/WebCore/inspector/front-end/InjectedScript.js
r48491 r48536 422 422 var result = []; 423 423 for (var prototype = node; prototype; prototype = prototype.__proto__) { 424 var title = Object.describe(prototype );424 var title = Object.describe(prototype, true); 425 425 if (title.match(/Prototype$/)) { 426 426 title = title.replace(/Prototype$/, ""); … … 1000 1000 for (var i = 0; i < scopeChain.length; ++i) { 1001 1001 var scopeObject = scopeChain[i]; 1002 var scopeObjectProxy = InjectedScript.createProxyObject(scopeObject, { callFrame: this.id, chainIndex: i } );1002 var scopeObjectProxy = InjectedScript.createProxyObject(scopeObject, { callFrame: this.id, chainIndex: i }, true); 1003 1003 1004 1004 if (Object.prototype.toString.call(scopeObject) === "[object JSActivation]") { 1005 1005 if (!foundLocalScope) 1006 scopeObjectProxy.thisObject = InjectedScript.createProxyObject(callFrame.thisObject, { callFrame: this.id, thisObject: true } );1006 scopeObjectProxy.thisObject = InjectedScript.createProxyObject(callFrame.thisObject, { callFrame: this.id, thisObject: true }, true); 1007 1007 else 1008 1008 scopeObjectProxy.isClosure = true; … … 1078 1078 return "[" + obj.toString() + "]"; 1079 1079 case "string": 1080 if (!abbreviated) 1081 return obj; 1080 1082 if (obj.length > 100) 1081 1083 return "\"" + obj.substring(0, 100) + "\u2026\""; … … 1090 1092 case "regexp": 1091 1093 return String(obj).replace(/([\\\/])/g, "\\$1").replace(/\\(\/[gim]*)$/, "$1").substring(1); 1094 case "boolean": 1095 case "number": 1096 case "null": 1097 return obj; 1092 1098 default: 1093 1099 return String(obj); -
trunk/WebCore/inspector/front-end/utilities.js
r48392 r48536 815 815 d: function(substitution) 816 816 { 817 if (typeof substitution == "object" && Object.proxyType(substitution) === "number") 818 substitution = substitution.description; 817 819 substitution = parseInt(substitution); 818 820 return !isNaN(substitution) ? substitution : 0; … … 821 823 f: function(substitution, token) 822 824 { 825 if (typeof substitution == "object" && Object.proxyType(substitution) === "number") 826 substitution = substitution.description; 823 827 substitution = parseFloat(substitution); 824 828 if (substitution && token.precision > -1) … … 829 833 s: function(substitution) 830 834 { 835 if (typeof substitution == "object" && Object.proxyType(substitution) !== "null") 836 substitution = substitution.description; 831 837 return substitution; 832 838 },
Note: See TracChangeset
for help on using the changeset viewer.