Changeset 129122 in webkit
- Timestamp:
- Sep 20, 2012 5:44:51 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r129120 r129122 1 2012-09-20 Andrey Adaikin <aandrey@chromium.org> 2 3 Web Inspector: setPropertyValue does not work for non-finite numbers 4 https://bugs.webkit.org/show_bug.cgi?id=97016 5 6 Reviewed by Vsevolod Vlasov. 7 8 Expands the test with non-finite numbers case. 9 10 * inspector/runtime/runtime-setPropertyValue-expected.txt: 11 * inspector/runtime/runtime-setPropertyValue.html: 12 1 13 2012-09-20 Marcelo Lira <marcelo.lira@openbossa.org> 2 14 -
trunk/LayoutTests/inspector/runtime/runtime-setPropertyValue-expected.txt
r103711 r129122 23 23 CONSOLE MESSAGE: line 12: {"foo":""} 24 24 CONSOLE MESSAGE: line 13: 25 CONSOLE MESSAGE: line 11: ===== Set non-finite numbers ===== 26 CONSOLE MESSAGE: line 12: {"foo":"NaN","foo1":"Infinity","foo2":"-Infinity"} 27 CONSOLE MESSAGE: line 13: 25 28 Tests WebInspector.RemoveObject.setPropertyValue implementation. 26 29 … … 43 46 exception 44 47 48 Running: testSetNonFiniteNumbers 49 -
trunk/LayoutTests/inspector/runtime/runtime-setPropertyValue.html
r103711 r129122 10 10 { 11 11 console.log("===== " + label + " ====="); 12 console.log(JSON.stringify(object1 ));12 console.log(JSON.stringify(object1, replacer)); 13 13 console.log(""); 14 15 function replacer(key, value) 16 { 17 if (typeof value === "number" && !isFinite(value)) 18 return String(value); 19 return value; 20 } 14 21 } 15 22 … … 110 117 InspectorTest.evaluateInPage("dumpObject('Set exception')", next); 111 118 } 119 }, 120 121 function testSetNonFiniteNumbers(next) 122 { 123 obj1.setPropertyValue("foo", "NaN", step1); 124 125 function step1(error) 126 { 127 obj1.setPropertyValue("foo1", "Infinity", step2); 128 } 129 130 function step2(error) 131 { 132 obj1.setPropertyValue("foo2", "-Infinity", step3); 133 } 134 135 function step3(error) 136 { 137 InspectorTest.evaluateInPage("dumpObject('Set non-finite numbers')", next); 138 } 112 139 } 113 140 ]); -
trunk/Source/WebCore/ChangeLog
r129118 r129122 1 2012-09-20 Andrey Adaikin <aandrey@chromium.org> 2 3 Web Inspector: setPropertyValue does not work for non-finite numbers 4 https://bugs.webkit.org/show_bug.cgi?id=97016 5 6 Reviewed by Vsevolod Vlasov. 7 8 Fix: setting a property to NaN, Infinity or -Infinity numbers did not work. 9 10 * inspector/front-end/RemoteObject.js: 11 (WebInspector.RemoteObject.prototype.setPropertyValue): 12 1 13 2012-09-20 Otto Derek Cheung <otcheung@rim.com> 2 14 -
trunk/Source/WebCore/inspector/front-end/RemoteObject.js
r125174 r129122 242 242 } 243 243 244 function setPropertyValue(propertyName, propertyValue) 245 { 246 this[propertyName] = propertyValue; 247 } 244 var setPropertyValueFunction = "function(a, b) { this[a] = b; }"; 245 246 // Special case for NaN, Infinity and -Infinity 247 if (result.type === "number" && typeof result.value !== "number") 248 setPropertyValueFunction = "function(a) { this[a] = " + result.description + "; }"; 248 249 249 250 delete result.description; // Optimize on traffic. 250 RuntimeAgent.callFunctionOn(this._objectId, setPropertyValue .toString(), [{ value:name }, result], true, undefined, propertySetCallback.bind(this));251 RuntimeAgent.callFunctionOn(this._objectId, setPropertyValueFunction, [{ value:name }, result], true, undefined, propertySetCallback.bind(this)); 251 252 if (result._objectId) 252 253 RuntimeAgent.releaseObject(result._objectId);
Note: See TracChangeset
for help on using the changeset viewer.