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

Unified Diff: src/builtins.cc

Issue 2089533002: add use counters for __defineGetter__ failing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use appropriate copyright notice Created 4 years, 6 months 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
« include/v8.h ('K') | « include/v8.h ('k') | test/cctest/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« include/v8.h ('K') | « include/v8.h ('k') | test/cctest/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698