зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1156903: Add quirk flag that causes NPN_GetValue(NPNVdocumentOrigin) to return an empty string even when it fails; r=jimm
--HG-- extra : rebase_source : 73c726920f9f3187a41f2834f942e891efae9e28
This commit is contained in:
Родитель
b6f7abf05b
Коммит
7ae85d5d47
|
@ -394,7 +394,9 @@ PluginInstanceChild::NPN_GetValue(NPNVariable aVar,
|
|||
if (!CallNPN_GetValue_NPNVdocumentOrigin(&v, &result)) {
|
||||
return NPERR_GENERIC_ERROR;
|
||||
}
|
||||
if (result == NPERR_NO_ERROR) {
|
||||
if (result == NPERR_NO_ERROR ||
|
||||
(GetQuirks() &
|
||||
PluginModuleChild::QUIRK_FLASH_RETURN_EMPTY_DOCUMENT_ORIGIN)) {
|
||||
*static_cast<char**>(aValue) = ToNewCString(v);
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -2124,15 +2124,18 @@ PluginModuleChild::InitQuirksModes(const nsCString& aMimeType)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef OS_WIN
|
||||
if (specialType == nsPluginHost::eSpecialType_Flash) {
|
||||
mQuirks |= QUIRK_FLASH_RETURN_EMPTY_DOCUMENT_ORIGIN;
|
||||
#ifdef OS_WIN
|
||||
mQuirks |= QUIRK_WINLESS_TRACKPOPUP_HOOK;
|
||||
mQuirks |= QUIRK_FLASH_THROTTLE_WMUSER_EVENTS;
|
||||
mQuirks |= QUIRK_FLASH_HOOK_SETLONGPTR;
|
||||
mQuirks |= QUIRK_FLASH_HOOK_GETWINDOWINFO;
|
||||
mQuirks |= QUIRK_FLASH_FIXUP_MOUSE_CAPTURE;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef OS_WIN
|
||||
// QuickTime plugin usually loaded with audio/mpeg mimetype
|
||||
NS_NAMED_LITERAL_CSTRING(quicktime, "npqtplugin");
|
||||
if (FindInReadable(quicktime, mPluginFilename)) {
|
||||
|
|
|
@ -282,6 +282,10 @@ public:
|
|||
// CGContextRef we pass to it in NPP_HandleEvent(NPCocoaEventDrawRect)
|
||||
// outside of that call. See bug 804606.
|
||||
QUIRK_FLASH_AVOID_CGMODE_CRASHES = 1 << 10,
|
||||
// Work around a Flash bug where it fails to check the error code of a
|
||||
// NPN_GetValue(NPNVdocumentOrigin) call before trying to dereference
|
||||
// its char* output.
|
||||
QUIRK_FLASH_RETURN_EMPTY_DOCUMENT_ORIGIN = 1 << 11,
|
||||
};
|
||||
|
||||
int GetQuirks() { return mQuirks; }
|
||||
|
|
Загрузка…
Ссылка в новой задаче