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

Unified Diff: ppapi/tests/extensions/packaged_app/test_packaged_app.cc

Issue 1012753003: Check kMaxDescriptorsPerMessage in test_packaged_app.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comment Created 5 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/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/extensions/packaged_app/test_packaged_app.cc
diff --git a/ppapi/tests/extensions/packaged_app/test_packaged_app.cc b/ppapi/tests/extensions/packaged_app/test_packaged_app.cc
index bdbc68386a0f27c43bc9a27ec6c9b18fea7d5a57..0f47205a37398f22ab6eb687be3e70da7a77dc43 100644
--- a/ppapi/tests/extensions/packaged_app/test_packaged_app.cc
+++ b/ppapi/tests/extensions/packaged_app/test_packaged_app.cc
@@ -17,6 +17,12 @@
#include "ppapi/cpp/var.h"
#include "ppapi/utility/completion_callback_factory.h"
+#if defined(__clang__)
+// ipc_message_attachment_set.h depends on C++11 which nacl-g++ does not
+// fully support.
+#include "ipc/ipc_message_attachment_set.h"
+#endif
+
namespace {
std::string g_last_error;
@@ -24,10 +30,14 @@ pp::Instance* g_instance = NULL;
// This should be the same as MessageAttachmentSet::kMaxDescriptorsPerMessage in
// ipc/ipc_message_attachment_set.h.
-// TODO(yusukes): Once all the NaCl toolchains support C++11, Add
-// #include "ipc/file_descriptor_set_posix.h" and remove the constant.
const size_t kMaxDescriptorsPerMessage = 128;
+#if defined(__clang__)
+static_assert(kMaxDescriptorsPerMessage ==
+ IPC::MessageAttachmentSet::kMaxDescriptorsPerMessage,
+ "kMaxDescriptorsPerMessage is not up to date");
+#endif
+
// Returns true if the resource file whose name is |key| exists and its content
// matches |content|.
bool LoadManifestInternal(nacl_irt_resource_open* nacl_irt_resource_open,
« no previous file with comments | « ppapi/tests/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698