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

Unified Diff: ppapi/cpp/var.cc

Issue 6823016: Create a VarPrivate interface to contain the scripting helper functions of Var. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/cpp/var.h ('k') | ppapi/example/example.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/var.cc
===================================================================
--- ppapi/cpp/var.cc (revision 81054)
+++ ppapi/cpp/var.cc (working copy)
@@ -35,7 +35,7 @@
// cross-process calls depending on the plugin. This is an optimization so we
// only do refcounting on the necessary objects.
inline bool NeedsRefcounting(const PP_Var& var) {
- return var.type == PP_VARTYPE_STRING || var.type == PP_VARTYPE_OBJECT;
+ return var.type > PP_VARTYPE_DOUBLE;
}
} // namespace
@@ -167,11 +167,8 @@
if (var_.value.as_id == other.var_.value.as_id)
return true;
return AsString() == other.AsString();
- // TODO(neb): Document that this is === and not ==, unlike strings.
- case PP_VARTYPE_OBJECT:
+ default: // Objects, arrays, dictionaries.
return var_.value.as_id == other.var_.value.as_id;
- default:
- return false;
}
}
« no previous file with comments | « ppapi/cpp/var.h ('k') | ppapi/example/example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698