Bug 117288 - ResourceLoader::resourceData() should not return a PassRefPtr
Summary: ResourceLoader::resourceData() should not return a PassRefPtr
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 117289
  Show dependency treegraph
 
Reported: 2013-06-06 04:58 PDT by Carlos Garcia Campos
Modified: 2013-06-06 09:37 PDT (History)
5 users (show)

See Also:


Attachments
Patch (17.16 KB, patch)
2013-06-06 05:04 PDT, Carlos Garcia Campos
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2013-06-06 04:58:28 PDT
ResourceLoader is the owner of the resource data and we don't really want to transfer the ownership in resourceData().
Comment 1 Carlos Garcia Campos 2013-06-06 05:04:08 PDT
Created attachment 203924 [details]
Patch
Comment 2 Darin Adler 2013-06-06 09:22:20 PDT
Comment on attachment 203924 [details]
Patch

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

> Source/WebCore/ChangeLog:10
> +        Change ResourceLoader::resourceData() to return a raw pointer
> +        instead of a PassRefPtr since we don't want to transfer the
> +        ownership of the resource data. Also pass a raw pointer to

Definitely a good change.

> Source/WebCore/ChangeLog:14
> +        CachedResource::data() so that the cached resource can decide
> +        whether to take a reference of the data or not, for example,
> +        CachedRawResource only takes a reference when buffering policy is
> +        BufferData.

Not sure this change is as good, but it’s OK.
Comment 3 Carlos Garcia Campos 2013-06-06 09:37:16 PDT
Committed r151277: <http://trac.webkit.org/changeset/151277>