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

Unified Diff: native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_var_manager.cc

Issue 242533005: [NaCl SDK] nacl_io: Add flow control the JavaScript pipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_var_manager.cc
diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_var_manager.cc b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_var_manager.cc
index e6c16bc9478cd6ca9bfa76fdd5cfff23daac8c83..b2ac7b629f02cc3377b292ad115fdf3c2089671a 100644
--- a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_var_manager.cc
+++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_var_manager.cc
@@ -103,6 +103,19 @@ void FakeVarManager::DestroyVarData(FakeVarData* var_data) {
}
FakeVarData* FakeVarManager::GetVarData(PP_Var var) {
+ switch (var.type) {
+ // These types don't have any var data as their data
+ // is stored directly in the var's value union.
+ case PP_VARTYPE_UNDEFINED:
+ case PP_VARTYPE_NULL:
+ case PP_VARTYPE_BOOL:
+ case PP_VARTYPE_INT32:
+ case PP_VARTYPE_DOUBLE:
+ return NULL;
+ default:
+ break;
+ }
+
VarMap::iterator iter = var_map_.find(var.value.as_id);
if (iter == var_map_.end())
return NULL;
« no previous file with comments | « native_client_sdk/src/tests/nacl_io_test/event_test.cc ('k') | native_client_sdk/src/tests/nacl_io_test/jspipe_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698