| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.mojo.bindings; | 5 package org.chromium.mojo.bindings; |
| 6 | 6 |
| 7 import org.chromium.mojo.bindings.Interface.Proxy; | 7 import org.chromium.mojo.bindings.Interface.Proxy; |
| 8 import org.chromium.mojo.system.DataPipe; | 8 import org.chromium.mojo.system.DataPipe; |
| 9 import org.chromium.mojo.system.Handle; | 9 import org.chromium.mojo.system.Handle; |
| 10 import org.chromium.mojo.system.InvalidHandle; | 10 import org.chromium.mojo.system.InvalidHandle; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 public class Decoder { | 22 public class Decoder { |
| 23 | 23 |
| 24 /** | 24 /** |
| 25 * Helper class to validate the decoded message. | 25 * Helper class to validate the decoded message. |
| 26 */ | 26 */ |
| 27 static final class Validator { | 27 static final class Validator { |
| 28 | 28 |
| 29 /** | 29 /** |
| 30 * Minimal value for the next handle to deserialize. | 30 * Minimal value for the next handle to deserialize. |
| 31 */ | 31 */ |
| 32 private int mMinNextClaimedHandle = 0; | 32 private int mMinNextClaimedHandle; |
| 33 /** | 33 /** |
| 34 * Minimal value of the start of the next memory to claim. | 34 * Minimal value of the start of the next memory to claim. |
| 35 */ | 35 */ |
| 36 private long mMinNextMemory = 0; | 36 private long mMinNextMemory; |
| 37 /** | 37 /** |
| 38 * The current nesting level when decoding. | 38 * The current nesting level when decoding. |
| 39 */ | 39 */ |
| 40 private long mStackDepth; | 40 private long mStackDepth; |
| 41 | 41 |
| 42 /** | 42 /** |
| 43 * The maximal memory accessible. | 43 * The maximal memory accessible. |
| 44 */ | 44 */ |
| 45 private final long mMaxMemory; | 45 private final long mMaxMemory; |
| 46 | 46 |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 } | 767 } |
| 768 | 768 |
| 769 public void increaseStackDepth() { | 769 public void increaseStackDepth() { |
| 770 mValidator.increaseStackDepth(); | 770 mValidator.increaseStackDepth(); |
| 771 } | 771 } |
| 772 | 772 |
| 773 public void decreaseStackDepth() { | 773 public void decreaseStackDepth() { |
| 774 mValidator.decreaseStackDepth(); | 774 mValidator.decreaseStackDepth(); |
| 775 } | 775 } |
| 776 } | 776 } |
| OLD | NEW |