Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp |
| index 389e73138753f140bd984e14be476c85357406f1..034a9a1b1d5a6b77fffe73a9ac3a54734d1def96 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.cpp |
| @@ -161,6 +161,15 @@ ScriptCustomElementDefinition::ScriptCustomElementDefinition( |
| HTMLElement* ScriptCustomElementDefinition::createElementSync( |
| Document& document, const QualifiedName& tagName, |
| + ExceptionState* exceptionState) |
| +{ |
| + return exceptionState |
| + ? createElementSync(document, tagName, *exceptionState) |
| + : createElementSync(document, tagName); |
|
esprehn
2016/08/30 21:32:32
merge them together, there should be a single path
|
| +} |
| + |
| +HTMLElement* ScriptCustomElementDefinition::createElementSync( |
| + Document& document, const QualifiedName& tagName, |
| ExceptionState& exceptionState) |
| { |
| DCHECK(ScriptState::current(m_scriptState->isolate()) == m_scriptState); |
| @@ -176,6 +185,9 @@ HTMLElement* ScriptCustomElementDefinition::createElementSync( |
| // window.document(), but it is different from the document here |
| // when it is an import document. This is not exactly what the |
| // spec defines, but the public behavior matches to the spec. |
| + |
| + // TODO(dominicc): Simplify this to match the DOM spec when HTML |
| + // Imports is removed. |
| Element* element = createElementForConstructor(document); |
| { |
| ConstructionStackScope constructionStackScope(this, element); |