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

Unified Diff: ppapi/thunk/enter.h

Issue 2762513002: Remove keep-alive impulse IPCs from NaCl modules. (Closed)
Patch Set: Rebase Created 3 years, 9 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/tests/extensions/background_keepalive/background.js ('k') | ppapi/thunk/enter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/enter.h
diff --git a/ppapi/thunk/enter.h b/ppapi/thunk/enter.h
index 307b44691f0064f05728974b9954c63570d7b1f4..041a2dd5883798253f3ef45e455452492d7a0f46 100644
--- a/ppapi/thunk/enter.h
+++ b/ppapi/thunk/enter.h
@@ -148,8 +148,8 @@ class PPAPI_THUNK_EXPORT EnterBase {
// For Enter objects that need a resource, we'll store a pointer to the
// Resource object so that we don't need to look it up more than once. For
- // Enter objects with no resource, this will be NULL.
- Resource* resource_;
+ // Enter objects with no resource, this will be null.
+ Resource* resource_ = nullptr;
private:
bool CallbackIsValid() const;
@@ -161,10 +161,10 @@ class PPAPI_THUNK_EXPORT EnterBase {
void SetStateForCallbackError(bool report_error);
// Holds the callback. For Enter objects that aren't given a callback, this
- // will be NULL.
+ // will be null.
scoped_refptr<TrackedCallback> callback_;
- int32_t retval_;
+ int32_t retval_ = PP_OK;
};
} // namespace subtle
@@ -195,7 +195,7 @@ class EnterResource
if (resource_)
object_ = resource_->GetAs<ResourceT>();
else
- object_ = NULL;
+ object_ = nullptr;
// Validate the resource (note, if both are wrong, we will return
// PP_ERROR_BADRESOURCE; last in wins).
SetStateForResourceError(resource, resource_, object_, report_error);
@@ -265,16 +265,13 @@ class EnterInstanceAPI
public subtle::EnterBase {
public:
explicit EnterInstanceAPI(PP_Instance instance)
- : EnterBase(instance, ApiT::kSingletonResourceID),
- functions_(NULL) {
+ : EnterBase(instance, ApiT::kSingletonResourceID) {
if (resource_)
functions_ = resource_->GetAs<ApiT>();
SetStateForFunctionError(instance, functions_, true);
}
- EnterInstanceAPI(PP_Instance instance,
- const PP_CompletionCallback& callback)
- : EnterBase(instance, ApiT::kSingletonResourceID, callback),
- functions_(NULL) {
+ EnterInstanceAPI(PP_Instance instance, const PP_CompletionCallback& callback)
+ : EnterBase(instance, ApiT::kSingletonResourceID, callback) {
if (resource_)
functions_ = resource_->GetAs<ApiT>();
SetStateForFunctionError(instance, functions_, true);
@@ -287,7 +284,7 @@ class EnterInstanceAPI
ApiT* functions() const { return functions_; }
private:
- ApiT* functions_;
+ ApiT* functions_ = nullptr;
};
template<typename ApiT>
« no previous file with comments | « ppapi/tests/extensions/background_keepalive/background.js ('k') | ppapi/thunk/enter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698