~ubuntu-branches/ubuntu/lucid/seamonkey/lucid-security

« back to all changes in this revision

Viewing changes to rdf/base/src/nsInMemoryDataSource.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fabien Tassin
  • Date: 2008-07-29 21:29:02 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080729212902-spm9kpvchp9udwbw
Tags: 1.1.11+nobinonly-0ubuntu1
* New security upstream release: 1.1.11 (LP: #218534)
  Fixes USN-602-1, USN-619-1, USN-623-1 and USN-629-1
* Refresh diverged patch:
  - update debian/patches/80_security_build.patch
* Fix FTBFS with missing -lfontconfig
  - add debian/patches/11_fix_ftbfs_with_fontconfig.patch
  - update debian/patches/series
* Build with default gcc (hardy: 4.2, intrepid: 4.3)
  - update debian/rules
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
157
157
 
158
158
    ~Assertion();
159
159
 
160
 
    void AddRef() { ++mRefCnt; }
 
160
    void AddRef() {
 
161
        if (mRefCnt == PR_UINT16_MAX) {
 
162
            NS_WARNING("refcount overflow, leaking Assertion");
 
163
            return;
 
164
        }
 
165
        ++mRefCnt;
 
166
    }
161
167
 
162
168
    void Release(nsFixedSizeAllocator& aAllocator) {
 
169
        if (mRefCnt == PR_UINT16_MAX) {
 
170
            NS_WARNING("refcount overflow, leaking Assertion");
 
171
            return;
 
172
        }
163
173
        if (--mRefCnt == 0)
164
 
            Destroy(aAllocator, this); }
 
174
            Destroy(aAllocator, this);
 
175
    }
165
176
 
166
177
    // For nsIRDFPurgeableDataSource
167
178
    inline  void    Mark()      { u.as.mMarked = PR_TRUE; }
194
205
    // also shared between hash/as (see the union above)
195
206
    // but placed after union definition to ensure that
196
207
    // all 32-bit entries are long aligned
197
 
    PRInt16                     mRefCnt;
 
208
    PRUint16                    mRefCnt;
198
209
    PRPackedBool                mHashEntry;
199
210
 
200
211
private: