diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-30 03:27:28 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-30 03:27:28 +0000 |
commit | 77993d1399524545b78eff8281ac483b9c067837 (patch) | |
tree | 5df5d6eb4b47b541be1b1d96c64676d0c95ab2c4 /chrome/common/plugin_messages.h | |
parent | 6c7e007f28f871e84340727f948a4da10e979f80 (diff) | |
download | chromium_src-77993d1399524545b78eff8281ac483b9c067837.zip chromium_src-77993d1399524545b78eff8281ac483b9c067837.tar.gz chromium_src-77993d1399524545b78eff8281ac483b9c067837.tar.bz2 |
Add acknowledgement messages for PluginMsg_UpdateGeometry. On the Mac, use
these acknowledgements to know when it's safe to dump old TransportDIBs in the
renderer process. The Mac TransportDIB implementation uses
base::SharedMemory, which cannot be disposed of if an in-flight UpdateGeometry
message refers to the shared memory file descriptor.
BUG=27510, 26754
TEST=1. From bug 25710:
a. Visit http://www.dkmsoftware.com/Yubotu.htm
b. Click "Play Now"
c. Resize vigorously.
Expect: no sad plug-in icon.
2. Test case from bug 26754 (affected machines only):
a. Visit http://news.google.com/
b. Click the [+] to the left of a YouTube link. On affected
machines, you'll get a sad plug-in icon.
c. Click the [+] to the left of a different YouTube link.
Expect: no crash.
3. Test case from bug 26754 comment 9 (affected machines only):
a. Have lots of bookmarks (import Safari defaults)
b. Right-click on bookmark bar, and choose "Open All Bookmarks"
Expect: no crash.
This change may not actually fix the third test case.
Review URL: http://codereview.chromium.org/417005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33264 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/plugin_messages.h')
-rw-r--r-- | chrome/common/plugin_messages.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/chrome/common/plugin_messages.h b/chrome/common/plugin_messages.h index c4c70fb..0bfddee 100644 --- a/chrome/common/plugin_messages.h +++ b/chrome/common/plugin_messages.h @@ -105,6 +105,14 @@ struct PluginMsg_UpdateGeometry_Param { gfx::Rect clip_rect; TransportDIB::Handle windowless_buffer; TransportDIB::Handle background_buffer; + +#if defined(OS_MACOSX) + // This field contains a key that the plug-in process is expected to return + // to the renderer in its ACK message, unless the value is -1, in which case + // no ACK message is required. Other than the special -1 value, the values + // used in ack_key are opaque to the plug-in process. + int ack_key; +#endif }; @@ -418,13 +426,21 @@ struct ParamTraits<PluginMsg_UpdateGeometry_Param> { WriteParam(m, p.clip_rect); WriteParam(m, p.windowless_buffer); WriteParam(m, p.background_buffer); +#if defined(OS_MACOSX) + WriteParam(m, p.ack_key); +#endif } static bool Read(const Message* m, void** iter, param_type* r) { return ReadParam(m, iter, &r->window_rect) && ReadParam(m, iter, &r->clip_rect) && ReadParam(m, iter, &r->windowless_buffer) && - ReadParam(m, iter, &r->background_buffer); + ReadParam(m, iter, &r->background_buffer) +#if defined(OS_MACOSX) + && + ReadParam(m, iter, &r->ack_key) +#endif + ; } static void Log(const param_type& p, std::wstring* l) { l->append(L"("); @@ -435,6 +451,10 @@ struct ParamTraits<PluginMsg_UpdateGeometry_Param> { LogParam(p.windowless_buffer, l); l->append(L", "); LogParam(p.background_buffer, l); +#if defined(OS_MACOSX) + l->append(L", "); + LogParam(p.ack_key, l); +#endif l->append(L")"); } }; |