(win) nsSound::OnStreamComplete comment is wrong and function is not oom friendly

RESOLVED FIXED

Status

Core Graveyard
GFX: Win32
RESOLVED FIXED
14 years ago
9 years ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

14 years ago
145 pavlov   1.10   if (string && stringLen > 0) {
146                   // XXX this shouldn't be SYNC, but unless we make a copy
of the memory, we can't play it async.
147                   // We shouldn't have to hold on to this and free it.

148 hyatt    1.19     mLastSound = (char *) malloc(stringLen);
149                   memcpy(mLastSound, string, stringLen);

150 pavlov   1.24 
151                   CWinMM& theMM = CWinMM::GetModule();
152                   theMM.PlaySound(mLastSound, nsnull, SND_MEMORY |
SND_NODEFAULT | SND_ASYNC);

153 syd      1.7    }

Actual blame for the async change lies w/ hyatt.
(Assignee)

Comment 1

14 years ago
Created attachment 141038 [details] [diff] [review]
sync comment and sync player for oom
(Assignee)

Updated

14 years ago
Attachment #141038 - Flags: review?(neil.parkwaycc.co.uk)

Comment 2

14 years ago
Comment on attachment 141038 [details] [diff] [review]
sync comment and sync player for oom

r=me if you include a reminder to improve this when strings become sharable.
Attachment #141038 - Flags: review?(neil.parkwaycc.co.uk) → review+
(Assignee)

Updated

14 years ago
Attachment #141038 - Flags: superreview?(tor)

Updated

14 years ago
Attachment #141038 - Flags: superreview?(tor) → superreview+
(Assignee)

Comment 3

14 years ago
mozilla/widget/src/windows/nsSound.cpp 	1.33
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.