WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 81706
[BlackBerry] destruction sequence in LayerCompositingThread is confusing
https://bugs.webkit.org/show_bug.cgi?id=81706
Summary
[BlackBerry] destruction sequence in LayerCompositingThread is confusing
Joe Mason
Reported
2012-03-20 15:46:10 PDT
LayerCompositingThread's destructor looks like this: LayerCompositingThread::~LayerCompositingThread() { // Unfortunately, ThreadSafeShared<T> is hardwired to call T::~T(). // To switch threads in case the last reference is released on the // WebKit thread, we send a sync message to the compositing thread. destroyOnCompositingThread(); } And then destroyOnCompositingThread does a synchronous dispatch to the compositing thread to clean up the object. It's weird to have a dispatch like this happen from within the destructor, and it's easy to miss the fact that it's synchronous and believe this is a delayed destruction. It would be much cleaner to flip this around: have ThreadSafeShared<T> call a function called destroyOnCompositingThread, which calls "delete this", and move all the cleanup into the standard destructor. (Also, this might let us get rid of the sync dispatch and just use a regular dispatch.)
Attachments
patch
(5.39 KB, patch)
2012-03-27 12:17 PDT
,
Joe Mason
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Joe Mason
Comment 1
2012-03-27 12:17:44 PDT
Created
attachment 134114
[details]
patch
Rob Buis
Comment 2
2012-03-27 12:21:03 PDT
Comment on
attachment 134114
[details]
patch Looks good.
WebKit Review Bot
Comment 3
2012-03-27 13:06:30 PDT
Comment on
attachment 134114
[details]
patch Clearing flags on attachment: 134114 Committed
r112304
: <
http://trac.webkit.org/changeset/112304
>
WebKit Review Bot
Comment 4
2012-03-27 13:06:34 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug