Closed Bug 980415 Opened 6 years ago Closed 6 years ago
Fix multiple points in the codebase where we fail to call Data
Care needs to be taken when using DataSourceSurface::Map() because we need to have a corresponding DataSourceSurface::Unmap() call to unlock the DataSourceSurface. Multiple points in the codebase have failed to ensure they always call Unmap(), usually because the function calling Map() has a return point that fails to call Unmap() (sometimes the return point is hidden by an NS_ENSURE_* macro). Anyway, we should fix the existing points in the code.
This covers most callers. There's at least one other broken caller in widget/windows/nsDragService.cpp but that seems more widely broken so I'll deal with that in a separate bug.
Attachment #8386896 - Flags: review?(bas)
This patch also fixes callers that test for success by checking map.mData - that's wrong since map.mData can be untouched (uninitialized) if Map() returned false.
Attachment #8386896 - Flags: review?(bas) → review+
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.