diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index fb2f320..6aeafa3 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -887,7 +887,7 @@ function comment_links(CommentInterface $comment, EntityInterface $entity, $fiel
   }
 
   // Add translations link for translation-enabled comment bundles.
-  if (module_exists('content_translation') && content_translation_translate_access($comment)) {
+  if (\Drupal::moduleHandler()->moduleExists('content_translation') && content_translation_translate_access($comment)) {
     $links['comment-translations'] = array(
       'title' => t('translate'),
       'href' => 'comment/' . $comment->id() . '/translations',
diff --git a/core/modules/comment/comment.views.inc b/core/modules/comment/comment.views.inc
index e72e587..663704b 100644
--- a/core/modules/comment/comment.views.inc
+++ b/core/modules/comment/comment.views.inc
@@ -141,7 +141,7 @@ function comment_views_data() {
     ),
   );
 
-  if (module_exists('language')) {
+  if (\Drupal::moduleHandler()->moduleExists('language')) {
     $data['comment']['langcode'] = array(
       'title' => t('Language'),
       'help' => t('The language the comment is in.'),
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/StatisticsLastCommentName.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/StatisticsLastCommentName.php
index 63d881b..69ba945 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/StatisticsLastCommentName.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/StatisticsLastCommentName.php
@@ -38,7 +38,7 @@ public function query() {
         )
       )
     );
-    $join = drupal_container()->get('plugin.manager.views.join')->createInstance('standard', $definition);
+    $join = \Drupal::service('plugin.manager.views.join')->createInstance('standard', $definition);
 
     // nes_user alias so this can work with the sort handler, below.
     $this->user_table = $this->query->ensureTable('ces_users', $this->relationship, $join);
diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/StatisticsLastCommentName.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/StatisticsLastCommentName.php
index 41c518f..2f5108a 100644
--- a/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/StatisticsLastCommentName.php
+++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/sort/StatisticsLastCommentName.php
@@ -28,7 +28,7 @@ public function query() {
       'left_table' => 'comment_entity_statistics',
       'left_field' => 'last_comment_uid',
     );
-    $join = drupal_container()->get('plugin.manager.views.join')->createInstance('standard', $definition);
+    $join = \Drupal::service('plugin.manager.views.join')->createInstance('standard', $definition);
 
     // @todo this might be safer if we had an ensure_relationship rather than guessing
     // the table alias. Though if we did that we'd be guessing the relationship name
