| 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 property = GetProperty(object, key); | 553 property = GetProperty(object, key); |
| 554 if (property.is_null()) return EXCEPTION; | 554 if (property.is_null()) return EXCEPTION; |
| 555 } | 555 } |
| 556 Result result = SerializeProperty(property, comma, key); | 556 Result result = SerializeProperty(property, comma, key); |
| 557 if (!comma && result == SUCCESS) comma = true; | 557 if (!comma && result == SUCCESS) comma = true; |
| 558 if (result >= EXCEPTION) return result; | 558 if (result >= EXCEPTION) return result; |
| 559 } | 559 } |
| 560 } else { | 560 } else { |
| 561 bool has_exception = false; | 561 bool has_exception = false; |
| 562 Handle<FixedArray> contents = | 562 Handle<FixedArray> contents = |
| 563 GetKeysInFixedArrayFor(object, LOCAL_ONLY, &has_exception); | 563 GetKeysInFixedArrayFor<true>(object, LOCAL_ONLY, &has_exception); |
| 564 if (has_exception) return EXCEPTION; | 564 if (has_exception) return EXCEPTION; |
| 565 | 565 |
| 566 for (int i = 0; i < contents->length(); i++) { | 566 for (int i = 0; i < contents->length(); i++) { |
| 567 Object* key = contents->get(i); | 567 Object* key = contents->get(i); |
| 568 Handle<String> key_handle; | 568 Handle<String> key_handle; |
| 569 Handle<Object> property; | 569 Handle<Object> property; |
| 570 if (key->IsString()) { | 570 if (key->IsString()) { |
| 571 key_handle = Handle<String>(String::cast(key), isolate_); | 571 key_handle = Handle<String>(String::cast(key), isolate_); |
| 572 property = GetProperty(object, key_handle); | 572 property = GetProperty(object, key_handle); |
| 573 } else { | 573 } else { |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 SerializeString_<false, uint8_t>(object); | 736 SerializeString_<false, uint8_t>(object); |
| 737 } else { | 737 } else { |
| 738 SerializeString_<false, uc16>(object); | 738 SerializeString_<false, uc16>(object); |
| 739 } | 739 } |
| 740 } | 740 } |
| 741 } | 741 } |
| 742 | 742 |
| 743 } } // namespace v8::internal | 743 } } // namespace v8::internal |
| 744 | 744 |
| 745 #endif // V8_JSON_STRINGIFIER_H_ | 745 #endif // V8_JSON_STRINGIFIER_H_ |
| OLD | NEW |