Index: src/runtime/runtime-object.cc |
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc |
index 674cc89076586a540d417c29ce102b8f3acdf4e2..4441f47aaa2d0ad69184f4d1692bf19857ca1be4 100644 |
--- a/src/runtime/runtime-object.cc |
+++ b/src/runtime/runtime-object.cc |
@@ -343,6 +343,17 @@ RUNTIME_FUNCTION(Runtime_ObjectFreeze) { |
} |
+RUNTIME_FUNCTION(Runtime_ObjectIsFrozen) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 1); |
+ CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0); |
+ |
+ Maybe<bool> result = JSReceiver::TestIntegrityLevel(object, FROZEN); |
+ MAYBE_RETURN(result, isolate->heap()->exception()); |
+ return isolate->heap()->ToBoolean(result.FromJust()); |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_ObjectSeal) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 1); |
@@ -355,6 +366,17 @@ RUNTIME_FUNCTION(Runtime_ObjectSeal) { |
} |
+RUNTIME_FUNCTION(Runtime_ObjectIsSealed) { |
+ HandleScope scope(isolate); |
+ DCHECK(args.length() == 1); |
+ CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0); |
+ |
+ Maybe<bool> result = JSReceiver::TestIntegrityLevel(object, SEALED); |
+ MAYBE_RETURN(result, isolate->heap()->exception()); |
+ return isolate->heap()->ToBoolean(result.FromJust()); |
+} |
+ |
+ |
RUNTIME_FUNCTION(Runtime_LoadGlobalViaContext) { |
HandleScope scope(isolate); |
DCHECK_EQ(1, args.length()); |