summaryrefslogtreecommitdiffstats
path: root/mojo/public/cpp/bindings/lib/validation_errors.h
Commit message (Collapse)AuthorAgeFilesLines
* [mojo-sdk] Remove mojo_ignore_result and move C++ macros.h to bindings ↵amistry2016-03-111-1/+1
| | | | | | | | | | | | internal code. The one macro remaining in macros.h is only used by generated C++ code. BUG=534695 Review URL: https://codereview.chromium.org/1784743003 Cr-Commit-Position: refs/heads/master@{#380556}
* Remove MOJO_DISALLOW_COPY_AND_ASSIGN and MOJO_ALLOW_UNUSED_LOCAL.amistry2016-03-031-2/+2
| | | | | | | | BUG=534695 Review URL: https://codereview.chromium.org/1755003002 Cr-Commit-Position: refs/heads/master@{#378891}
* Mojo bindings environment: remove usage of logger and task tracker.yzshen2016-02-161-5/+6
| | | | | | | | BUG=585942 Review URL: https://codereview.chromium.org/1700683002 Cr-Commit-Position: refs/heads/master@{#375611}
* Mojo C++ bindings: support enum validation.yzshen2016-01-281-1/+3
| | | | | | | | | | | | By default, enums are not extensible, which means any unknown value will fail validation. If an enum may grow in the future, it needs to have [Extensible=True] attribute specified. In that case, the user code is responsible for handling unknown values properly. This CL doesn't add corresponding validation for JS or Java. BUG=404186 Review URL: https://codereview.chromium.org/1618963006 Cr-Commit-Position: refs/heads/master@{#371954}
* Fix a bunch of mojo_public_*_unittests with the new EDK.jam2016-01-051-2/+7
| | | | | | | | | | | | The unittests had baked in assumptions about implementation timings of the EDK. This makes the following tests pass: mojo_public_bindings_unittests, mojo_public_environment_unittests, mojo_public_system_unittests and mojo_public_utility_unittests. BUG=561803 Review URL: https://codereview.chromium.org/1552983003 Cr-Commit-Position: refs/heads/master@{#367421}
* Mojo C++ bindings: associated interface pointers/requests validationyzshen2015-12-011-0/+4
| | | | | | | | | | This CL also moves some validation code from code generation template to C++, in order to improve readability. BUG=546067 Review URL: https://codereview.chromium.org/1486573003 Cr-Commit-Position: refs/heads/master@{#362548}
* Move third_party/mojo/src/mojo/public to mojo/publicrockot2015-11-131-0/+122
| | | | | | | | | BUG=None NOPRESUBMIT=true Review URL: https://codereview.chromium.org/1410053006 Cr-Commit-Position: refs/heads/master@{#359461}
* Move //mojo/{public, edk} underneath //third_partyblundell2015-01-191-114/+0
| | | | | | | | | | | | | | | | | | | | | | | | This CL move //mojo/public and //mojo/edk to live in the following locations: - //third_party/mojo/src/mojo/public - //third_party/mojo/src/mojo/edk It moves the related gypfiles from //mojo to //third_party/mojo and updates them as necessary to account for the file moves. It also updates clients of the mojo SDK and EDK targets in both GYP and GN. (Note that for GN, the mojo SDK and EDK build systems are maintained in the Mojo repo and designed to be flexible wrt the location of the SDK/EDK in a client repo, so no changes are needed. This CL does not update include paths to the code being moved to limit the number of moving parts, instead relying on the include_dirs that the SDK and EDK targets supply to their direct dependents to ensure that include paths continue to resolve correctly. NOPRESUBMIT=true Review URL: https://codereview.chromium.org/814543006 Cr-Commit-Position: refs/heads/master@{#312129}
* mojom: Add associative arrays to the mojom language.erg2014-10-101-0/+3
| | | | | | | | | | This adds associative arrays to mojom to the main parser, and the C++ bindings generator. This adds a mojo::Map<> class to the C++ bindings, used by the generated bindings. Finally, it moves the clipboard.mojom interface over to associative arrays (which was the inspiration to add them to the mojom language). BUG=413863 Review URL: https://codereview.chromium.org/611633002 Cr-Commit-Position: refs/heads/master@{#299017}
* Mojo: clang-format mojo/public/cpp/{application,bindings}.Viet-Trung Luu2014-10-071-4/+4
| | | | | | | | | | | Except callback.h, which is currently generated using pump and which I'll instead make use a variadic template shortly. R=sky@chromium.org Review URL: https://codereview.chromium.org/626903003 Cr-Commit-Position: refs/heads/master@{#298612}
* Mojo: NULL -> nullptr in mojo/public/cpp/bindings and also for the bindings ↵viettrungluu2014-09-301-1/+1
| | | | | | | | | | generator. R=jamesr@chromium.org Review URL: https://codereview.chromium.org/613053002 Cr-Commit-Position: refs/heads/master@{#297336}
* Mojo C++ bindings: better log messages for some validation errors at the ↵yzshen2014-08-251-1/+2
| | | | | | | | | | | | | | | | | | | | | receiver side. The CL provides more information in the log messages for the following errors: - Fixed-size array has wrong number of elements. - non-nullable field is set to null/invalid handle. The reason to have better log messages for these errors is that they are triggered when users (of the bindings) provide invalid arguments. The users probably want to find out what they have done wrong. The other validation errors are rarer, caused by bugs in the bindings or malicious senders. Providing better log messages for them is of slightly lower priority. BUG=324170 TEST=None Review URL: https://codereview.chromium.org/494943004 Cr-Commit-Position: refs/heads/master@{#291704}
* Mojo C++ bindings: better log message for serialization warnings.yzshen@chromium.org2014-08-211-4/+6
| | | | | | | | | | BUG=324170 TEST=None Review URL: https://codereview.chromium.org/473793004 Cr-Commit-Position: refs/heads/master@{#291058} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291058 0039d316-1c4b-4281-b951-d872f2087c98
* Mojo cpp bindings: remove IsNonNullableValidationEnabled() checkyzshen@chromium.org2014-08-201-6/+0
| | | | | | | | | | | | This check has already been changed to always return true in a previous CL. BUG=324170 TEST=None Review URL: https://codereview.chromium.org/488123003 Cr-Commit-Position: refs/heads/master@{#290951} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290951 0039d316-1c4b-4281-b951-d872f2087c98
* Mojo: Add warning of invalid serialization results (in debug build).yzshen@chromium.org2014-08-191-3/+37
| | | | | | | | | | | | | | A fatal-level message is logged if: - a fixed-size array has wrong number of elements; - a non-nullable field is set to null (or invalid handle). BUG=324170 TEST=SerializationWarningTest.* Review URL: https://codereview.chromium.org/469393004 Cr-Commit-Position: refs/heads/master@{#290487} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290487 0039d316-1c4b-4281-b951-d872f2087c98
* Add validation logic for non-nullable types.yzshen@chromium.org2014-08-151-0/+14
| | | | | | | | | | | | | | | | This CL only turns on the non-nullable check for validation tests. There will be separate CLs for: - add DCHECK at the sending side. - make the existing APIs pass the non-nullable check and turn on the check everywhere. BUG=324170 TEST=New and revised validation tests. Review URL: https://codereview.chromium.org/466613002 Cr-Commit-Position: refs/heads/master@{#290002} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290002 0039d316-1c4b-4281-b951-d872f2087c98
* Mojo message validation tests: add integration tests and move existing ↵yzshen@chromium.org2014-06-151-1/+1
| | | | | | | | | | | | | | conformance tests. More conformance tests will come in a separate CL. BUG=None TEST=ValidationTest.*; ValidationIntegrationTest.* R=darin@chromium.org Review URL: https://codereview.chromium.org/322003002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277334 0039d316-1c4b-4281-b951-d872f2087c98
* Mojo cpp bindings: report the reason of validation failure.yzshen@chromium.org2014-06-041-0/+66
Validation errors are written to stderr and also used in validation tests. This CL also changes MessageHeaderValidator to use the same struct header validation code as other structs. BUG=None TEST=validation_unittest.cc R=darin@chromium.org Review URL: https://codereview.chromium.org/307353009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274855 0039d316-1c4b-4281-b951-d872f2087c98