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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScriptSource.js

Issue 2214193002: [DevTools] Introduce unserializableValue in RemoteObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hidden Created 4 years, 4 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 if (this.type !== "undefined") 709 if (this.type !== "undefined")
710 this.value = object; 710 this.value = object;
711 711
712 // Null object is object with 'null' subtype. 712 // Null object is object with 'null' subtype.
713 if (object === null) 713 if (object === null)
714 this.subtype = "null"; 714 this.subtype = "null";
715 715
716 // Provide user-friendly number values. 716 // Provide user-friendly number values.
717 if (this.type === "number") { 717 if (this.type === "number") {
718 this.description = toStringDescription(object); 718 this.description = toStringDescription(object);
719 // Override "value" property for values that can not be JSON-stringi fied.
720 switch (this.description) { 719 switch (this.description) {
721 case "NaN": 720 case "NaN":
722 case "Infinity": 721 case "Infinity":
723 case "-Infinity": 722 case "-Infinity":
724 case "-0": 723 case "-0":
725 this.value = this.description; 724 delete this.value;
725 this.unserializableValue = this.description;
726 break; 726 break;
727 } 727 }
728 } 728 }
729 729
730 return; 730 return;
731 } 731 }
732 732
733 if (injectedScript._shouldPassByValue(object)) { 733 if (injectedScript._shouldPassByValue(object)) {
734 this.value = object; 734 this.value = object;
735 this.subtype = injectedScript._subtype(object); 735 this.subtype = injectedScript._subtype(object);
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 return string.substr(0, leftHalf) + "\u2026" + string.substr(string. length - rightHalf, rightHalf); 1050 return string.substr(0, leftHalf) + "\u2026" + string.substr(string. length - rightHalf, rightHalf);
1051 } 1051 }
1052 return string.substr(0, maxLength) + "\u2026"; 1052 return string.substr(0, maxLength) + "\u2026";
1053 }, 1053 },
1054 1054
1055 __proto__: null 1055 __proto__: null
1056 } 1056 }
1057 1057
1058 return injectedScript; 1058 return injectedScript;
1059 }) 1059 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698