mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 841549 - Fix sizeOfIncludingThis() during compression. r=njn
This commit is contained in:
parent
30cfb2906d
commit
196614d554
@ -1320,11 +1320,13 @@ ScriptSource::destroy()
|
||||
size_t
|
||||
ScriptSource::sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf)
|
||||
{
|
||||
JS_ASSERT(ready());
|
||||
|
||||
// |data| is a union, but both members are pointers to allocated memory,
|
||||
// |emptySource|, or NULL, so just using |data.compressed| will work.
|
||||
return mallocSizeOf(this) + ((data.compressed != emptySource) ? mallocSizeOf(data.compressed) : 0);
|
||||
size_t n = mallocSizeOf(this);
|
||||
n += (ready() && data.compressed != emptySource)
|
||||
? mallocSizeOf(data.compressed)
|
||||
: 0;
|
||||
return n;
|
||||
}
|
||||
|
||||
template<XDRMode mode>
|
||||
|
Loading…
Reference in New Issue
Block a user