Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsHtml5ReleasableAttributeName.h"
6 #include "nsHtml5Portability.h"
7 #include "nsHtml5AtomTable.h"
9 nsHtml5ReleasableAttributeName::nsHtml5ReleasableAttributeName(int32_t* uri, nsIAtom** local, nsIAtom** prefix)
10 : nsHtml5AttributeName(uri, local, prefix)
11 {
12 }
14 nsHtml5AttributeName*
15 nsHtml5ReleasableAttributeName::cloneAttributeName(nsHtml5AtomTable* aInterner)
16 {
17 nsIAtom* l = getLocal(0);
18 if (aInterner) {
19 if (!l->IsStaticAtom()) {
20 nsAutoString str;
21 l->ToString(str);
22 l = aInterner->GetAtom(str);
23 }
24 }
25 return new nsHtml5ReleasableAttributeName(nsHtml5AttributeName::ALL_NO_NS,
26 nsHtml5AttributeName::SAME_LOCAL(l),
27 nsHtml5AttributeName::ALL_NO_PREFIX);
28 }
30 void
31 nsHtml5ReleasableAttributeName::release()
32 {
33 delete this;
34 }