Title: [97201] trunk/Source/WebKit2
- Revision
- 97201
- Author
- [email protected]
- Date
- 2011-10-11 17:17:37 -0700 (Tue, 11 Oct 2011)
Log Message
[Mac] Crash when opening an embedded PDF in a background tab
https://bugs.webkit.org/show_bug.cgi?id=69880
Reviewed by Darin Adler.
* WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
(WebKit::BuiltInPDFView::BuiltInPDFView):
(WebKit::BuiltInPDFView::~BuiltInPDFView):
(WebKit::BuiltInPDFView::initialize):
(WebKit::BuiltInPDFView::destroy):
Moved initialization and destruction code from C++ constructor and destructor to designated
functions. Not part of the fix, but seems related enough to fix.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (97200 => 97201)
--- trunk/Source/WebKit2/ChangeLog 2011-10-12 00:16:22 UTC (rev 97200)
+++ trunk/Source/WebKit2/ChangeLog 2011-10-12 00:17:37 UTC (rev 97201)
@@ -5,6 +5,21 @@
Reviewed by Darin Adler.
+ * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
+ (WebKit::BuiltInPDFView::BuiltInPDFView):
+ (WebKit::BuiltInPDFView::~BuiltInPDFView):
+ (WebKit::BuiltInPDFView::initialize):
+ (WebKit::BuiltInPDFView::destroy):
+ Moved initialization and destruction code from C++ constructor and destructor to designated
+ functions. Not part of the fix, but seems related enough to fix.
+
+2011-10-11 Alexey Proskuryakov <[email protected]>
+
+ [Mac] Crash when opening an embedded PDF in a background tab
+ https://bugs.webkit.org/show_bug.cgi?id=69880
+
+ Reviewed by Darin Adler.
+
* WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::paint): Don't call plug-in that
doesn't even have a controller yet.
Modified: trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp (97200 => 97201)
--- trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp 2011-10-12 00:16:22 UTC (rev 97200)
+++ trunk/Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp 2011-10-12 00:17:37 UTC (rev 97201)
@@ -61,18 +61,10 @@
BuiltInPDFView::BuiltInPDFView(Page* page)
: m_page(page)
{
- m_page->addScrollableArea(this);
}
BuiltInPDFView::~BuiltInPDFView()
{
- if (m_page)
- m_page->removeScrollableArea(this);
-
- if (m_horizontalScrollbar)
- willRemoveHorizontalScrollbar(m_horizontalScrollbar.get());
- if (m_verticalScrollbar)
- willRemoveVerticalScrollbar(m_verticalScrollbar.get());
}
PluginInfo BuiltInPDFView::pluginInfo()
@@ -208,6 +200,8 @@
bool BuiltInPDFView::initialize(const Parameters& parameters)
{
+ m_page->addScrollableArea(this);
+
// Load the src URL if needed.
if (!parameters.loadManually && !parameters.url.isEmpty())
controller()->loadURL(pdfDocumentRequestID, "GET", parameters.url.string(), String(), HTTPHeaderMap(), Vector<uint8_t>(), false);
@@ -217,6 +211,13 @@
void BuiltInPDFView::destroy()
{
+ if (m_page)
+ m_page->removeScrollableArea(this);
+
+ if (m_horizontalScrollbar)
+ willRemoveHorizontalScrollbar(m_horizontalScrollbar.get());
+ if (m_verticalScrollbar)
+ willRemoveVerticalScrollbar(m_verticalScrollbar.get());
}
void BuiltInPDFView::paint(GraphicsContext* graphicsContext, const IntRect& dirtyRectInWindowCoordinates)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes