Open
Bug 1771052
Opened 3 years ago
Updated 3 years ago
`nsCOMPtr` does not have a constructor which takes `StaticRefPtr<T>&`
Categories
(Core :: XPCOM, task)
Core
XPCOM
Tracking
()
NEW
People
(Reporter: masayuki, Unassigned)
Details
RefPtr has a constructor which takes StaticRefPtr<T>&. Therefore, this style is available:
StaticRefPtr<Foo> sFoo;
void Bar::DoSomething() {
RefPtr<Foo> foo = sFoo;
}
However, nsCOMPtr does not have the corresponding constructor. Therefore,
nsCOMPtr<Foo> foo = sFoo;
causes bustage, and you need to rewrite it with sFoo.get().
Updated•3 years ago
|
Type: defect → task
You need to log in
before you can comment on or make changes to this bug.
Description
•