diff options
author | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-18 20:38:14 +0000 |
---|---|---|
committer | tschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-18 20:38:14 +0000 |
commit | 18f6ac530752c99f257288e60e7eb2070dc1ad89 (patch) | |
tree | c2e05b7486819da55f3d76f3cc1f38c3fb21866d /o3d | |
parent | 97c22ee2f0123d1d4dbdb705809d97d0f1d9f65a (diff) | |
download | chromium_src-18f6ac530752c99f257288e60e7eb2070dc1ad89.zip chromium_src-18f6ac530752c99f257288e60e7eb2070dc1ad89.tar.gz chromium_src-18f6ac530752c99f257288e60e7eb2070dc1ad89.tar.bz2 |
Integrate new nixysa rev with work around for Safari 5.0+ crash.
Also ensures all NPN_PluginThreadAsyncCall() uses are guarded by IsPluginThreadAsyncCallSupported().
Also fix-up indenting in o3d_layer.mm.
BUG=none
TEST=repeated loading of O3D in Safari 5.0.2 on Mac
Review URL: http://codereview.chromium.org/3677002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62969 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/DEPS | 2 | ||||
-rw-r--r-- | o3d/plugin/cross/main_thread_task_poster.cc | 2 | ||||
-rw-r--r-- | o3d/plugin/cross/o3d_glue.cc | 6 | ||||
-rw-r--r-- | o3d/plugin/mac/o3d_layer.mm | 26 |
4 files changed, 17 insertions, 19 deletions
@@ -1,6 +1,6 @@ vars = { "chromium_trunk": "http://src.chromium.org/svn/trunk", - "nixysa_rev": "69", + "nixysa_rev": "71", # When updating the chromium rev, you must also update the nss and sqlite # revs to match the version pulled-in by Chromium's own DEPS in the new rev. "chromium_rev": "51794", diff --git a/o3d/plugin/cross/main_thread_task_poster.cc b/o3d/plugin/cross/main_thread_task_poster.cc index 89adf7c..d20b206 100644 --- a/o3d/plugin/cross/main_thread_task_poster.cc +++ b/o3d/plugin/cross/main_thread_task_poster.cc @@ -46,7 +46,7 @@ MainThreadTaskPoster::~MainThreadTaskPoster() { } bool MainThreadTaskPoster::IsSupported() { - return IsPluginThreadAsyncCallSupported(); + return IsPluginThreadAsyncCallSupported(npp_); } void MainThreadTaskPoster::PostTask(Task* task) { diff --git a/o3d/plugin/cross/o3d_glue.cc b/o3d/plugin/cross/o3d_glue.cc index 84035f6..cce9f2a 100644 --- a/o3d/plugin/cross/o3d_glue.cc +++ b/o3d/plugin/cross/o3d_glue.cc @@ -44,6 +44,7 @@ #include "plugin/cross/o3d_glue.h" #include "plugin/cross/config.h" #include "plugin/cross/stream_manager.h" +#include "third_party/nixysa/static_glue/npapi/npn_api.h" #include "client_glue.h" #include "globals_glue.h" @@ -1030,10 +1031,7 @@ void PluginObject::AsyncTick() { } else { // Invoke Tick asynchronously if NPN_PluginThreadAsyncCall is supported. // Otherwise invoke it synchronously. - int plugin_major, plugin_minor, browser_major, browser_minor; - NPN_Version(&plugin_major, &plugin_minor, &browser_major, &browser_minor); - if (browser_major > 0 || - browser_minor >= NPVERS_HAS_PLUGIN_THREAD_ASYNC_CALL) { + if (IsPluginThreadAsyncCallSupported(npp_)) { NPN_PluginThreadAsyncCall(npp_, TickPluginObject, this); } else { Tick(); diff --git a/o3d/plugin/mac/o3d_layer.mm b/o3d/plugin/mac/o3d_layer.mm index ee85df9..f872603 100644 --- a/o3d/plugin/mac/o3d_layer.mm +++ b/o3d/plugin/mac/o3d_layer.mm @@ -80,19 +80,19 @@ using o3d::DisplayWindowMac; CGLSetCurrentContext(ctx); if (created_context_) { - DCHECK_EQ(ctx, obj_->mac_cgl_context_); - o3d::DisplayWindowMac default_display; - default_display.set_agl_context(obj_->mac_agl_context_); - default_display.set_cgl_context(obj_->mac_cgl_context_); - obj_->CreateRenderer(default_display); - obj_->client()->Init(); - created_context_ = false; - } - - if (was_resized_) { - obj_->Resize(width_, height_); - was_resized_ = false; - } + DCHECK_EQ(ctx, obj_->mac_cgl_context_); + o3d::DisplayWindowMac default_display; + default_display.set_agl_context(obj_->mac_agl_context_); + default_display.set_cgl_context(obj_->mac_cgl_context_); + obj_->CreateRenderer(default_display); + obj_->client()->Init(); + created_context_ = false; + } + + if (was_resized_) { + obj_->Resize(width_, height_); + was_resized_ = false; + } if (obj_) { |