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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 /* Wasm errors (currently Error) */ \ | 626 /* Wasm errors (currently Error) */ \ |
627 T(WasmTrapUnreachable, "unreachable") \ | 627 T(WasmTrapUnreachable, "unreachable") \ |
628 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ | 628 T(WasmTrapMemOutOfBounds, "memory access out of bounds") \ |
629 T(WasmTrapDivByZero, "divide by zero") \ | 629 T(WasmTrapDivByZero, "divide by zero") \ |
630 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ | 630 T(WasmTrapDivUnrepresentable, "divide result unrepresentable") \ |
631 T(WasmTrapRemByZero, "remainder by zero") \ | 631 T(WasmTrapRemByZero, "remainder by zero") \ |
632 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ | 632 T(WasmTrapFloatUnrepresentable, "integer result unrepresentable") \ |
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 */ \ |
| 638 T(DataCloneError, "% could not be cloned.") \ |
| 639 T(DataCloneErrorNeuteredArrayBuffer, \ |
| 640 "An ArrayBuffer is neutered and could not be cloned.") \ |
| 641 T(DataCloneErrorSharedArrayBufferNotTransferred, \ |
| 642 "A SharedArrayBuffer could not be cloned. SharedArrayBuffer must be " \ |
| 643 "transferred.") |
637 | 644 |
638 class MessageTemplate { | 645 class MessageTemplate { |
639 public: | 646 public: |
640 enum Template { | 647 enum Template { |
641 #define TEMPLATE(NAME, STRING) k##NAME, | 648 #define TEMPLATE(NAME, STRING) k##NAME, |
642 MESSAGE_TEMPLATES(TEMPLATE) | 649 MESSAGE_TEMPLATES(TEMPLATE) |
643 #undef TEMPLATE | 650 #undef TEMPLATE |
644 kLastMessage | 651 kLastMessage |
645 }; | 652 }; |
646 | 653 |
(...skipping 28 matching lines...) Expand all Loading... |
675 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 682 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
676 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, | 683 static std::unique_ptr<char[]> GetLocalizedMessage(Isolate* isolate, |
677 Handle<Object> data); | 684 Handle<Object> data); |
678 }; | 685 }; |
679 | 686 |
680 | 687 |
681 } // namespace internal | 688 } // namespace internal |
682 } // namespace v8 | 689 } // namespace v8 |
683 | 690 |
684 #endif // V8_MESSAGES_H_ | 691 #endif // V8_MESSAGES_H_ |
OLD | NEW |