Bug 60735 - Crash when a plug-in tries to load a resource from the application cache
Summary: Crash when a plug-in tries to load a resource from the application cache
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-12 16:05 PDT by Anders Carlsson
Modified: 2011-06-15 06:11 PDT (History)
2 users (show)

See Also:


Attachments
Patch (5.43 KB, patch)
2011-05-12 16:40 PDT, Anders Carlsson
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2011-05-12 16:05:52 PDT
Crash when a plug-in tries to load a resource from the application cache
Comment 1 Anders Carlsson 2011-05-12 16:40:36 PDT
Created attachment 93364 [details]
Patch
Comment 2 mitz 2011-05-12 16:44:28 PDT
Comment on attachment 93364 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=93364&action=review

> Source/WebCore/ChangeLog:11
> +        This lead to the plug-in stream loader canceling the load, something which the application

typo: lead

> Source/WebCore/loader/DocumentLoader.cpp:601
> +
> +            // Calling ResourceLoader::didReceiveResponse can end up cancelling the load,
> +            // so we need to check if the loader has reached its terminal state.
> +            if (loader->reachedTerminalState())
> +                return;
> +
> +            // Calling ResourceLoader::didReceiveData can end up cancelling the load,
> +            // so we need to check if the loader has reached its terminal state.
>              loader->didReceiveData(data->data(), data->size(), data->size(), true);
> +            if (loader->reachedTerminalState())

The inconsistent way you order the comments is weird and inconsistent.
Comment 3 Anders Carlsson 2011-05-12 16:45:41 PDT
Committed r86397: <http://trac.webkit.org/changeset/86397>
Comment 4 Yong Li 2011-06-09 11:37:13 PDT
Can we assume the http status code is always 200 when resource is loaded from app cache? A status code other than 200 may cause unexpected problems