diff options
author | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 20:26:27 +0000 |
---|---|---|
committer | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-05 20:26:27 +0000 |
commit | 0b8a69b2d612f96fb2dcc3dfab374fdff6bd3685 (patch) | |
tree | f8d589c6e944c0cddd5150bbf5cf7688b2e6ed6c /o3d | |
parent | ecb3df1cea873736bab78043a3f8c7af65621dba (diff) | |
download | chromium_src-0b8a69b2d612f96fb2dcc3dfab374fdff6bd3685.zip chromium_src-0b8a69b2d612f96fb2dcc3dfab374fdff6bd3685.tar.gz chromium_src-0b8a69b2d612f96fb2dcc3dfab374fdff6bd3685.tar.bz2 |
Worked around bug in 32-bit Safari 4 on Mac OS X 10.6 where the
browser sends O3D a spurious NPP_SetWindow with an invalid window
after first sending it a valid one. Tested this on both 10.6 and 10.5;
no ill effects on 10.5, including in multiple tab case.
Review URL: http://codereview.chromium.org/572027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38236 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/plugin/mac/main_mac.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/o3d/plugin/mac/main_mac.mm b/o3d/plugin/mac/main_mac.mm index e34e6c8..c0ce16a 100644 --- a/o3d/plugin/mac/main_mac.mm +++ b/o3d/plugin/mac/main_mac.mm @@ -894,6 +894,12 @@ NPError NPP_SetWindow(NPP instance, NPWindow* window) { obj->mac_2d_context_ = np_qd->port; if (np_qd->port) new_window = GetWindowFromPort(np_qd->port); + // Safari 4 on Snow Leopard is sending us a spurious + // NPP_SetWindow where we can not determine the WindowRef from + // the port. Ignore this. + if (obj->mac_window_ != NULL && + new_window == NULL) + return NPERR_NO_ERROR; break; } default: |