| Index: third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js b/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| index 3827720be636853002c08a0bad049ec27d91cdfb..f73455959f79b26777661187d0d937b9157543db 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js
|
| @@ -150,7 +150,7 @@ WebInspector.RuntimeModel.prototype = {
|
| createRemoteObject: function(payload)
|
| {
|
| console.assert(typeof payload === "object", "Remote object payload should only be an object");
|
| - return new WebInspector.RemoteObjectImpl(this.target(), payload.objectId, payload.type, payload.subtype, payload.value, payload.description, payload.preview, payload.customPreview);
|
| + return new WebInspector.RemoteObjectImpl(this.target(), payload.objectId, payload.type, payload.subtype, payload.value, payload.unserializableValue, payload.description, payload.preview, payload.customPreview);
|
| },
|
|
|
| /**
|
| @@ -160,16 +160,31 @@ WebInspector.RuntimeModel.prototype = {
|
| */
|
| createScopeRemoteObject: function(payload, scopeRef)
|
| {
|
| - return new WebInspector.ScopeRemoteObject(this.target(), payload.objectId, scopeRef, payload.type, payload.subtype, payload.value, payload.description, payload.preview);
|
| + return new WebInspector.ScopeRemoteObject(this.target(), payload.objectId, scopeRef, payload.type, payload.subtype, payload.value, payload.unserializableValue, payload.description, payload.preview);
|
| },
|
|
|
| /**
|
| - * @param {number|string|boolean} value
|
| + * @param {number|string|boolean|undefined} value
|
| * @return {!WebInspector.RemoteObject}
|
| */
|
| createRemoteObjectFromPrimitiveValue: function(value)
|
| {
|
| - return new WebInspector.RemoteObjectImpl(this.target(), undefined, typeof value, undefined, value);
|
| + var type = typeof value;
|
| + var unserializableValue = undefined;
|
| + if (typeof value === "number") {
|
| + var description = String(value);
|
| + if (value === 0 && 1 / value < 0)
|
| + unserializableValue = RuntimeAgent.UnserializableValue.Negative0;
|
| + if (description === "NaN")
|
| + unserializableValue = RuntimeAgent.UnserializableValue.NaN;
|
| + if (description === "Infinity")
|
| + unserializableValue = RuntimeAgent.UnserializableValue.Infinity;
|
| + if (description === "-Infinity")
|
| + unserializableValue = RuntimeAgent.UnserializableValue.NegativeInfinity;
|
| + if (typeof unserializableValue !== "undefined")
|
| + value = undefined;
|
| + }
|
| + return new WebInspector.RemoteObjectImpl(this.target(), undefined, type, undefined, value, unserializableValue);
|
| },
|
|
|
| /**
|
|
|