Image::SetHasError has callers that searchfox doesn't find
Categories
(Webtools :: Searchfox, enhancement)
Tracking
(Not tracked)
People
(Reporter: tnikkel, Unassigned)
References
(Depends on 1 open bug)
Details
https://dxr.mozilla.org/mozilla-central/search?q=%2Bcallers%3Amozilla%3A%3Aimage%3A%3AImage%3A%3ASetHasError%28%29 vs https://dxr.mozilla.org/mozilla-central/search?q=SetHasError
Comment 1•3 years ago
|
||
DXR is no longer available. Searchfox is now replacing it.
See meta bug 1669906 & https://groups.google.com/g/mozilla.dev.platform/c/jDRjrq3l-CY for more details.
Updated•3 years ago
|
Reporter | ||
Comment 2•3 years ago
|
||
This one still seems to be a problem with searchfox.
Comment 3•3 years ago
|
||
Which callers is it missing?
From this search, I see two:
https://searchfox.org/mozilla-central/search?q=SetHasError&path=
Which are also here:
https://searchfox.org/mozilla-central/search?q=symbol:_ZN7mozilla5image13ImageResource11SetHasErrorEv%2C_ZN7mozilla5image5Image11SetHasErrorEv&redirect=false
The two results look to cover the same set of things.
Reporter | ||
Comment 4•3 years ago
|
||
(In reply to Andrew McCreight [:mccr8] from comment #3)
Which are also here:
https://searchfox.org/mozilla-central/search?q=symbol:_ZN7mozilla5image13ImageResource11SetHasErrorEv%2C_ZN7mozilla5image5Image11SetHasErrorEv&redirect=false
That's searching ImageResource::SetHasError. If you search Image::SetHasError there are no uses listed. For both of the ways of searching it:
https://searchfox.org/mozilla-central/search?q=Image%3A%3ASetHasError&path=&case=false®exp=false
Comment 5•3 years ago
|
||
Ah, sorry. I didn't realize I clicked on the wrong one for my symbol search.
Comment 6•3 years ago
|
||
The use in BadImage looks like this:
template <typename T>
static already_AddRefed<Image> BadImage(const char* aMessage,
RefPtr<T>& aImage) {
aImage->SetHasError();
return aImage.forget();
}
It is then instantiated with T=RasterImage and VectorImage so that's a bit of a weird case. I guess I could understand why that might be missed, because nothing really guarantees that because BadImage could be instantiated with two subclasses of Image that Image itself will work, although this specific location of course is always a call on Image.
The other use at mInnerImage->SetHasError()
looks odder. You can even click on the SetHasError() to look for uses, and it doesn't show up in the results. So it clearly knows somewhere that that's Image::SetHasError. ImageWrapper doesn't even have any odd template stuff happening.
Comment 7•3 years ago
|
||
I wonder if the ImageWrapper issue might be that that line is both a use and a definition of the symbol? Though you'd think that would have shown up in other places.
Comment hidden (spam) |
Updated•3 months ago
|
Description
•