| Index: Source/core/inspector/InjectedScriptSource.js
|
| diff --git a/Source/core/inspector/InjectedScriptSource.js b/Source/core/inspector/InjectedScriptSource.js
|
| index e0c70e9bba1aaf858469917384d97b9fe4f99e5d..3d761aee20a273e74b853e9459b5b21ce9af9ae7 100644
|
| --- a/Source/core/inspector/InjectedScriptSource.js
|
| +++ b/Source/core/inspector/InjectedScriptSource.js
|
| @@ -581,7 +581,10 @@ InjectedScript.prototype = {
|
|
|
| return resolvedArg;
|
| } else if ("value" in callArgumentJson) {
|
| - return callArgumentJson.value;
|
| + var value = callArgumentJson.value;
|
| + if (callArgumentJson.type === "number" && typeof value !== "number")
|
| + value = Number(value);
|
| + return value;
|
| }
|
| return undefined;
|
| },
|
| @@ -1007,8 +1010,19 @@ InjectedScript.RemoteObject = function(object, objectGroupName, forceValueType,
|
| this.subtype = "null";
|
|
|
| // Provide user-friendly number values.
|
| - if (this.type === "number")
|
| + if (this.type === "number") {
|
| this.description = toStringDescription(object);
|
| + // Override "value" property for values that can not be JSON-stringified.
|
| + switch (this.description) {
|
| + case "NaN":
|
| + case "Infinity":
|
| + case "-Infinity":
|
| + case "-0":
|
| + this.value = this.description;
|
| + break;
|
| + }
|
| + }
|
| +
|
| return;
|
| }
|
|
|
|
|