Unverified Commit 3f19f9d3 authored by Alex Pott's avatar Alex Pott
Browse files

perf: #3574198 TypedDataManager prototypes should not include the parent context

By: catch
(cherry picked from commit b3c46ac0)
parent a0e1b4ec
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -205,7 +205,11 @@ public function getPropertyInstance(TypedDataInterface $object, $property_name,
      }
      // Create the prototype without any value, but with initial parenting
      // so that constructors can set up the objects correctly.
      $this->prototypes[$key] = $this->create($definition, NULL, $property_name, $object);
      $prototype = $this->create($definition, NULL, $property_name, $object);
      // Unset the parent so that it is not statically cached within the
      // prototype. It will be set again later anyway.
      $prototype->setContext(NULL, NULL);
      $this->prototypes[$key] = $prototype;
    }

    // Clone the prototype, update its parenting information, and assign the