OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 "use strict"; | 5 "use strict"; |
6 | 6 |
7 // If true, prints all messages sent and received by inspector. | 7 // If true, prints all messages sent and received by inspector. |
8 const printProtocolMessages = false; | 8 const printProtocolMessages = false; |
9 | 9 |
10 // The active wrapper instance. | 10 // The active wrapper instance. |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 break; | 650 break; |
651 } | 651 } |
652 } | 652 } |
653 break; | 653 break; |
654 } | 654 } |
655 case "undefined": { | 655 case "undefined": { |
656 value = undefined; | 656 value = undefined; |
657 isUndefined = true; | 657 isUndefined = true; |
658 break; | 658 break; |
659 } | 659 } |
| 660 case "number": { |
| 661 if (obj.description === "NaN") { |
| 662 value = NaN; |
| 663 } |
| 664 break; |
| 665 } |
660 case "string": | 666 case "string": |
661 case "number": | |
662 case "boolean": { | 667 case "boolean": { |
663 break; | 668 break; |
664 } | 669 } |
665 default: { | 670 default: { |
666 break; | 671 break; |
667 } | 672 } |
668 } | 673 } |
669 | 674 |
670 return { value : () => value, | 675 return { value : () => value, |
671 isUndefined : () => isUndefined, | 676 isUndefined : () => isUndefined, |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 debug.instance = new DebugWrapper(); | 890 debug.instance = new DebugWrapper(); |
886 debug.instance.enable(); | 891 debug.instance.enable(); |
887 } | 892 } |
888 return debug.instance; | 893 return debug.instance; |
889 }}); | 894 }}); |
890 | 895 |
891 Object.defineProperty(debug, 'ScopeType', { get: function() { | 896 Object.defineProperty(debug, 'ScopeType', { get: function() { |
892 const instance = debug.Debug; | 897 const instance = debug.Debug; |
893 return instance.ScopeType; | 898 return instance.ScopeType; |
894 }}); | 899 }}); |
OLD | NEW |