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

Unified Diff: mojo/public/cpp/bindings/lib/validation_context.cc

Issue 2312813002: Limit Mojo messages recursion depth (Closed)
Patch Set: Update comment to match arg name change Created 4 years, 3 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: mojo/public/cpp/bindings/lib/validation_context.cc
diff --git a/mojo/public/cpp/bindings/lib/validation_context.cc b/mojo/public/cpp/bindings/lib/validation_context.cc
index ef07aec9bb445054edad0b1397b2bcd175747a9d..435168658a2d984e85d43d2469cf0d1f7aa4f54d 100644
--- a/mojo/public/cpp/bindings/lib/validation_context.cc
+++ b/mojo/public/cpp/bindings/lib/validation_context.cc
@@ -13,13 +13,15 @@ ValidationContext::ValidationContext(const void* data,
size_t data_num_bytes,
size_t num_handles,
Message* message,
- const base::StringPiece& description)
+ const base::StringPiece& description,
+ int stack_depth)
: message_(message),
description_(description),
data_begin_(reinterpret_cast<uintptr_t>(data)),
data_end_(data_begin_ + data_num_bytes),
handle_begin_(0),
- handle_end_(static_cast<uint32_t>(num_handles)) {
+ handle_end_(static_cast<uint32_t>(num_handles)),
+ stack_depth_(stack_depth) {
if (data_end_ < data_begin_) {
// The calculation of |data_end_| overflowed.
// It shouldn't happen but if it does, set the range to empty so

Powered by Google App Engine
This is Rietveld 408576698