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

Side by Side Diff: mojo/edk/js/tests/js_to_cpp.mojom

Issue 2844143002: Mojo C++ bindings: reject messages version 2 with null payload pointer. (Closed)
Patch Set: . Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/js/tests/OWNERS ('k') | mojo/edk/js/tests/js_to_cpp_tests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 module js_to_cpp; 1 module js_to_cpp;
2 2
3 // This struct encompasses all of the basic types, so that they 3 // This struct encompasses all of the basic types, so that they
4 // may be sent from C++ to JS and back for validation. 4 // may be sent from C++ to JS and back for validation.
5 struct EchoArgs { 5 struct EchoArgs {
6 int64 si64; 6 int64 si64;
7 int32 si32; 7 int32 si32;
8 int16 si16; 8 int16 si16;
9 int8 si8; 9 int8 si8;
10 uint64 ui64; 10 uint64 ui64;
(...skipping 10 matching lines...) Expand all
21 array<string>? string_array; 21 array<string>? string_array;
22 handle<message_pipe>? message_handle; 22 handle<message_pipe>? message_handle;
23 handle<data_pipe_consumer>? data_handle; 23 handle<data_pipe_consumer>? data_handle;
24 }; 24 };
25 25
26 struct EchoArgsList { 26 struct EchoArgsList {
27 EchoArgsList? next; 27 EchoArgsList? next;
28 EchoArgs? item; 28 EchoArgs? item;
29 }; 29 };
30 30
31 interface ForTesting {};
32
31 // Note: For messages which control test flow, pick numbers that are unlikely 33 // Note: For messages which control test flow, pick numbers that are unlikely
32 // to be hit as a result of our deliberate corruption of response messages. 34 // to be hit as a result of our deliberate corruption of response messages.
33 interface CppSide { 35 interface CppSide {
34 // Sent for all tests to notify that the JS side is now ready. 36 // Sent for all tests to notify that the JS side is now ready.
35 StartTest@88888888(); 37 StartTest@88888888();
36 38
37 // Indicates end for echo, bit-flip, and back-pointer tests. 39 // Indicates end for echo, bit-flip, and back-pointer tests.
38 TestFinished@99999999(); 40 TestFinished@99999999();
39 41
40 // Responses from specific tests. 42 // Responses from specific tests.
41 PingResponse(); 43 PingResponse();
42 EchoResponse(EchoArgsList list); 44 EchoResponse(EchoArgsList list);
43 BitFlipResponse(EchoArgsList arg); 45
46 // Having an associated interface pointer in the message makes sure the
47 // message header version 2 is tested.
48 BitFlipResponse(EchoArgsList arg, associated ForTesting? not_used);
49
44 BackPointerResponse(EchoArgsList arg); 50 BackPointerResponse(EchoArgsList arg);
45 }; 51 };
46 52
47 interface JsSide { 53 interface JsSide {
48 SetCppSide(CppSide cpp); 54 SetCppSide(CppSide cpp);
49 55
50 Ping(); 56 Ping();
51 Echo(int32 numIterations, EchoArgs arg); 57 Echo(int32 numIterations, EchoArgs arg);
52 BitFlip(EchoArgs arg); 58 BitFlip(EchoArgs arg);
53 BackPointer(EchoArgs arg); 59 BackPointer(EchoArgs arg);
54 }; 60 };
OLDNEW
« no previous file with comments | « mojo/edk/js/tests/OWNERS ('k') | mojo/edk/js/tests/js_to_cpp_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698