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

Unified Diff: src/api.cc

Issue 1889903003: [api] Expose ES6 7.3.14 SetIntegrityLevel on v8::Object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 5aea79984777b30081c3c3bc9a705a42a896ae95..e195e6abc0246c30859f225eeb4588038bd21712 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -3912,6 +3912,19 @@ Local<String> v8::Object::GetConstructorName() {
return Utils::ToLocal(name);
}
+Maybe<bool> v8::Object::SetIntegrityLevel(Local<Context> context,
+ IntegrityLevel level) {
+ PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::SetIntegrityLevel()",
+ bool);
+ auto self = Utils::OpenHandle(this);
+ i::JSReceiver::IntegrityLevel i_level =
+ level == IntegrityLevel::kFrozen ? i::FROZEN : i::SEALED;
+ Maybe<bool> result =
+ i::JSReceiver::SetIntegrityLevel(self, i_level, i::Object::DONT_THROW);
+ has_pending_exception = result.IsNothing();
+ RETURN_ON_FAILED_EXECUTION_PRIMITIVE(bool);
+ return result;
+}
Maybe<bool> v8::Object::Delete(Local<Context> context, Local<Value> key) {
PREPARE_FOR_EXECUTION_PRIMITIVE(context, "v8::Object::Delete()", bool);
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698