Closed Bug 416212 Opened 18 years ago Closed 18 years ago

Elsa: parse nsDragService.ii

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dmandelin, Assigned: dmandelin)

Details

This file can't be parsed. It's not clear what the problem is, but it looks like Elsa is too restrictive in checking some usage of nsCOMPtr. This problem actually existed even with gcc 3.4 headers.
The problem is that at nsDragService.cpp:204, where mSelection (which is an nsCOMPtr<ISelection>) is used in a context requiring a boolean, Elsa seems to have chosen to add a conversion to nsDerivedSafe<ISelection> to allow the comparison. nsDerivedSafe<ISelection> inherits ISelection, which is incomplete in this file, so it is an error. Now I need to find out what it should really be converting to according to C++ and make Elsa do that.
Fixed. In detail, the problem was that the correct C++ conversion gets a value of type 'nsDerivedSafe<ISelection>*' for use in the boolean. ISelection isn't defined here, but that's fine because this is a pointer type. Elsa just went ahead and tried to instantiate the type nsDerivedSafe<ISelection>, because in some situations, you can get a needed conversion only by instantiating the type. (Specifically, if you were trying to pass to an ISelection*.) I changed Elsa so that it still tries to instantiate, in case it helps, but if instantiation fails, it doesn't complain about it.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.