From 726a250195dce8f58044e80342e99ec8c0fa98df Mon Sep 17 00:00:00 2001 From: Grace Kloba Date: Fri, 2 Apr 2010 11:05:18 -0700 Subject: [PATCH] Fix pluginstream delay timer as it is expecting seconds instead of milliseconds. While the timer is active, don't deliverData. Fix http://b/issue?id=2567300 --- WebCore/plugins/PluginStream.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/WebCore/plugins/PluginStream.cpp b/WebCore/plugins/PluginStream.cpp index 0f60fe301..9341c152e 100644 --- a/WebCore/plugins/PluginStream.cpp +++ b/WebCore/plugins/PluginStream.cpp @@ -352,7 +352,7 @@ void PluginStream::deliverData() // ask the plugin for a delay value. int delay = deliveryDelay(); - m_delayDeliveryTimer.startOneShot(delay); + m_delayDeliveryTimer.startOneShot(delay * 0.001); #else m_delayDeliveryTimer.startOneShot(0); #endif @@ -441,6 +441,10 @@ void PluginStream::didReceiveData(NetscapePlugInStreamLoader* loader, const char m_deliveryData->resize(oldSize + length); memcpy(m_deliveryData->data() + oldSize, data, length); +#if PLATFORM(ANDROID) +//TODO: This needs to be upstreamed to WebKit. + if (!m_delayDeliveryTimer.isActive()) +#endif deliverData(); } -- 2.11.0