OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 non_enum.a = 1; | 176 non_enum.a = 1; |
177 Object.defineProperty(non_enum, "b", { value: 2, enumerable: false }); | 177 Object.defineProperty(non_enum, "b", { value: 2, enumerable: false }); |
178 non_enum.c = 3; | 178 non_enum.c = 3; |
179 TestStringify('{"a":1,"c":3}', non_enum); | 179 TestStringify('{"a":1,"c":3}', non_enum); |
180 | 180 |
181 var str = "external"; | 181 var str = "external"; |
182 try { | 182 try { |
183 externalizeString(str, true); | 183 externalizeString(str, true); |
184 } catch (e) { } | 184 } catch (e) { } |
185 TestStringify("\"external\"", str, null, 0); | 185 TestStringify("\"external\"", str, null, 0); |
| 186 |
| 187 var o = {}; |
| 188 o.somespecialproperty = 10; |
| 189 o["\x19"] = 10; |
| 190 assertThrows("JSON.parse('{\"somespecialproperty\":100, \"\x19\":10}')"); |
OLD | NEW |