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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 "Invalid changeRecord with non-string 'type' property") \ | 178 "Invalid changeRecord with non-string 'type' property") \ |
179 T(OrdinaryFunctionCalledAsConstructor, \ | 179 T(OrdinaryFunctionCalledAsConstructor, \ |
180 "Function object that's not a constructor was created with new") \ | 180 "Function object that's not a constructor was created with new") \ |
181 T(PromiseCyclic, "Chaining cycle detected for promise %") \ | 181 T(PromiseCyclic, "Chaining cycle detected for promise %") \ |
182 T(PropertyDescObject, "Property description must be an object: %") \ | 182 T(PropertyDescObject, "Property description must be an object: %") \ |
183 T(PropertyNotFunction, \ | 183 T(PropertyNotFunction, \ |
184 "'%' returned for property '%' of object '%' is not a function") \ | 184 "'%' returned for property '%' of object '%' is not a function") \ |
185 T(ProtoObjectOrNull, "Object prototype may only be an Object or null: %") \ | 185 T(ProtoObjectOrNull, "Object prototype may only be an Object or null: %") \ |
186 T(PrototypeParentNotAnObject, \ | 186 T(PrototypeParentNotAnObject, \ |
187 "Class extends value does not have valid prototype property %") \ | 187 "Class extends value does not have valid prototype property %") \ |
188 T(ProxyDeletePropertyViolatesInvariant, \ | 188 T(ProxyConstructNonObject, \ |
189 "Trap 'deleteProperty' returned true but property '%' is not configurable" \ | 189 "'construct' on proxy: trap returned non-object ('%')") \ |
190 " in the proxy target") \ | 190 T(ProxyDefinePropertyNonConfigurable, \ |
191 T(ProxyHandlerNonObject, "Cannot create proxy with non-object as handler") \ | 191 "'defineProperty' on proxy: trap returned truish for defining " \ |
192 T(ProxyHandlerTrapMissing, "Proxy handler % has no '%' trap") \ | 192 "non-configurable property '%' which is either non-existant or " \ |
193 T(ProxyHandlerTrapMustBeCallable, \ | 193 "configurable in the proxy target") \ |
194 "Proxy handler % has non-callable '%' trap") \ | 194 T(ProxyDefinePropertyNonExtensible, \ |
195 T(ProxySetPrototypeFailed, \ | 195 "'defineProperty' on proxy: trap returned truish for adding property '%' " \ |
196 "Proxy handler returned false when setting prototype '%'") \ | 196 " to the non-extensible proxy target") \ |
197 T(ProxyNonObjectPropNames, "Trap '%' returned non-object %") \ | 197 T(ProxyDefinePropertyIncompatible, \ |
198 T(ProxyPreventExtensionsViolatesInvariant, \ | 198 "'defineProperty' on proxy: trap returned truish for adding property '%' " \ |
199 "Trap 'preventExtensions' returned true but the proxy's target is " \ | 199 " that is incompatible with the existing property in the proxy target") \ |
200 "extensible") \ | 200 T(ProxyDeletePropertyNonConfigurable, \ |
201 T(ProxyPropNotConfigurable, \ | 201 "'deleteProperty' on proxy: trap returned truish for property '%' which " \ |
202 "Proxy handler % returned non-configurable descriptor for property '%' " \ | 202 "is non-configurable in the proxy target") \ |
203 "from '%' trap") \ | 203 T(ProxyEnumerateNonObject, "'enumerate' on proxy: trap returned non-object") \ |
204 T(ProxyRepeatedPropName, "Trap '%' returned repeated property name '%'") \ | 204 T(ProxyEnumerateNonString, \ |
| 205 "'enumerate' on proxy: trap result includes non-string") \ |
| 206 T(ProxyGetNonConfigurableData, \ |
| 207 "'get' on proxy: property '%' is a read-only and " \ |
| 208 "non-configurable data property on the proxy target but the proxy " \ |
| 209 "did not return its actual value (expected '%' but got '%')") \ |
| 210 T(ProxyGetNonConfigurableAccessor, \ |
| 211 "'get' on proxy: property '%' is a non-configurable accessor " \ |
| 212 "property on the proxy target and does not have a getter function, but " \ |
| 213 "the trap did not return 'undefined' (got '%')") \ |
| 214 T(ProxyGetOwnPropertyDescriptorIncompatible, \ |
| 215 "'getOwnPropertyDescriptor' on proxy: trap returned descriptor for " \ |
| 216 "property '%' that is incompatible with the existing property in the " \ |
| 217 "proxy target") \ |
| 218 T(ProxyGetOwnPropertyDescriptorInvalid, \ |
| 219 "'getOwnPropertyDescriptor' on proxy: trap returned neither object nor " \ |
| 220 "undefined for property '%'") \ |
| 221 T(ProxyGetOwnPropertyDescriptorNonConfigurable, \ |
| 222 "'getOwnPropertyDescriptor' on proxy: trap reported non-configurability " \ |
| 223 "for property '%' which is either non-existant or configurable in the " \ |
| 224 "proxy target") \ |
| 225 T(ProxyGetOwnPropertyDescriptorNonExtensible, \ |
| 226 "'getOwnPropertyDescriptor' on proxy: trap returned undefined for " \ |
| 227 "property '%' which exists in the non-extensible proxy target") \ |
| 228 T(ProxyGetOwnPropertyDescriptorUndefined, \ |
| 229 "'getOwnPropertyDescriptor' on proxy: trap returned undefined for " \ |
| 230 "property '%' which is non-configurable in the proxy target") \ |
| 231 T(ProxyGetPrototypeOfInvalid, \ |
| 232 "'getPrototypeOf' on proxy: trap returned neither object nor null") \ |
| 233 T(ProxyGetPrototypeOfNonExtensible, \ |
| 234 "'getPrototypeOf' on proxy: proxy target is non-extensible but the " \ |
| 235 "trap did not return its actual prototype") \ |
205 T(ProxyHandlerOrTargetRevoked, \ | 236 T(ProxyHandlerOrTargetRevoked, \ |
206 "Cannot create proxy with a revoked proxy as handler or target") \ | 237 "Cannot create proxy with a revoked proxy as target or handler") \ |
| 238 T(ProxyHasNonConfigurable, \ |
| 239 "'has' on proxy: trap returned falsish for property '%' which exists in " \ |
| 240 "the proxy target as non-configurable") \ |
| 241 T(ProxyHasNonExtensible, \ |
| 242 "'has' on proxy: trap returned falsish for property '%' but the proxy " \ |
| 243 "target is not extensible") \ |
| 244 T(ProxyIsExtensibleInconsistent, \ |
| 245 "'isExtensible' on proxy: trap result does not reflect extensibility of " \ |
| 246 "proxy target (which is '%')") \ |
| 247 T(ProxyNonObject, \ |
| 248 "Cannot create proxy with a non-object as target or handler") \ |
| 249 T(ProxyOwnKeysMissing, \ |
| 250 "'ownKeys' on proxy: trap result did not include '%'") \ |
| 251 T(ProxyOwnKeysNonExtensible, \ |
| 252 "'ownKeys' on proxy: trap returned extra keys but proxy target is " \ |
| 253 "non-extensible") \ |
| 254 T(ProxyPreventExtensionsExtensible, \ |
| 255 "'preventExtensions' on proxy: trap returned truish but the proxy target " \ |
| 256 "is extensible") \ |
207 T(ProxyRevoked, "Cannot perform '%' on a proxy that has been revoked") \ | 257 T(ProxyRevoked, "Cannot perform '%' on a proxy that has been revoked") \ |
208 T(ProxyTargetNotExtensible, "Proxy target is not extensible") \ | 258 T(ProxySetFrozenData, \ |
209 T(ProxyTargetNonObject, "Proxy target is non-object") \ | 259 "'set' on proxy: trap returned truish for property '%' which exists in " \ |
210 T(ProxyTargetPropNotConfigurable, \ | 260 "the proxy target as a non-configurable and non-writable data property " \ |
211 "Proxy target property '%' is not configurable") \ | 261 "with a different value") \ |
212 T(ProxyTrapConstructMustReturnObject, \ | 262 T(ProxySetFrozenAccessor, \ |
213 "Construct trap must return Object, but got ''%s'.") \ | 263 "'set' on proxy: trap returned truish for property '%' which exists in " \ |
214 T(ProxyTrapFunctionExpected, \ | 264 "the proxy target as a non-configurable and non-writable accessor " \ |
215 "Proxy.createFunction called with non-function for '%' trap") \ | 265 "property without a setter") \ |
216 T(ProxyTrapOwnKeysResultMustInclude, \ | 266 T(ProxySetPrototypeOfNonExtensible, \ |
217 "Result of trap 'ownKeys' must include '%'.") \ | 267 "'setPrototypeOf' on proxy: trap returned truish for setting a new " \ |
218 T(ProxyTrapReturned, "Proxy handler % returned % from '%' trap") \ | 268 "prototype on the non-extensible proxy target") \ |
219 T(ProxyTrapReturnedFalseish, \ | 269 T(ProxyTrapReturnedFalsish, "'%' on proxy: trap returned falsish") \ |
220 "Proxy handler % returned false value '%' from '%' trap") \ | 270 T(ProxyTrapReturnedFalsishFor, \ |
221 T(ProxyTrapReturnedNonObject, \ | 271 "'%' on proxy: trap returned falsish for property '%'") \ |
222 "Proxy handler % returned % from '%' trap instead of an Object") \ | |
223 T(ProxyTrapDescriptorNonConfigurable, \ | |
224 "Proxy %s trap returned non-configurable PropertyDescriptor for property " \ | |
225 "'%' even though the property on the Proxy target is configurable") \ | |
226 T(ProxyTrapViolatesInvariant, \ | |
227 "Result of trap '%' is inconsistent with proxy's target") \ | |
228 T(RedefineDisallowed, "Cannot redefine property: %") \ | 272 T(RedefineDisallowed, "Cannot redefine property: %") \ |
229 T(RedefineExternalArray, \ | 273 T(RedefineExternalArray, \ |
230 "Cannot redefine a property of an object with external array elements") \ | 274 "Cannot redefine a property of an object with external array elements") \ |
231 T(ReduceNoInitial, "Reduce of empty array with no initial value") \ | 275 T(ReduceNoInitial, "Reduce of empty array with no initial value") \ |
232 T(RegExpFlags, \ | 276 T(RegExpFlags, \ |
233 "Cannot supply flags when constructing one RegExp from another") \ | 277 "Cannot supply flags when constructing one RegExp from another") \ |
234 T(RegExpNonObject, "% getter called on non-object %") \ | 278 T(RegExpNonObject, "% getter called on non-object %") \ |
235 T(RegExpNonRegExp, "% getter called on non-RegExp object") \ | 279 T(RegExpNonRegExp, "% getter called on non-RegExp object") \ |
236 T(ReinitializeIntl, "Trying to re-initialize % object.") \ | 280 T(ReinitializeIntl, "Trying to re-initialize % object.") \ |
237 T(ResolvedOptionsCalledOnNonObject, \ | 281 T(ResolvedOptionsCalledOnNonObject, \ |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 537 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
494 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 538 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
495 Handle<Object> data); | 539 Handle<Object> data); |
496 }; | 540 }; |
497 | 541 |
498 | 542 |
499 } // namespace internal | 543 } // namespace internal |
500 } // namespace v8 | 544 } // namespace v8 |
501 | 545 |
502 #endif // V8_MESSAGES_H_ | 546 #endif // V8_MESSAGES_H_ |
OLD | NEW |