OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 // The infrastructure used for (localized) message reporting in V8. | 5 // The infrastructure used for (localized) message reporting in V8. |
6 // | 6 // |
7 // Note: there's a big unresolved issue about ownership of the data | 7 // Note: there's a big unresolved issue about ownership of the data |
8 // structures used by this framework. | 8 // structures used by this framework. |
9 | 9 |
10 #ifndef V8_MESSAGES_H_ | 10 #ifndef V8_MESSAGES_H_ |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 T(WasmTrapFuncInvalid, "invalid function") \ | 633 T(WasmTrapFuncInvalid, "invalid function") \ |
634 T(WasmTrapFuncSigMismatch, "function signature mismatch") \ | 634 T(WasmTrapFuncSigMismatch, "function signature mismatch") \ |
635 T(WasmTrapInvalidIndex, "invalid index into function table") \ | 635 T(WasmTrapInvalidIndex, "invalid index into function table") \ |
636 T(WasmTrapTypeError, "invalid type") \ | 636 T(WasmTrapTypeError, "invalid type") \ |
637 /* DataCloneError messages */ \ | 637 /* DataCloneError messages */ \ |
638 T(DataCloneError, "% could not be cloned.") \ | 638 T(DataCloneError, "% could not be cloned.") \ |
639 T(DataCloneErrorNeuteredArrayBuffer, \ | 639 T(DataCloneErrorNeuteredArrayBuffer, \ |
640 "An ArrayBuffer is neutered and could not be cloned.") \ | 640 "An ArrayBuffer is neutered and could not be cloned.") \ |
641 T(DataCloneErrorSharedArrayBufferNotTransferred, \ | 641 T(DataCloneErrorSharedArrayBufferNotTransferred, \ |
642 "A SharedArrayBuffer could not be cloned. SharedArrayBuffer must be " \ | 642 "A SharedArrayBuffer could not be cloned. SharedArrayBuffer must be " \ |
643 "transferred.") | 643 "transferred.") \ |
| 644 T(DataCloneDeserializationError, "Unable to deserialize cloned data.") \ |
| 645 T(DataCloneDeserializationVersionError, \ |
| 646 "Unable to deserialize cloned data due to invalid or unsupported " \ |
| 647 "version.") |
644 | 648 |
645 class MessageTemplate { | 649 class MessageTemplate { |
646 public: | 650 public: |
647 enum Template { | 651 enum Template { |
648 #define TEMPLATE(NAME, STRING) k##NAME, | 652 #define TEMPLATE(NAME, STRING) k##NAME, |
649 MESSAGE_TEMPLATES(TEMPLATE) | 653 MESSAGE_TEMPLATES(TEMPLATE) |
650 #undef TEMPLATE | 654 #undef TEMPLATE |
651 kLastMessage | 655 kLastMessage |
652 }; | 656 }; |
653 | 657 |
(...skipping 28 matching lines...) Expand all Loading... |
682 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 686 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
683 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, | 687 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, |
684 Handle<Object> data); | 688 Handle<Object> data); |
685 }; | 689 }; |
686 | 690 |
687 | 691 |
688 } // namespace internal | 692 } // namespace internal |
689 } // namespace v8 | 693 } // namespace v8 |
690 | 694 |
691 #endif // V8_MESSAGES_H_ | 695 #endif // V8_MESSAGES_H_ |
OLD | NEW |