Don't stop plugins from loading just because they don't have a resource file. b=451234 r=smichaud sr=roc

This commit is contained in:
Josh Aas 2008-08-20 00:23:19 -04:00
Родитель 87b6a79ede
Коммит c955c16412
2 изменённых файлов: 5 добавлений и 6 удалений

Просмотреть файл

@ -765,14 +765,12 @@ ns4xPlugin::CreatePlugin(nsIServiceManagerObsolete* aServiceMgr,
nsPluginFile pluginFile(pluginPath);
pluginRefNum = pluginFile.OpenPluginResource();
if (pluginRefNum == -1)
return NS_ERROR_FAILURE;
ns4xPlugin* plugin = new ns4xPlugin(nsnull, aLibrary, nsnull, aServiceMgr);
if (plugin == NULL)
::UseResFile(appRefNum);
if (!plugin)
return NS_ERROR_OUT_OF_MEMORY;
::UseResFile(appRefNum);
*aResult = plugin;
NS_ADDREF(*aResult);
@ -891,7 +889,8 @@ ns4xPlugin::Shutdown(void)
if (fShutdownEntry != nsnull) {
#if defined(XP_MACOSX)
CallNPP_ShutdownProc(fShutdownEntry);
::CloseResFile(fPluginRefNum);
if (fPluginRefNum > 0)
::CloseResFile(fPluginRefNum);
#else
NS_TRY_SAFE_CALL_VOID(fShutdownEntry(), fLibrary, nsnull);
#endif

Просмотреть файл

@ -1163,7 +1163,7 @@ static const PRInt32 resizeIndicatorHeight = 15;
PRBool nsChildView::ShowsResizeIndicator(nsIntRect* aResizerRect)
{
NSView *topLevelView = mView, *superView = nil;
while (superView = [topLevelView superview])
while ((superView = [topLevelView superview]))
topLevelView = superView;
if (![[topLevelView window] showsResizeIndicator])