mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 847773 - Added override for GetWrapperCache with smart pointer argument to resolve ambiguity in templates. r=bz
This commit is contained in:
parent
15dc264ece
commit
429899b456
@ -5059,7 +5059,7 @@ nsDocument::Register(JSContext* aCx, const nsAString& aName,
|
||||
// Don't abort the upgrade algorithm if the callback throws an
|
||||
// exception.
|
||||
ErrorResult dummy;
|
||||
aOptions.mLifecycle.mCreated->Call(newElement.get(), dummy);
|
||||
aOptions.mLifecycle.mCreated->Call(newElement, dummy);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMElementReplaceEvent> ptEvent = do_QueryInterface(event);
|
||||
|
@ -696,6 +696,15 @@ GetWrapperCache(void* p)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Helper template for smart pointers to resolve ambiguity between
|
||||
// GetWrappeCache(void*) and GetWrapperCache(const ParentObject&).
|
||||
template <template <typename> class SmartPtr, typename T>
|
||||
inline nsWrapperCache*
|
||||
GetWrapperCache(const SmartPtr<T>& aObject)
|
||||
{
|
||||
return GetWrapperCache(aObject.get());
|
||||
}
|
||||
|
||||
/**
|
||||
* A method to handle new-binding wrap failure, by possibly falling back to
|
||||
* wrapping as a non-new-binding object.
|
||||
|
Loading…
Reference in New Issue
Block a user