mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 965634 - move nsString construction out of mozilla::dom::Register for a codesize win; r=bz
This commit is contained in:
parent
751ab92a6c
commit
adc3ce949d
@ -150,10 +150,28 @@ public:
|
||||
void RegisterDefineDOMInterface(const nsAFlatString& aName,
|
||||
mozilla::dom::DefineInterface aDefineDOMInterface,
|
||||
mozilla::dom::ConstructorEnabled* aConstructorEnabled);
|
||||
template<size_t N>
|
||||
void RegisterDefineDOMInterface(const char16_t (&aKey)[N],
|
||||
mozilla::dom::DefineInterface aDefineDOMInterface,
|
||||
mozilla::dom::ConstructorEnabled* aConstructorEnabled)
|
||||
{
|
||||
nsLiteralString key(aKey);
|
||||
return RegisterDefineDOMInterface(key, aDefineDOMInterface,
|
||||
aConstructorEnabled);
|
||||
}
|
||||
|
||||
void RegisterNavigatorDOMConstructor(const nsAFlatString& aName,
|
||||
mozilla::dom::ConstructNavigatorProperty aNavConstructor,
|
||||
mozilla::dom::ConstructorEnabled* aConstructorEnabled);
|
||||
template<size_t N>
|
||||
void RegisterNavigatorDOMConstructor(const char16_t (&aKey)[N],
|
||||
mozilla::dom::ConstructNavigatorProperty aNavConstructor,
|
||||
mozilla::dom::ConstructorEnabled* aConstructorEnabled)
|
||||
{
|
||||
nsLiteralString key(aKey);
|
||||
return RegisterNavigatorDOMConstructor(key, aNavConstructor,
|
||||
aConstructorEnabled);
|
||||
}
|
||||
|
||||
typedef PLDHashOperator
|
||||
(* NameEnumerator)(const nsAString& aGlobalName, void* aClosure);
|
||||
|
@ -9529,11 +9529,11 @@ class CGRegisterProtos(CGAbstractMethod):
|
||||
def _defineMacro(self):
|
||||
return """
|
||||
#define REGISTER_PROTO(_dom_class, _ctor_check) \\
|
||||
aNameSpaceManager->RegisterDefineDOMInterface(NS_LITERAL_STRING(#_dom_class), _dom_class##Binding::DefineDOMInterface, _ctor_check);
|
||||
aNameSpaceManager->RegisterDefineDOMInterface(MOZ_UTF16(#_dom_class), _dom_class##Binding::DefineDOMInterface, _ctor_check);
|
||||
#define REGISTER_CONSTRUCTOR(_dom_constructor, _dom_class, _ctor_check) \\
|
||||
aNameSpaceManager->RegisterDefineDOMInterface(NS_LITERAL_STRING(#_dom_constructor), _dom_class##Binding::DefineDOMInterface, _ctor_check);
|
||||
aNameSpaceManager->RegisterDefineDOMInterface(MOZ_UTF16(#_dom_constructor), _dom_class##Binding::DefineDOMInterface, _ctor_check);
|
||||
#define REGISTER_NAVIGATOR_CONSTRUCTOR(_prop, _dom_class, _ctor_check) \\
|
||||
aNameSpaceManager->RegisterNavigatorDOMConstructor(NS_LITERAL_STRING(_prop), _dom_class##Binding::ConstructNavigatorObject, _ctor_check);
|
||||
aNameSpaceManager->RegisterNavigatorDOMConstructor(MOZ_UTF16(_prop), _dom_class##Binding::ConstructNavigatorObject, _ctor_check);
|
||||
|
||||
"""
|
||||
def _undefineMacro(self):
|
||||
|
Loading…
Reference in New Issue
Block a user