| 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 #include "src/value-serializer.h" | 5 #include "src/value-serializer.h" |
| 6 | 6 |
| 7 #include <type_traits> | 7 #include <type_traits> |
| 8 | 8 |
| 9 #include "src/base/logging.h" | 9 #include "src/base/logging.h" |
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| (...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1723 JSObject::DefineOwnPropertyIgnoreAttributes(&it, value, NONE) | 1723 JSObject::DefineOwnPropertyIgnoreAttributes(&it, value, NONE) |
| 1724 .is_null()) { | 1724 .is_null()) { |
| 1725 return Nothing<bool>(); | 1725 return Nothing<bool>(); |
| 1726 } | 1726 } |
| 1727 } | 1727 } |
| 1728 return Just(true); | 1728 return Just(true); |
| 1729 } | 1729 } |
| 1730 | 1730 |
| 1731 MaybeHandle<Object> | 1731 MaybeHandle<Object> |
| 1732 ValueDeserializer::ReadObjectUsingEntireBufferForLegacyFormat() { | 1732 ValueDeserializer::ReadObjectUsingEntireBufferForLegacyFormat() { |
| 1733 DCHECK_EQ(version_, 0); | 1733 DCHECK_EQ(version_, 0u); |
| 1734 HandleScope scope(isolate_); | 1734 HandleScope scope(isolate_); |
| 1735 std::vector<Handle<Object>> stack; | 1735 std::vector<Handle<Object>> stack; |
| 1736 while (position_ < end_) { | 1736 while (position_ < end_) { |
| 1737 SerializationTag tag; | 1737 SerializationTag tag; |
| 1738 if (!PeekTag().To(&tag)) break; | 1738 if (!PeekTag().To(&tag)) break; |
| 1739 | 1739 |
| 1740 Handle<Object> new_object; | 1740 Handle<Object> new_object; |
| 1741 switch (tag) { | 1741 switch (tag) { |
| 1742 case SerializationTag::kEndJSObject: { | 1742 case SerializationTag::kEndJSObject: { |
| 1743 ConsumeTag(SerializationTag::kEndJSObject); | 1743 ConsumeTag(SerializationTag::kEndJSObject); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1825 if (stack.size() != 1) { | 1825 if (stack.size() != 1) { |
| 1826 isolate_->Throw(*isolate_->factory()->NewError( | 1826 isolate_->Throw(*isolate_->factory()->NewError( |
| 1827 MessageTemplate::kDataCloneDeserializationError)); | 1827 MessageTemplate::kDataCloneDeserializationError)); |
| 1828 return MaybeHandle<Object>(); | 1828 return MaybeHandle<Object>(); |
| 1829 } | 1829 } |
| 1830 return scope.CloseAndEscape(stack[0]); | 1830 return scope.CloseAndEscape(stack[0]); |
| 1831 } | 1831 } |
| 1832 | 1832 |
| 1833 } // namespace internal | 1833 } // namespace internal |
| 1834 } // namespace v8 | 1834 } // namespace v8 |
| OLD | NEW |