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

Unified Diff: ppapi/cpp/var.cc

Issue 8936009: Check for the specific interface versions required in pp::Var. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused interface_name<PPB_Var> definition. Created 8 years, 12 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/var.cc
diff --git a/ppapi/cpp/var.cc b/ppapi/cpp/var.cc
index 512fd00a36efe64b995f04d06ca67bf7cdcf6c85..3014e3aeffe56998c887ff966986c0bc7607ea26 100644
--- a/ppapi/cpp/var.cc
+++ b/ppapi/cpp/var.cc
@@ -25,8 +25,8 @@ namespace pp {
namespace {
-template <> const char* interface_name<PPB_Var>() {
- return PPB_VAR_INTERFACE;
+template <> const char* interface_name<PPB_Var_1_1>() {
+ return PPB_VAR_INTERFACE_1_1;
}
template <> const char* interface_name<PPB_Var_1_0>() {
return PPB_VAR_INTERFACE_1_0;
@@ -43,8 +43,8 @@ inline bool NeedsRefcounting(const PP_Var& var) {
// it uses it to create a PP_Var for the given string. Otherwise it falls back
// to PPB_Var version 1.0.
PP_Var VarFromUtf8Helper(const char* utf8_str, uint32_t len) {
- if (has_interface<PPB_Var>()) {
- return get_interface<PPB_Var>()->VarFromUtf8(utf8_str, len);
+ if (has_interface<PPB_Var_1_1>()) {
+ return get_interface<PPB_Var_1_1>()->VarFromUtf8(utf8_str, len);
} else if (has_interface<PPB_Var_1_0>()) {
return get_interface<PPB_Var_1_0>()->VarFromUtf8(Module::Get()->pp_module(),
utf8_str,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698