Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: ppapi/shared_impl/resource.cc

Issue 10790078: PPAPI: Make PPB_MessageLoop_Dev::GetForMainThread work (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: review comments Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/shared_impl/resource.h ('k') | ppapi/shared_impl/resource_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/resource.cc
diff --git a/ppapi/shared_impl/resource.cc b/ppapi/shared_impl/resource.cc
index 6f095f77c0dcc8d471c0328e76e3e816fcee61f9..5c9f738568a6d62e5f74c574167ae7e9be464140 100644
--- a/ppapi/shared_impl/resource.cc
+++ b/ppapi/shared_impl/resource.cc
@@ -12,7 +12,7 @@ namespace ppapi {
Resource::Resource(ResourceObjectType type, PP_Instance instance)
: host_resource_(HostResource::MakeInstanceOnly(instance)) {
- // The instance should always be valid (nonzero).
+ // The instance should be valid (nonzero).
DCHECK(instance);
pp_resource_ = PpapiGlobals::Get()->GetResourceTracker()->AddResource(this);
@@ -40,6 +40,10 @@ Resource::Resource(ResourceObjectType type, const HostResource& host_resource)
}
}
+Resource::Resource(Untracked) {
+ pp_resource_ = PpapiGlobals::Get()->GetResourceTracker()->AddResource(this);
+}
+
Resource::~Resource() {
PpapiGlobals::Get()->GetResourceTracker()->RemoveResource(this);
}
« no previous file with comments | « ppapi/shared_impl/resource.h ('k') | ppapi/shared_impl/resource_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698