Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1658)

Unified Diff: Source/devtools/front_end/RemoteObject.js

Issue 83383002: DevTools: Allow setting -0 value to object property (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/inspector/runtime/runtime-setPropertyValue-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/RemoteObject.js
diff --git a/Source/devtools/front_end/RemoteObject.js b/Source/devtools/front_end/RemoteObject.js
index 8af134404c5f7e6624c2e9742e76d9873d50b5cd..67326ec6cedae5dfe7240a170eba92b3861244f8 100644
--- a/Source/devtools/front_end/RemoteObject.js
+++ b/Source/devtools/front_end/RemoteObject.js
@@ -285,8 +285,8 @@ WebInspector.RemoteObject.prototype = {
// where property was defined; so do we.
var setPropertyValueFunction = "function(a, b) { this[a] = b; }";
- // Special case for NaN, Infinity and -Infinity
- if (result.type === "number" && typeof result.value !== "number")
+ // Special case for NaN, Infinity, -Infinity, -0.
+ if (result.type === "number" && String(result.value) !== result.description)
setPropertyValueFunction = "function(a) { this[a] = " + result.description + "; }";
delete result.description; // Optimize on traffic.
« no previous file with comments | « LayoutTests/inspector/runtime/runtime-setPropertyValue-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698