Index: src/runtime/runtime-classes.cc |
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc |
index 2165652f031c783e2e5da3f4a9b07b2d2bf7fb3a..dc827284cf131ac9fd1792913a751bbc8346585b 100644 |
--- a/src/runtime/runtime-classes.cc |
+++ b/src/runtime/runtime-classes.cc |
@@ -234,11 +234,12 @@ RUNTIME_FUNCTION(Runtime_FinalizeClassDefinition) { |
if (constructor->map()->is_strong()) { |
DCHECK(prototype->map()->is_strong()); |
- RETURN_FAILURE_ON_EXCEPTION(isolate, JSObject::Freeze(prototype)); |
- Handle<Object> result; |
- ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
- JSObject::Freeze(constructor)); |
- return *result; |
+ MAYBE_RETURN(JSReceiver::SetIntegrityLevel(prototype, FROZEN, |
+ Object::THROW_ON_ERROR), |
+ isolate->heap()->exception()); |
+ MAYBE_RETURN(JSReceiver::SetIntegrityLevel(constructor, FROZEN, |
+ Object::THROW_ON_ERROR), |
+ isolate->heap()->exception()); |
} |
return *constructor; |
} |