Commit d9a026e6 authored by franzih's avatar franzih Committed by Commit bot

[api] Minor improvement to documentation for kNonMasking.

BUG=

Review-Url: https://codereview.chromium.org/2302133003
Cr-Commit-Position: refs/heads/master@{#39137}
parent 6c51c7d3
...@@ -4992,20 +4992,19 @@ class V8_EXPORT FunctionTemplate : public Template { ...@@ -4992,20 +4992,19 @@ class V8_EXPORT FunctionTemplate : public Template {
friend class ObjectTemplate; friend class ObjectTemplate;
}; };
enum class PropertyHandlerFlags { enum class PropertyHandlerFlags {
kNone = 0, kNone = 0,
// See ALL_CAN_READ above. // See ALL_CAN_READ above.
kAllCanRead = 1, kAllCanRead = 1,
// Will not call into interceptor for properties on the receiver or prototype // Will not call into interceptor for properties on the receiver or prototype
// chain. Currently only valid for named interceptors. // chain, i.e., only call into interceptor for properties that do not exist.
// Currently only valid for named interceptors.
kNonMasking = 1 << 1, kNonMasking = 1 << 1,
// Will not call into interceptor for symbol lookup. Only meaningful for // Will not call into interceptor for symbol lookup. Only meaningful for
// named interceptors. // named interceptors.
kOnlyInterceptStrings = 1 << 2, kOnlyInterceptStrings = 1 << 2,
}; };
struct NamedPropertyHandlerConfiguration { struct NamedPropertyHandlerConfiguration {
NamedPropertyHandlerConfiguration( NamedPropertyHandlerConfiguration(
/** Note: getter is required **/ /** Note: getter is required **/
......
...@@ -4338,6 +4338,9 @@ THREADED_TEST(NonMaskingInterceptorOwnProperty) { ...@@ -4338,6 +4338,9 @@ THREADED_TEST(NonMaskingInterceptorOwnProperty) {
ExpectInt32("obj.whatever", 239); ExpectInt32("obj.whatever", 239);
CompileRun("obj.whatever = 4;"); CompileRun("obj.whatever = 4;");
// obj.whatever exists, thus it is not affected by the non-masking
// interceptor.
ExpectInt32("obj.whatever", 4); ExpectInt32("obj.whatever", 4);
CompileRun("delete obj.whatever;"); CompileRun("delete obj.whatever;");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment