diff --git a/core/includes/Drupal/Context/Context.php b/core/includes/Drupal/Context/Context.php
index 30b889e..b801867 100644
--- a/core/includes/Drupal/Context/Context.php
+++ b/core/includes/Drupal/Context/Context.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Context;
 
+use Closure;
+
 /**
  * Default Drupal context object.
  *
@@ -17,11 +19,11 @@ class Context implements ContextInterface {
   protected $queryString;
 
   /**
-   * Index of registered handler classes.
+   * Index of registered handler creation closures.
    *
    * @var array
    */
-  protected $handlerClasses = array();
+  protected $handlerClosures = array();
 
   /**
    * Index of already-instantiated handler objects.
@@ -120,10 +122,10 @@ class Context implements ContextInterface {
       $key_elements = explode(':', $context_key);
       $args = array();
       while ($key_elements) {
-        if (isset($this->handlerClasses[$local_key])) {
+        if (isset($this->handlerClosures[$local_key])) {
           // Lazy handler instanciation.
-          if (!isset($this->handlers[$local_key]) && class_exists($this->handlerClasses[$local_key]['class'])) {
-            $this->handlers[$local_key] = new $this->handlerClasses[$local_key]['class']($this->handlerClasses[$local_key]['params']);
+          if (!isset($this->handlers[$local_key])) {
+            $this->handlers[$local_key] = $this->handlerClosures[$local_key]();
           }
 
           if (isset($this->handlers[$local_key])) {
@@ -181,11 +183,11 @@ class Context implements ContextInterface {
   /**
    * Implmenents DrupalContextInterface::setHandler().
    */
-  public function setHandler($context_key, $class, $params = array()) {
+  public function setHandler($context_key, Closure $callback) {
     if ($this->locked) {
       throw new LockedException(t('This context object has been locked. It no longer accepts new handler registrations.'));
     }
-    $this->handlerClasses[$context_key] = array('class' => $class, 'params' => $params);
+    $this->handlerClosures[$context_key] = $callback;
   }
 
   /**
diff --git a/core/includes/Drupal/Context/ContextInterface.php b/core/includes/Drupal/Context/ContextInterface.php
index 19dc0e4..ca2282a 100644
--- a/core/includes/Drupal/Context/ContextInterface.php
+++ b/core/includes/Drupal/Context/ContextInterface.php
@@ -2,6 +2,8 @@
 
 namespace Drupal\Context;
 
+use Closure;
+
 /**
  * Interface definition for all context objects.
  */
@@ -53,7 +55,7 @@ interface ContextInterface {
    * @param array $params
    *   An array of configuration options for the class.
    */
-  public function setHandler($context_key, $class, $params = array());
+  public function setHandler($context_key, Closure $callback);
 
   /**
    * Sets an explict value for a context key.
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 0c69262..450d24e 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -1924,10 +1924,15 @@ function system_init() {
  */
 function system_context_init(\Drupal\Context\ContextInterface $context) {
 
-  $context->setHandler('http', '\Drupal\Context\Handler\HandlerHttp');
-  $context->setHandler('path:raw', '\Drupal\Context\Handler\HandlerPathRaw');
-  $context->setHandler('path:system', '\Drupal\Context\Handler\HandlerPathSystem');
-
+  $context->setHandler('http', function() {
+    return new \Drupal\Context\Handler\HandlerHttp();
+  });
+  $context->setHandler('path:raw', function() {
+    return new \Drupal\Context\Handler\HandlerPathRaw();
+  });
+  $context->setHandler('path:system', function() {
+    return new \Drupal\Context\Handler\HandlerPathSystem();
+  });
 }
 
 
