CustomElements: upgrade element patch, setting custom element
state at the right time
HTMLConstructor should change status to "custom" only when the
definitions construction stack is empty, for example, when the
constructor is invoked with new.
If return value from the constructor is different from the
custom element, upgrade should throw "InvalidStateError"
DOMException.
BUG=594918
Review-Url: https://codereview.chromium.org/2161003002
Cr-Commit-Position: refs/heads/master@{#409445}
7 files changed