зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1496147 - part 0: Use alias template to define StrongPtrForMember<T>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64056 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
356b8e5725
Коммит
2a9b28c762
|
@ -3066,10 +3066,8 @@ template <class T, template <typename> class SmartPtr, class S>
|
|||
inline void StrongOrRawPtr(SmartPtr<S>&& aPtr) = delete;
|
||||
|
||||
template <class T>
|
||||
struct StrongPtrForMember {
|
||||
typedef typename Conditional<IsRefcounted<T>::value, RefPtr<T>,
|
||||
nsAutoPtr<T>>::Type Type;
|
||||
};
|
||||
using StrongPtrForMember =
|
||||
typename Conditional<IsRefcounted<T>::value, RefPtr<T>, nsAutoPtr<T>>::Type;
|
||||
|
||||
namespace binding_detail {
|
||||
inline JSObject* GetHackedNamespaceProtoObject(JSContext* aCx) {
|
||||
|
|
|
@ -7314,7 +7314,7 @@ def getRetvalDeclarationForType(returnType, descriptorProvider,
|
|||
typeName = "Promise"
|
||||
if isMember:
|
||||
conversion = None
|
||||
result = CGGeneric("StrongPtrForMember<%s>::Type" % typeName)
|
||||
result = CGGeneric("StrongPtrForMember<%s>" % typeName)
|
||||
else:
|
||||
conversion = CGGeneric("StrongOrRawPtr<%s>" % typeName)
|
||||
result = CGGeneric("auto")
|
||||
|
|
Загрузка…
Ссылка в новой задаче