Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index d1cbbc4b3ffb638d34dea2bf22f7210d5f8f3f97..7c614af97b19da1afaf3e29c35c9dfa1600c71ee 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -1708,6 +1708,9 @@ Object* ObjectDefineAccessor(Isolate* isolate, Handle<Object> object, |
Maybe<bool> success = JSReceiver::DefineOwnProperty( |
isolate, receiver, name, &desc, Object::DONT_THROW); |
MAYBE_RETURN(success, isolate->heap()->exception()); |
+ if (!success.FromJust()) { |
+ isolate->CountUsage(v8::Isolate::kDefineGetterOrSetterWouldThrow); |
+ } |
// 6. Return undefined. |
return isolate->heap()->undefined_value(); |
} |