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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(ProxyDeletePropertyViolatesInvariant, \ |
189 "Trap 'deleteProperty' returned true but property '%' is not configurable" \ | 189 "Trap 'deleteProperty' returned true but property '%' is not configurable" \ |
190 " in the proxy target") \ | 190 " in the proxy target") \ |
191 T(ProxyHandlerNonObject, "Cannot create proxy with non-object as handler") \ | 191 T(ProxyHandlerNonObject, "Cannot create proxy with non-object as handler") \ |
192 T(ProxyHandlerReturned, "Proxy handler % returned % from '%' trap") \ | |
193 T(ProxyHandlerTrapMissing, "Proxy handler % has no '%' trap") \ | 192 T(ProxyHandlerTrapMissing, "Proxy handler % has no '%' trap") \ |
194 T(ProxyHandlerTrapMustBeCallable, \ | 193 T(ProxyHandlerTrapMustBeCallable, \ |
195 "Proxy handler % has non-callable '%' trap") \ | 194 "Proxy handler % has non-callable '%' trap") \ |
196 T(ProxySetPrototypeFailed, \ | 195 T(ProxySetPrototypeFailed, \ |
197 "Proxy handler returned false when setting prototype '%'") \ | 196 "Proxy handler returned false when setting prototype '%'") \ |
198 T(ProxyNonObjectPropNames, "Trap '%' returned non-object %") \ | 197 T(ProxyNonObjectPropNames, "Trap '%' returned non-object %") \ |
199 T(ProxyPreventExtensionsViolatesInvariant, \ | 198 T(ProxyPreventExtensionsViolatesInvariant, \ |
200 "Trap 'preventExtensions' returned true but the proxy's target is " \ | 199 "Trap 'preventExtensions' returned true but the proxy's target is " \ |
201 "extensible") \ | 200 "extensible") \ |
202 T(ProxyPropNotConfigurable, \ | 201 T(ProxyPropNotConfigurable, \ |
203 "Proxy handler % returned non-configurable descriptor for property '%' " \ | 202 "Proxy handler % returned non-configurable descriptor for property '%' " \ |
204 "from '%' trap") \ | 203 "from '%' trap") \ |
205 T(ProxyRepeatedPropName, "Trap '%' returned repeated property name '%'") \ | 204 T(ProxyRepeatedPropName, "Trap '%' returned repeated property name '%'") \ |
206 T(ProxyHandlerOrTargetRevoked, \ | 205 T(ProxyHandlerOrTargetRevoked, \ |
207 "Cannot create proxy with a revoked proxy as handler or target") \ | 206 "Cannot create proxy with a revoked proxy as handler or target") \ |
208 T(ProxyRevoked, "Cannot perform '%' on a proxy that has been revoked") \ | 207 T(ProxyRevoked, "Cannot perform '%' on a proxy that has been revoked") \ |
209 T(ProxyTargetNotExtensible, "Proxy target is not extensible") \ | 208 T(ProxyTargetNotExtensible, "Proxy target is not extensible") \ |
210 T(ProxyTargetNonObject, "Proxy target is non-object") \ | 209 T(ProxyTargetNonObject, "Proxy target is non-object") \ |
211 T(ProxyTargetPropNotConfigurable, \ | 210 T(ProxyTargetPropNotConfigurable, \ |
212 "Proxy target property '%' is not configurable") \ | 211 "Proxy target property '%' is not configurable") \ |
213 T(ProxyTrapConstructMustReturnObject, \ | 212 T(ProxyTrapConstructMustReturnObject, \ |
214 "Construct trap must return Object, but got ''%s'.") \ | 213 "Construct trap must return Object, but got ''%s'.") \ |
215 T(ProxyTrapFunctionExpected, \ | 214 T(ProxyTrapFunctionExpected, \ |
216 "Proxy.createFunction called with non-function for '%' trap") \ | 215 "Proxy.createFunction called with non-function for '%' trap") \ |
217 T(ProxyTrapResultMustInclude, "Trap result must include %.") \ | 216 T(ProxyTrapOwnKeysResultMustInclude, \ |
| 217 "Result of trap 'ownKeys' must include '%'.") \ |
| 218 T(ProxyTrapReturned, "Proxy handler % returned % from '%' trap") \ |
| 219 T(ProxyTrapReturnedFalseish, \ |
| 220 "Proxy handler % returned false value '%' from '%' trap") \ |
| 221 T(ProxyTrapReturnedNonObject, \ |
| 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") \ |
218 T(ProxyTrapViolatesInvariant, \ | 226 T(ProxyTrapViolatesInvariant, \ |
219 "Result of trap '%' is inconsistent with proxy's target") \ | 227 "Result of trap '%' is inconsistent with proxy's target") \ |
220 T(RedefineDisallowed, "Cannot redefine property: %") \ | 228 T(RedefineDisallowed, "Cannot redefine property: %") \ |
221 T(RedefineExternalArray, \ | 229 T(RedefineExternalArray, \ |
222 "Cannot redefine a property of an object with external array elements") \ | 230 "Cannot redefine a property of an object with external array elements") \ |
223 T(ReduceNoInitial, "Reduce of empty array with no initial value") \ | 231 T(ReduceNoInitial, "Reduce of empty array with no initial value") \ |
224 T(RegExpFlags, \ | 232 T(RegExpFlags, \ |
225 "Cannot supply flags when constructing one RegExp from another") \ | 233 "Cannot supply flags when constructing one RegExp from another") \ |
226 T(RegExpNonObject, "% getter called on non-object %") \ | 234 T(RegExpNonObject, "% getter called on non-object %") \ |
227 T(RegExpNonRegExp, "% getter called on non-RegExp object") \ | 235 T(RegExpNonRegExp, "% getter called on non-RegExp object") \ |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); | 493 static Handle<String> GetMessage(Isolate* isolate, Handle<Object> data); |
486 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, | 494 static base::SmartArrayPointer<char> GetLocalizedMessage(Isolate* isolate, |
487 Handle<Object> data); | 495 Handle<Object> data); |
488 }; | 496 }; |
489 | 497 |
490 | 498 |
491 } // namespace internal | 499 } // namespace internal |
492 } // namespace v8 | 500 } // namespace v8 |
493 | 501 |
494 #endif // V8_MESSAGES_H_ | 502 #endif // V8_MESSAGES_H_ |
OLD | NEW |