The default bug view has changed. See this FAQ.

sNativeRegionPool visibility is wrong in libgkgfx

VERIFIED FIXED

Status

Core Graveyard
GFX: Mac
VERIFIED FIXED
9 years ago
8 years ago

People

(Reporter: Mark Mentovai, Assigned: Mark Mentovai)

Tracking

({verified1.8.1.12})

1.8 Branch
All
Mac OS X
verified1.8.1.12

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
We've got a global variable, sNativeRegionPool, that's part of libgkgfx on the Mac only.  The variable is instantiated as NS_EXPORT which sets the visibility properly, but when building with compiler visibility support activated, a shared library build fails when linking libgfx_mac, which depends on libgkgfx and the sNativeRegionPool variable, because the symbol winds up not exported.  The build log reveals:

(while compiling mozilla/gfx/src/mac/nsRegionPool.cpp)
.../mozilla/gfx/src/mac/nsRegionPool.cpp:41: warning: ‘sNativeRegionPool’: visibility attribute ignored because it
.../mozilla/gfx/src/mac/nsRegionPool.h:66: warning: conflicts with previ ous declaration here

The export attribute needs to be applied to the declaration (nsRegionPool.h:66) in order for it to be effective.
(Assignee)

Updated

9 years ago
Blocks: 408959
Status: NEW → ASSIGNED
(Assignee)

Comment 1

9 years ago
Created attachment 293909 [details] [diff] [review]
Decorate with visibility at declaration

This adds NS_EXPORT to the declaration, which allows sNativeRegionPool to be exported from libgkgfx, so that libgfx_mac and any other users can find it.

This code is not built on the trunk, which has moved on to Cairo gfx.

This change is needed on the branch to support the hidden-visibility Camino build for Camino 1.6.  It's completely safe on the branch, as NS_EXPORT always sets default visibility on all current 1.8-branch builds on the Mac.  This change is a no-op as far as all existing 1.8-branch builds are concerned: we do not use hidden visibility at all on the 1.8 branch on the Mac.
Attachment #293909 - Flags: review?(ted.mielczarek)
Attachment #293909 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 2

9 years ago
Comment on attachment 293909 [details] [diff] [review]
Decorate with visibility at declaration

Requesting approval1.9 for the trunk.  Even though this is no longer built on the trunk since the switch to cairo gfx, I'll keep it synchronized until the old gfx source is removed from cvs.

Requesting approval1.8.1.12 for the MOZILLA_1_8_BRANCH.  This change has no impact on any existing 1.8 branch build, because symbols are always exported on the Mac on all existing 1.8 branch builds.
Attachment #293909 - Flags: approval1.9?
Attachment #293909 - Flags: approval1.8.1.12?
Comment on attachment 293909 [details] [diff] [review]
Decorate with visibility at declaration

a=beltzner for 1.9
Attachment #293909 - Flags: approval1.9? → approval1.9+
(Assignee)

Comment 4

9 years ago
Checked in on the trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Comment on attachment 293909 [details] [diff] [review]
Decorate with visibility at declaration

approved for 1.8.1.12, a=dveditz for release-drivers
Attachment #293909 - Flags: approval1.8.1.12? → approval1.8.1.12+
(Assignee)

Comment 6

9 years ago
Checked in on MOZILLA_1_8_BRANCH.
Keywords: fixed1.8.1.12
Verified.
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1.12 → verified1.8.1.12
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.