Changeset 63667 in webkit


Ignore:
Timestamp:
Jul 19, 2010 9:21:04 AM (14 years ago)
Author:
Adam Roben
Message:

Fix an assertion when a plugin returns -1 from NPP_Write

We were forgetting to call setDefersLoading(false) before destroying
the PluginStream. In the process of destroying the stream, someone
would call setDefersLoading(true), and we would assert because we were
already deferring loads.

Fixes <http://webkit.org/b/42563> Assertion failure in
ResourceHandle::setDefersLoading when running
plugins/return-negative-one-from-write.html on Windows

Reviewed by Anders Carlsson.

  • plugins/PluginStream.cpp:

(WebCore::PluginStream::deliverData): Call setDefersLoading(false)
before destroying the stream, to match the setDefersLoading(true) call
earlier in this function. (We already call setDefersLoading(false) in
the non-error case later on.)

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63666 r63667  
     12010-07-19  Adam Roben  <aroben@apple.com>
     2
     3        Fix an assertion when a plugin returns -1 from NPP_Write
     4
     5        We were forgetting to call setDefersLoading(false) before destroying
     6        the PluginStream. In the process of destroying the stream, someone
     7        would call setDefersLoading(true), and we would assert because we were
     8        already deferring loads.
     9
     10        Fixes <http://webkit.org/b/42563> Assertion failure in
     11        ResourceHandle::setDefersLoading when running
     12        plugins/return-negative-one-from-write.html on Windows
     13
     14        Reviewed by Anders Carlsson.
     15
     16        * plugins/PluginStream.cpp:
     17        (WebCore::PluginStream::deliverData): Call setDefersLoading(false)
     18        before destroying the stream, to match the setDefersLoading(true) call
     19        earlier in this function. (We already call setDefersLoading(false) in
     20        the non-error case later on.)
     21
    1222010-07-19  Rafael Antognolli  <antognolli@profusion.mobi>
    223
  • trunk/WebCore/plugins/PluginStream.cpp

    r58590 r63667  
    357357            if (deliveryBytes < 0) {
    358358                LOG_PLUGIN_NET_ERROR();
     359                if (m_loader)
     360                    m_loader->setDefersLoading(false);
    359361                cancelAndDestroyStream(NPRES_NETWORK_ERR);
    360362                return;
Note: See TracChangeset for help on using the changeset viewer.