зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 125129. Convert status strings to UTF-8 before passing them on to the browser. r=sdagley, sr=beard.
This commit is contained in:
Родитель
1551d818d3
Коммит
6fcb218fdc
|
@ -934,12 +934,11 @@ void MRJContext::setStatusMessage(JMAppletViewerRef viewer, JMTextRef statusMsg)
|
|||
MRJContext* thisContext;
|
||||
OSStatus status = ::JMGetAppletViewerData(viewer, (JMClientData*)&thisContext);
|
||||
if (status == noErr) {
|
||||
Handle messageHandle = ::JMTextToMacOSCStringHandle(statusMsg);
|
||||
if (messageHandle != NULL) {
|
||||
::HLock(messageHandle);
|
||||
const char* message = *messageHandle;
|
||||
TextEncoding utf8 = CreateTextEncoding(kTextEncodingUnicodeDefault, kTextEncodingDefaultVariant, kUnicodeUTF8Format);
|
||||
char* message = JMTextToEncoding(statusMsg, utf8);
|
||||
if (message) {
|
||||
thisContext->showStatus(message);
|
||||
::DisposeHandle(messageHandle);
|
||||
delete[] message;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче