diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-28 19:33:48 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-28 19:33:48 +0000 |
commit | a1d660bfa7166332552497177f622ceb8503c171 (patch) | |
tree | ba42557a0c008ce51bac1212ed9bc9cb68fa9f2c /ppapi/shared_impl | |
parent | 0cd5b9dfd0882bcb8ecf70a4b135e8d79113d28a (diff) | |
download | chromium_src-a1d660bfa7166332552497177f622ceb8503c171.zip chromium_src-a1d660bfa7166332552497177f622ceb8503c171.tar.gz chromium_src-a1d660bfa7166332552497177f622ceb8503c171.tar.bz2 |
Add some CHECKs to try to diagnose a crash.
BUG=134611
TEST=
Review URL: https://chromiumcodereview.appspot.com/10713004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144774 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r-- | ppapi/shared_impl/resource_tracker.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ppapi/shared_impl/resource_tracker.cc b/ppapi/shared_impl/resource_tracker.cc index a889c59..f3632d8 100644 --- a/ppapi/shared_impl/resource_tracker.cc +++ b/ppapi/shared_impl/resource_tracker.cc @@ -183,8 +183,18 @@ void ResourceTracker::RemoveResource(Resource* object) { } void ResourceTracker::LastPluginRefWasDeleted(Resource* object) { - PpapiGlobals::Get()->GetCallbackTrackerForInstance(object->pp_instance())-> - PostAbortForResource(object->pp_resource()); + // Bug http://crbug.com/134611 indicates that sometimes the resource tracker + // is null here. This should never be the case since if we have a resource in + // the tracker, it should always have a valid instance associated with it. + // As a result, we do some CHECKs here to see what types of problems the + // instance might have before dispatching. + // + // TODO(brettw) remove these checks when this bug is no longer relevant. + CHECK(object->pp_instance()); + CallbackTracker* callback_tracker = + PpapiGlobals::Get()->GetCallbackTrackerForInstance(object->pp_instance()); + CHECK(callback_tracker); + callback_tracker->PostAbortForResource(object->pp_resource()); object->LastPluginRefWasDeleted(); } |