WebCore: Missing plug-ins may cause an assertion failure.
authorjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Jul 2010 21:37:02 +0000 (21:37 +0000)
committerjhoneycutt@apple.com <jhoneycutt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Jul 2010 21:37:02 +0000 (21:37 +0000)
commit27a8560abbc83e593c8014332196da72caa742c9
tree014214ed073f09df07bd8d460d1646ed6d7450c5
parent2be5550eb753f37c0f40947ed7ed07aa5863ab25
WebCore: Missing plug-ins may cause an assertion failure.
https://bugs.webkit.org/show_bug.cgi?id=41900

Reviewed by Adele Peterson.

Test: plugins/missing-plugin.html

* plugins/PluginView.cpp:
(WebCore::PluginView::~PluginView):
Check whether m_instance is null before trying to remove it from the
map. Trying to remove a null instance results in an assertion failure.
(WebCore::PluginView::PluginView):
Initialize m_instance to 0, because there is an early return that may
skip its being assigned its proper value.

LayoutTests: Missing plug-ins may cause an assertion failure
https://bugs.webkit.org/show_bug.cgi?id=41900

Reviewed by Adele Peterson.

* plugins/missing-plugin.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/plugins/missing-plugin-expected.txt [new file with mode: 0644]
LayoutTests/plugins/missing-plugin.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/plugins/PluginView.cpp