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

Unified Diff: ppapi/cpp/dev/truetype_font_dev.h

Issue 18611004: PPAPI: Initialize CompletionCallbackWithOutput storage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 7 years, 5 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 | « no previous file | ppapi/cpp/directory_entry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/dev/truetype_font_dev.h
diff --git a/ppapi/cpp/dev/truetype_font_dev.h b/ppapi/cpp/dev/truetype_font_dev.h
index cdaeade0a4b5d3fd646bac3f4bfa2a67df422240..bd554f7cfaa311ab7dae644fffe0e3c4315fb34b 100644
--- a/ppapi/cpp/dev/truetype_font_dev.h
+++ b/ppapi/cpp/dev/truetype_font_dev.h
@@ -208,6 +208,12 @@ struct CallbackOutputTraits<TrueTypeFontDesc_Dev> {
static inline TrueTypeFontDesc_Dev StorageToPluginArg(StorageType& t) {
return TrueTypeFontDesc_Dev(PASS_REF, t);
}
+
+ static inline void Initialize(StorageType* t) {
+ // Use the same defaults as TrueTypeFontDesc_Dev does.
+ TrueTypeFontDesc_Dev dummy;
+ *t = dummy.pp_desc();
+ }
};
class TrueTypeFontDescArrayOutputAdapterWithStorage
@@ -255,6 +261,8 @@ struct CallbackOutputTraits< std::vector<TrueTypeFontDesc_Dev> > {
StorageType& t) {
return t.output();
}
+
+ static inline void Initialize(StorageType* /* t */) {}
};
} // namespace internal
« no previous file with comments | « no previous file | ppapi/cpp/directory_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698