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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 "Function.prototype.apply was called on %, which is a % and not a " \ | 87 "Function.prototype.apply was called on %, which is a % and not a " \ |
88 "function") \ | 88 "function") \ |
89 T(ArrayBufferTooShort, \ | 89 T(ArrayBufferTooShort, \ |
90 "Derived ArrayBuffer constructor created a buffer which was too small") \ | 90 "Derived ArrayBuffer constructor created a buffer which was too small") \ |
91 T(ArrayBufferSpeciesThis, \ | 91 T(ArrayBufferSpeciesThis, \ |
92 "ArrayBuffer subclass returned this from species constructor") \ | 92 "ArrayBuffer subclass returned this from species constructor") \ |
93 T(ArrayFunctionsOnFrozen, "Cannot modify frozen array elements") \ | 93 T(ArrayFunctionsOnFrozen, "Cannot modify frozen array elements") \ |
94 T(ArrayFunctionsOnSealed, "Cannot add/remove sealed array elements") \ | 94 T(ArrayFunctionsOnSealed, "Cannot add/remove sealed array elements") \ |
95 T(ArrayNotSubclassable, "Subclassing Arrays is not currently supported.") \ | 95 T(ArrayNotSubclassable, "Subclassing Arrays is not currently supported.") \ |
96 T(CalledNonCallable, "% is not a function") \ | 96 T(CalledNonCallable, "% is not a function") \ |
97 T(CalledNonCallableInstanceOf, \ | |
98 "Right-hand side of 'instanceof' is not callable") \ | |
99 T(CalledOnNonObject, "% called on non-object") \ | 97 T(CalledOnNonObject, "% called on non-object") \ |
100 T(CalledOnNullOrUndefined, "% called on null or undefined") \ | 98 T(CalledOnNullOrUndefined, "% called on null or undefined") \ |
101 T(CallSiteExpectsFunction, \ | 99 T(CallSiteExpectsFunction, \ |
102 "CallSite expects function or number as second argument, got %") \ | 100 "CallSite expects function or number as second argument, got %") \ |
103 T(CallSiteMethod, "CallSite method % expects CallSite as receiver") \ | 101 T(CallSiteMethod, "CallSite method % expects CallSite as receiver") \ |
104 T(CannotConvertToPrimitive, "Cannot convert object to primitive value") \ | 102 T(CannotConvertToPrimitive, "Cannot convert object to primitive value") \ |
105 T(CannotPreventExt, "Cannot prevent extensions") \ | 103 T(CannotPreventExt, "Cannot prevent extensions") \ |
106 T(CannotFreezeArrayBufferView, \ | 104 T(CannotFreezeArrayBufferView, \ |
107 "Cannot freeze array buffer views with elements") \ | 105 "Cannot freeze array buffer views with elements") \ |
108 T(CircularStructure, "Converting circular structure to JSON") \ | 106 T(CircularStructure, "Converting circular structure to JSON") \ |
(...skipping 16 matching lines...) Expand all Loading... |
125 T(ExtendsValueGenerator, \ | 123 T(ExtendsValueGenerator, \ |
126 "Class extends value % may not be a generator function") \ | 124 "Class extends value % may not be a generator function") \ |
127 T(ExtendsValueNotFunction, \ | 125 T(ExtendsValueNotFunction, \ |
128 "Class extends value % is not a function or null") \ | 126 "Class extends value % is not a function or null") \ |
129 T(FirstArgumentNotRegExp, \ | 127 T(FirstArgumentNotRegExp, \ |
130 "First argument to % must not be a regular expression") \ | 128 "First argument to % must not be a regular expression") \ |
131 T(FunctionBind, "Bind must be called on a function") \ | 129 T(FunctionBind, "Bind must be called on a function") \ |
132 T(GeneratorRunning, "Generator is already running") \ | 130 T(GeneratorRunning, "Generator is already running") \ |
133 T(IllegalInvocation, "Illegal invocation") \ | 131 T(IllegalInvocation, "Illegal invocation") \ |
134 T(IncompatibleMethodReceiver, "Method % called on incompatible receiver %") \ | 132 T(IncompatibleMethodReceiver, "Method % called on incompatible receiver %") \ |
135 T(InstanceofFunctionExpected, \ | |
136 "Expecting a function in instanceof check, but got %") \ | |
137 T(InstanceofNonobjectProto, \ | 133 T(InstanceofNonobjectProto, \ |
138 "Function has non-object prototype '%' in instanceof check") \ | 134 "Function has non-object prototype '%' in instanceof check") \ |
139 T(InvalidArgument, "invalid_argument") \ | 135 T(InvalidArgument, "invalid_argument") \ |
140 T(InvalidInOperatorUse, "Cannot use 'in' operator to search for '%' in %") \ | 136 T(InvalidInOperatorUse, "Cannot use 'in' operator to search for '%' in %") \ |
141 T(InvalidRegExpExecResult, \ | 137 T(InvalidRegExpExecResult, \ |
142 "RegExp exec method returned something other than an Object or null") \ | 138 "RegExp exec method returned something other than an Object or null") \ |
143 T(InvalidSimdOperation, "% is not a valid type for this SIMD operation.") \ | 139 T(InvalidSimdOperation, "% is not a valid type for this SIMD operation.") \ |
144 T(IteratorResultNotAnObject, "Iterator result % is not an object") \ | 140 T(IteratorResultNotAnObject, "Iterator result % is not an object") \ |
145 T(IteratorValueNotAnObject, "Iterator value % is not an entry object") \ | 141 T(IteratorValueNotAnObject, "Iterator value % is not an entry object") \ |
146 T(LanguageID, "Language ID should be string or object.") \ | 142 T(LanguageID, "Language ID should be string or object.") \ |
147 T(MethodCalledOnWrongObject, \ | 143 T(MethodCalledOnWrongObject, \ |
148 "Method % called on a non-object or on a wrong type of object.") \ | 144 "Method % called on a non-object or on a wrong type of object.") \ |
149 T(MethodInvokedOnNullOrUndefined, \ | 145 T(MethodInvokedOnNullOrUndefined, \ |
150 "Method invoked on undefined or null value.") \ | 146 "Method invoked on undefined or null value.") \ |
151 T(MethodInvokedOnWrongType, "Method invoked on an object that is not %.") \ | 147 T(MethodInvokedOnWrongType, "Method invoked on an object that is not %.") \ |
152 T(NoAccess, "no access") \ | 148 T(NoAccess, "no access") \ |
| 149 T(NonCallableInInstanceOfCheck, \ |
| 150 "Right-hand side of 'instanceof' is not callable") \ |
153 T(NonCoercible, "Cannot match against 'undefined' or 'null'.") \ | 151 T(NonCoercible, "Cannot match against 'undefined' or 'null'.") \ |
154 T(NonExtensibleProto, "% is not extensible") \ | 152 T(NonExtensibleProto, "% is not extensible") \ |
155 T(NonObjectInInstanceOfCheck, \ | 153 T(NonObjectInInstanceOfCheck, \ |
156 "Right-hand side of 'instanceof' is not an object") \ | 154 "Right-hand side of 'instanceof' is not an object") \ |
157 T(NonObjectPropertyLoad, "Cannot read property '%' of %") \ | 155 T(NonObjectPropertyLoad, "Cannot read property '%' of %") \ |
158 T(NonObjectPropertyStore, "Cannot set property '%' of %") \ | 156 T(NonObjectPropertyStore, "Cannot set property '%' of %") \ |
159 T(NoSetterInCallback, "Cannot set property % of % which has only a getter") \ | 157 T(NoSetterInCallback, "Cannot set property % of % which has only a getter") \ |
160 T(NotAnIterator, "% is not an iterator") \ | 158 T(NotAnIterator, "% is not an iterator") \ |
161 T(NotAPromise, "% is not a promise") \ | 159 T(NotAPromise, "% is not a promise") \ |
162 T(NotConstructor, "% is not a constructor") \ | 160 T(NotConstructor, "% is not a constructor") \ |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 528 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
531 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 529 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
532 Handle<Object> data); | 530 Handle<Object> data); |
533 }; | 531 }; |
534 | 532 |
535 | 533 |
536 } // namespace internal | 534 } // namespace internal |
537 } // namespace v8 | 535 } // namespace v8 |
538 | 536 |
539 #endif // V8_MESSAGES_H_ | 537 #endif // V8_MESSAGES_H_ |
OLD | NEW |