| Index: mojo/public/cpp/bindings/lib/validation_util.cc
|
| diff --git a/mojo/public/cpp/bindings/lib/validation_util.cc b/mojo/public/cpp/bindings/lib/validation_util.cc
|
| index 9675afe8e0a851ec1403ffa13b2c01d0a1eb2106..7614df5cbc261537f9139509954a44ceb558bfba 100644
|
| --- a/mojo/public/cpp/bindings/lib/validation_util.cc
|
| +++ b/mojo/public/cpp/bindings/lib/validation_util.cc
|
| @@ -101,11 +101,11 @@ bool ValidateMessageIsResponse(const Message* message,
|
| }
|
|
|
| bool IsHandleOrInterfaceValid(const AssociatedInterface_Data& input) {
|
| - return IsValidInterfaceId(input.interface_id);
|
| + return input.handle.is_valid();
|
| }
|
|
|
| -bool IsHandleOrInterfaceValid(const AssociatedInterfaceRequest_Data& input) {
|
| - return IsValidInterfaceId(input.interface_id);
|
| +bool IsHandleOrInterfaceValid(const AssociatedEndpointHandle_Data& input) {
|
| + return input.is_valid();
|
| }
|
|
|
| bool IsHandleOrInterfaceValid(const Interface_Data& input) {
|
| @@ -130,7 +130,7 @@ bool ValidateHandleOrInterfaceNonNullable(
|
| }
|
|
|
| bool ValidateHandleOrInterfaceNonNullable(
|
| - const AssociatedInterfaceRequest_Data& input,
|
| + const AssociatedEndpointHandle_Data& input,
|
| const char* error_message,
|
| ValidationContext* validation_context) {
|
| if (IsHandleOrInterfaceValid(input))
|
| @@ -170,7 +170,7 @@ bool ValidateHandleOrInterfaceNonNullable(
|
|
|
| bool ValidateHandleOrInterface(const AssociatedInterface_Data& input,
|
| ValidationContext* validation_context) {
|
| - if (!IsMasterInterfaceId(input.interface_id))
|
| + if (validation_context->ClaimAssociatedEndpointHandle(input.handle))
|
| return true;
|
|
|
| ReportValidationError(validation_context,
|
| @@ -178,9 +178,9 @@ bool ValidateHandleOrInterface(const AssociatedInterface_Data& input,
|
| return false;
|
| }
|
|
|
| -bool ValidateHandleOrInterface(const AssociatedInterfaceRequest_Data& input,
|
| +bool ValidateHandleOrInterface(const AssociatedEndpointHandle_Data& input,
|
| ValidationContext* validation_context) {
|
| - if (!IsMasterInterfaceId(input.interface_id))
|
| + if (validation_context->ClaimAssociatedEndpointHandle(input))
|
| return true;
|
|
|
| ReportValidationError(validation_context,
|
|
|