diff --git a/core/includes/install.core.inc b/core/includes/install.core.inc
index 5594343..e6a5338 100644
--- a/core/includes/install.core.inc
+++ b/core/includes/install.core.inc
@@ -341,7 +341,7 @@ function install_begin_request(&$install_state) {
 
   // If it is not, replace the configuration storage with the InstallStorage
   // implementation, for the following reasons:
-  // - The first call into drupal_container() will try to set up the regular
+  // - The first call to $kernel->getContainer() will try to set up the regular
   //   runtime configuration storage, using the CachedStorage by default. It
   //   calls config_get_config_directory() to retrieve the config directory to
   //   use, but that throws an exception, since $config_directories is not
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index f9ae056..54c1538 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -2150,7 +2150,7 @@ function system_page_build(&$page) {
  * Implements hook_custom_theme().
  */
 function system_custom_theme() {
-  if (drupal_container()->isScopeActive('request')) {
+  if (\Drupal::getContainer()->isScopeActive('request')) {
     $request = \Drupal::request();
     $path = $request->attributes->get('_system_path');
     if (user_access('view the administration theme') && path_is_admin($path)) {
