Refactor ShadowRoot exception handling
[WebKit-https.git] / Source / WebCore / html / shadow / TextFieldDecorationElement.cpp
index 79a1d22..9ec543a 100644 (file)
@@ -90,7 +90,7 @@ static inline void getDecorationRootAndDecoratedRoot(HTMLInputElement* input, Sh
     if (newRoot)
         newRoot->removeChild(newRoot->firstChild());
     else
-        newRoot = ShadowRoot::create(input, ShadowRoot::UserAgentShadowRoot, ASSERT_NO_EXCEPTION).get();
+        newRoot = input->ensureUserAgentShadowRoot();
     decorationRoot = newRoot;
     decoratedRoot = existingRoot;
 }