Bug 99205 - [BlackBerry] Only reallocate buffers that were allocated before suspending
Summary: [BlackBerry] Only reallocate buffers that were allocated before suspending
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jakob Petsovits
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-12 13:40 PDT by Jakob Petsovits
Modified: 2012-10-15 14:42 PDT (History)
4 users (show)

See Also:


Attachments
Patch (5.33 KB, patch)
2012-10-12 15:21 PDT, Jakob Petsovits
no flags Details | Formatted Diff | Diff
Patch (5.25 KB, patch)
2012-10-15 13:08 PDT, Jakob Petsovits
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Petsovits 2012-10-12 13:40:56 PDT
When we call releaseBuffers(), not all of the backingstore tile buffers might have been allocated yet. Still we try to release all of them, which causes us to lazy-initialize the tile buffers so we can release them again.

This is stupid and we should just ignore buffers that haven't been initialized yet. The patch below makes that change.
Comment 1 Jakob Petsovits 2012-10-12 15:21:23 PDT
Created attachment 168496 [details]
Patch

The ChangeLog diff is off because of other local changes. Please review just the contents, I'll fix the ChangeLog conflicts before getting it into the commit queue. Thanks\!
Comment 2 Antonio Gomes 2012-10-15 11:23:12 PDT
Comment on attachment 168496 [details]
Patch

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

> Source/WebKit/blackberry/WebKitSupport/BackingStoreTile.cpp:104
> +    return static_cast<bool>(m_buffer);

is return m_buffer enough?
Comment 3 Jakob Petsovits 2012-10-15 11:24:47 PDT
(In reply to comment #2)
> is return m_buffer enough?

Syntactically yes. I find it more explanatory with an explicit cast though.
Comment 4 Jakob Petsovits 2012-10-15 13:08:03 PDT
Created attachment 168765 [details]
Patch

Better diff for ChangeLog (as promised above), with Antonio in the reviewer line. Thanks.
Comment 5 WebKit Review Bot 2012-10-15 14:42:30 PDT
Comment on attachment 168765 [details]
Patch

Clearing flags on attachment: 168765

Committed r131364: <http://trac.webkit.org/changeset/131364>
Comment 6 WebKit Review Bot 2012-10-15 14:42:34 PDT
All reviewed patches have been landed.  Closing bug.