Closed Bug 575649 Opened 14 years ago Closed 14 years ago

[e10s] gfxImageSurface reinterpret_cast concern

Categories

(Core :: IPC, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
Tracking Status
fennec - ---

People

(Reporter: dougt, Unassigned)

References

Details

/electrolysis/content/canvas/src/DocumentRendererParent.cpp

    * line 62 -- nsRefPtr<gfxImageSurface> surf = new gfxImageSurface(reinterpret_cast<PRUint8*>(const_cast<char*>(aData.Data())),

/electrolysis/content/canvas/src/DocumentRendererChild.cpp

    * line 136 -- nsRefPtr<gfxImageSurface> surf = new gfxImageSurface(reinterpret_cast<PRUint8*>(const_cast<char*>(data.get())),





Why is that const_cast ok?  That should be a BeginWriting(), since that's what
you're doing.

The magic "4" scattered about here should presumably be some named constant
somewhere.   FIle a bug on that?  (it is the stride, which probably should be looked up)
Summary: [e10s] → [e10s] gfxImageSurface reinterpret_cast concern
tracking-fennec: --- → ?
cjones, can you look into this?
This is dead-man-walking code, no one should look into it.
tracking-fennec: ? → 2.0-
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.