summaryrefslogtreecommitdiffstats
path: root/dom/base/CustomElementRegistry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base/CustomElementRegistry.cpp')
-rw-r--r--dom/base/CustomElementRegistry.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/dom/base/CustomElementRegistry.cpp b/dom/base/CustomElementRegistry.cpp
index e4d4c0670..67bd8e185 100644
--- a/dom/base/CustomElementRegistry.cpp
+++ b/dom/base/CustomElementRegistry.cpp
@@ -415,19 +415,6 @@ CustomElementRegistry::EnqueueLifecycleCallback(nsIDocument::ElementCallbackType
}
void
-CustomElementRegistry::GetCustomPrototype(nsIAtom* aAtom,
- JS::MutableHandle<JSObject*> aPrototype)
-{
- mozilla::dom::CustomElementDefinition* definition =
- mCustomDefinitions.GetWeak(aAtom);
- if (definition) {
- aPrototype.set(definition->mPrototype);
- } else {
- aPrototype.set(nullptr);
- }
-}
-
-void
CustomElementRegistry::UpgradeCandidates(nsIAtom* aKey,
CustomElementDefinition* aDefinition,
ErrorResult& aRv)
@@ -624,9 +611,9 @@ CustomElementRegistry::Define(const nsAString& aName,
*/
JSAutoCompartment ac(cx, constructor);
JS::Rooted<JS::Value> prototypev(cx);
- // The .prototype on the constructor passed from document.registerElement
- // is the "expando" of a wrapper. So we should get it from wrapper instead
- // instead of underlying object.
+ // The .prototype on the constructor passed could be an "expando" of a
+ // wrapper. So we should get it from wrapper instead of the underlying
+ // object.
if (!JS_GetProperty(cx, constructor, "prototype", &prototypev)) {
aRv.StealExceptionFromJSContext(cx);
return;