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

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: 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
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()) {
Dan Ehrenberg 2016/06/21 00:04:49 This will crash if there is an exception. Instead,
bakkot 2016/06/21 00:48:34 MAYBE_RETURN will have returned if success is Noth
+ isolate->CountUsage(v8::Isolate::kDefineGetterOrSetterWouldThrow);
+ }
// 6. Return undefined.
return isolate->heap()->undefined_value();
}
« no previous file with comments | « include/v8.h ('k') | test/cctest/BUILD.gn » ('j') | test/cctest/test-usecounters.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698