diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-11 06:19:30 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-11 06:19:30 +0000 |
commit | f120413abf985a48fcc600b101e4c1989ca06705 (patch) | |
tree | 23fcf636c0d3f278d6bb7680d904ed371015842e /webkit/plugins/ppapi | |
parent | eda59e2615444e1beb07dfdbb83b2f36f90e744e (diff) | |
download | chromium_src-f120413abf985a48fcc600b101e4c1989ca06705.zip chromium_src-f120413abf985a48fcc600b101e4c1989ca06705.tar.gz chromium_src-f120413abf985a48fcc600b101e4c1989ca06705.tar.bz2 |
ppapi: Add a little comment about GetInstanceObject "leaking" a reference
BUG=
TEST=
Review URL: http://codereview.chromium.org/9114013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117177 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/ppapi')
-rw-r--r-- | webkit/plugins/ppapi/ppapi_webplugin_impl.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc index 015d57f..df52705 100644 --- a/webkit/plugins/ppapi/ppapi_webplugin_impl.cc +++ b/webkit/plugins/ppapi/ppapi_webplugin_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -99,6 +99,10 @@ void WebPluginImpl::destroy() { } NPObject* WebPluginImpl::scriptableObject() { + // Call through the plugin to get its instance object. Note that we "leak" a + // reference here. But we want to keep the instance object alive so long as + // the instance is alive, so it's okay. It will get cleaned up when all + // NPObjectVars are "force freed" at instance shutdown. scoped_refptr<NPObjectVar> object( NPObjectVar::FromPPVar(instance_->GetInstanceObject())); // GetInstanceObject talked to the plugin which may have removed the instance |