OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_JSON_STRINGIFIER_H_ | 5 #ifndef V8_JSON_STRINGIFIER_H_ |
6 #define V8_JSON_STRINGIFIER_H_ | 6 #define V8_JSON_STRINGIFIER_H_ |
7 | 7 |
8 #include "src/conversions.h" | 8 #include "src/conversions.h" |
9 #include "src/lookup.h" | 9 #include "src/lookup.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 EXCEPTION); | 560 EXCEPTION); |
561 } | 561 } |
562 Result result = SerializeProperty(property, comma, key); | 562 Result result = SerializeProperty(property, comma, key); |
563 if (!comma && result == SUCCESS) comma = true; | 563 if (!comma && result == SUCCESS) comma = true; |
564 if (result == EXCEPTION) return result; | 564 if (result == EXCEPTION) return result; |
565 } | 565 } |
566 } else { | 566 } else { |
567 Handle<FixedArray> contents; | 567 Handle<FixedArray> contents; |
568 ASSIGN_RETURN_ON_EXCEPTION_VALUE( | 568 ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
569 isolate_, contents, | 569 isolate_, contents, |
570 JSReceiver::GetKeys(object, JSReceiver::OWN_ONLY, ENUMERABLE_STRINGS), | 570 JSReceiver::GetKeys(object, KeyCollectionType::OWN_ONLY, |
| 571 ENUMERABLE_STRINGS), |
571 EXCEPTION); | 572 EXCEPTION); |
572 | 573 |
573 for (int i = 0; i < contents->length(); i++) { | 574 for (int i = 0; i < contents->length(); i++) { |
574 Object* key = contents->get(i); | 575 Object* key = contents->get(i); |
575 Handle<String> key_handle; | 576 Handle<String> key_handle; |
576 MaybeHandle<Object> maybe_property; | 577 MaybeHandle<Object> maybe_property; |
577 if (key->IsString()) { | 578 if (key->IsString()) { |
578 key_handle = Handle<String>(String::cast(key), isolate_); | 579 key_handle = Handle<String>(String::cast(key), isolate_); |
579 maybe_property = Object::GetPropertyOrElement(object, key_handle); | 580 maybe_property = Object::GetPropertyOrElement(object, key_handle); |
580 } else { | 581 } else { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 } else { | 680 } else { |
680 SerializeString_<uc16, uc16>(object); | 681 SerializeString_<uc16, uc16>(object); |
681 } | 682 } |
682 } | 683 } |
683 } | 684 } |
684 | 685 |
685 } // namespace internal | 686 } // namespace internal |
686 } // namespace v8 | 687 } // namespace v8 |
687 | 688 |
688 #endif // V8_JSON_STRINGIFIER_H_ | 689 #endif // V8_JSON_STRINGIFIER_H_ |
OLD | NEW |