RESOLVED FIXED 82764
[BlackBerry] PluginBlackBerry may leak strings
https://bugs.webkit.org/show_bug.cgi?id=82764
Summary [BlackBerry] PluginBlackBerry may leak strings
Joe Mason
Reported 2012-03-30 11:50:41 PDT
The BlackBerry::Platform::Window API has been updated to return std::string instead of char* from some methods. When I updated webkit for this change, I noticed that PluginViewBlackBerry takes the returned strings and stuffs a pointer to them into an NPSetWindowCallbackStruct, where they are passed to the plugin. It's not clear to me that the lifetime of the plugin is guaranteed to be tied to the window, and if the window is destroyed first this memory will become invalid. So it's safer to also store a copy in the PluginBlackBerry object and put the pointer to that in the callback struct, so we can more carefully manage its lifetime.
Attachments
fix (6.44 KB, patch)
2012-03-30 11:56 PDT, Joe Mason
no flags
Joe Mason
Comment 1 2012-03-30 11:56:20 PDT
Rob Buis
Comment 2 2012-03-30 12:01:18 PDT
Comment on attachment 134851 [details] fix View in context: https://bugs.webkit.org/attachment.cgi?id=134851&action=review Looks good. > Source/WebCore/ChangeLog:12 > + Reviewed by NOBODY (OOPS!). This line should be between title and explanation. Please do that next time :)
WebKit Review Bot
Comment 3 2012-03-30 13:19:39 PDT
Comment on attachment 134851 [details] fix Clearing flags on attachment: 134851 Committed r112714: <http://trac.webkit.org/changeset/112714>
WebKit Review Bot
Comment 4 2012-03-30 13:19:43 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.