diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 07:07:09 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 07:07:09 -0400 |
commit | 5524318fe73a1123da10491a6a545b50af88ea60 (patch) | |
tree | 9712c640ba812c85594926f5f407f30a42d235a6 /dom/base/CustomElementRegistry.cpp | |
parent | 3a74795a56e92313c1b33a54500917794ba09b72 (diff) | |
download | UXP-5524318fe73a1123da10491a6a545b50af88ea60.tar UXP-5524318fe73a1123da10491a6a545b50af88ea60.tar.gz UXP-5524318fe73a1123da10491a6a545b50af88ea60.tar.lz UXP-5524318fe73a1123da10491a6a545b50af88ea60.tar.xz UXP-5524318fe73a1123da10491a6a545b50af88ea60.zip |
Bug 1416999 - Remove document.registerElement
Tag #1375
Diffstat (limited to 'dom/base/CustomElementRegistry.cpp')
-rw-r--r-- | dom/base/CustomElementRegistry.cpp | 19 |
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; |