Index: src/runtime/runtime-scopes.cc |
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc |
index 812355363566cbbb544f65358b6e993628eba3fb..e28549fcef80049da924b0afe239c6eac65e2e7d 100644 |
--- a/src/runtime/runtime-scopes.cc |
+++ b/src/runtime/runtime-scopes.cc |
@@ -864,7 +864,8 @@ RUNTIME_FUNCTION(Runtime_DeclareModules) { |
} |
} |
- JSObject::PreventExtensions(module).Assert(); |
+ if (JSObject::PreventExtensions(module, THROW_ON_ERROR).IsNothing()) |
+ DCHECK(false); |
} |
DCHECK(!isolate->has_pending_exception()); |