diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-27 23:45:41 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-27 23:45:41 +0000 |
commit | f5e1efb53d33d2e62704e1c0b08e27db7e52b78f (patch) | |
tree | eac6784722c70af3549928b4b6adeaef52712dbb /ppapi/cpp/mouse_lock.cc | |
parent | 27c65768d78818327b50da230f20198ffeb51cad (diff) | |
download | chromium_src-f5e1efb53d33d2e62704e1c0b08e27db7e52b78f.zip chromium_src-f5e1efb53d33d2e62704e1c0b08e27db7e52b78f.tar.gz chromium_src-f5e1efb53d33d2e62704e1c0b08e27db7e52b78f.tar.bz2 |
Make the PPP wrappers take an Instance*.
I changed these to take InstanceHandles but this doesn't actually work. If you
use them the recommended way, the module->instance mapping isn't set up by the
time the constructors are called, so doing AddPerInstanceObject fails.
Since these objects are all called on the main thread, there is no race
condition with pp::Instance destruction and the implementation using a pointer
is safe.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/9481015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/mouse_lock.cc')
-rw-r--r-- | ppapi/cpp/mouse_lock.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ppapi/cpp/mouse_lock.cc b/ppapi/cpp/mouse_lock.cc index 828ee89..7724a0f 100644 --- a/ppapi/cpp/mouse_lock.cc +++ b/ppapi/cpp/mouse_lock.cc @@ -36,10 +36,10 @@ template <> const char* interface_name<PPB_MouseLock>() { } // namespace -MouseLock::MouseLock(const InstanceHandle& instance) +MouseLock::MouseLock(Instance* instance) : associated_instance_(instance) { Module::Get()->AddPluginInterface(kPPPMouseLockInterface, &ppp_mouse_lock); - Instance::AddPerInstanceObject(instance, kPPPMouseLockInterface, this); + instance->AddPerInstanceObject(kPPPMouseLockInterface, this); } MouseLock::~MouseLock() { |