Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Unified Diff: src/messages.h

Issue 1527583002: [proxies] Improve error messages. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/js/v8natives.js ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.h
diff --git a/src/messages.h b/src/messages.h
index 6fc810430e3d2631a5f26df6e1e9ab53ec19a282..5032980895cbba10bf6eefe544f6bf25de21a7dd 100644
--- a/src/messages.h
+++ b/src/messages.h
@@ -185,46 +185,90 @@ class CallSite {
T(ProtoObjectOrNull, "Object prototype may only be an Object or null: %") \
T(PrototypeParentNotAnObject, \
"Class extends value does not have valid prototype property %") \
- T(ProxyDeletePropertyViolatesInvariant, \
- "Trap 'deleteProperty' returned true but property '%' is not configurable" \
- " in the proxy target") \
- T(ProxyHandlerNonObject, "Cannot create proxy with non-object as handler") \
- T(ProxyHandlerTrapMissing, "Proxy handler % has no '%' trap") \
- T(ProxyHandlerTrapMustBeCallable, \
- "Proxy handler % has non-callable '%' trap") \
- T(ProxySetPrototypeFailed, \
- "Proxy handler returned false when setting prototype '%'") \
- T(ProxyNonObjectPropNames, "Trap '%' returned non-object %") \
- T(ProxyPreventExtensionsViolatesInvariant, \
- "Trap 'preventExtensions' returned true but the proxy's target is " \
- "extensible") \
- T(ProxyPropNotConfigurable, \
- "Proxy handler % returned non-configurable descriptor for property '%' " \
- "from '%' trap") \
- T(ProxyRepeatedPropName, "Trap '%' returned repeated property name '%'") \
+ T(ProxyConstructNonObject, \
+ "'construct' on proxy: trap returned non-object ('%')") \
+ T(ProxyDefinePropertyNonConfigurable, \
+ "'defineProperty' on proxy: trap returned truish for defining " \
+ "non-configurable property '%' which is either non-existant or " \
+ "configurable in the proxy target") \
+ T(ProxyDefinePropertyNonExtensible, \
+ "'defineProperty' on proxy: trap returned truish for adding property '%' " \
+ " to the non-extensible proxy target") \
+ T(ProxyDefinePropertyIncompatible, \
+ "'defineProperty' on proxy: trap returned truish for adding property '%' " \
+ " that is incompatible with the existing property in the proxy target") \
+ T(ProxyDeletePropertyNonConfigurable, \
+ "'deleteProperty' on proxy: trap returned truish for property '%' which " \
+ "is non-configurable in the proxy target") \
+ T(ProxyEnumerateNonObject, "'enumerate' on proxy: trap returned non-object") \
+ T(ProxyEnumerateNonString, \
+ "'enumerate' on proxy: trap result includes non-string") \
+ T(ProxyGetNonConfigurableData, \
+ "'get' on proxy: property '%' is a read-only and " \
+ "non-configurable data property on the proxy target but the proxy " \
+ "did not return its actual value (expected '%' but got '%')") \
+ T(ProxyGetNonConfigurableAccessor, \
+ "'get' on proxy: property '%' is a non-configurable accessor " \
+ "property on the proxy target and does not have a getter function, but " \
+ "the trap did not return 'undefined' (got '%')") \
+ T(ProxyGetOwnPropertyDescriptorIncompatible, \
+ "'getOwnPropertyDescriptor' on proxy: trap returned descriptor for " \
+ "property '%' that is incompatible with the existing property in the " \
+ "proxy target") \
+ T(ProxyGetOwnPropertyDescriptorInvalid, \
+ "'getOwnPropertyDescriptor' on proxy: trap returned neither object nor " \
+ "undefined for property '%'") \
+ T(ProxyGetOwnPropertyDescriptorNonConfigurable, \
+ "'getOwnPropertyDescriptor' on proxy: trap reported non-configurability " \
+ "for property '%' which is either non-existant or configurable in the " \
+ "proxy target") \
+ T(ProxyGetOwnPropertyDescriptorNonExtensible, \
+ "'getOwnPropertyDescriptor' on proxy: trap returned undefined for " \
+ "property '%' which exists in the non-extensible proxy target") \
+ T(ProxyGetOwnPropertyDescriptorUndefined, \
+ "'getOwnPropertyDescriptor' on proxy: trap returned undefined for " \
+ "property '%' which is non-configurable in the proxy target") \
+ T(ProxyGetPrototypeOfInvalid, \
+ "'getPrototypeOf' on proxy: trap returned neither object nor null") \
+ T(ProxyGetPrototypeOfNonExtensible, \
+ "'getPrototypeOf' on proxy: proxy target is non-extensible but the " \
+ "trap did not return its actual prototype") \
T(ProxyHandlerOrTargetRevoked, \
- "Cannot create proxy with a revoked proxy as handler or target") \
+ "Cannot create proxy with a revoked proxy as target or handler") \
+ T(ProxyHasNonConfigurable, \
+ "'has' on proxy: trap returned falsish for property '%' which exists in " \
+ "the proxy target as non-configurable") \
+ T(ProxyHasNonExtensible, \
+ "'has' on proxy: trap returned falsish for property '%' but the proxy " \
+ "target is not extensible") \
+ T(ProxyIsExtensibleInconsistent, \
+ "'isExtensible' on proxy: trap result does not reflect extensibility of " \
+ "proxy target (which is '%')") \
+ T(ProxyNonObject, \
+ "Cannot create proxy with a non-object as target or handler") \
+ T(ProxyOwnKeysMissing, \
+ "'ownKeys' on proxy: trap result did not include '%'") \
+ T(ProxyOwnKeysNonExtensible, \
+ "'ownKeys' on proxy: trap returned extra keys but proxy target is " \
+ "non-extensible") \
+ T(ProxyPreventExtensionsExtensible, \
+ "'preventExtensions' on proxy: trap returned truish but the proxy target " \
+ "is extensible") \
T(ProxyRevoked, "Cannot perform '%' on a proxy that has been revoked") \
- T(ProxyTargetNotExtensible, "Proxy target is not extensible") \
- T(ProxyTargetNonObject, "Proxy target is non-object") \
- T(ProxyTargetPropNotConfigurable, \
- "Proxy target property '%' is not configurable") \
- T(ProxyTrapConstructMustReturnObject, \
- "Construct trap must return Object, but got ''%s'.") \
- T(ProxyTrapFunctionExpected, \
- "Proxy.createFunction called with non-function for '%' trap") \
- T(ProxyTrapOwnKeysResultMustInclude, \
- "Result of trap 'ownKeys' must include '%'.") \
- T(ProxyTrapReturned, "Proxy handler % returned % from '%' trap") \
- T(ProxyTrapReturnedFalseish, \
- "Proxy handler % returned false value '%' from '%' trap") \
- T(ProxyTrapReturnedNonObject, \
- "Proxy handler % returned % from '%' trap instead of an Object") \
- T(ProxyTrapDescriptorNonConfigurable, \
- "Proxy %s trap returned non-configurable PropertyDescriptor for property " \
- "'%' even though the property on the Proxy target is configurable") \
- T(ProxyTrapViolatesInvariant, \
- "Result of trap '%' is inconsistent with proxy's target") \
+ T(ProxySetFrozenData, \
+ "'set' on proxy: trap returned truish for property '%' which exists in " \
+ "the proxy target as a non-configurable and non-writable data property " \
+ "with a different value") \
+ T(ProxySetFrozenAccessor, \
+ "'set' on proxy: trap returned truish for property '%' which exists in " \
+ "the proxy target as a non-configurable and non-writable accessor " \
+ "property without a setter") \
+ T(ProxySetPrototypeOfNonExtensible, \
+ "'setPrototypeOf' on proxy: trap returned truish for setting a new " \
+ "prototype on the non-extensible proxy target") \
+ T(ProxyTrapReturnedFalsish, "'%' on proxy: trap returned falsish") \
+ T(ProxyTrapReturnedFalsishFor, \
+ "'%' on proxy: trap returned falsish for property '%'") \
T(RedefineDisallowed, "Cannot redefine property: %") \
T(RedefineExternalArray, \
"Cannot redefine a property of an object with external array elements") \
« no previous file with comments | « src/js/v8natives.js ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698