diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /ipc/ipdl/ipdl.py | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz firefox-adbda400be353e676059e335c3c0aaf99e719475.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ipc/ipdl/ipdl.py')
-rw-r--r-- | ipc/ipdl/ipdl.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ipc/ipdl/ipdl.py b/ipc/ipdl/ipdl.py index 230e0a213f..befaacca45 100644 --- a/ipc/ipdl/ipdl.py +++ b/ipc/ipdl/ipdl.py @@ -8,6 +8,7 @@ from configparser import RawConfigParser from io import StringIO import ipdl +from ipdl.ast import SYNC def log(minv, fmt, *args): @@ -96,6 +97,7 @@ log(2, 'Generated C++ headers will be generated relative to "%s"', headersdir) log(2, 'Generated C++ sources will be generated in "%s"', cppdir) allmessages = {} +allsyncmessages = [] allmessageprognames = [] allprotocols = [] @@ -172,10 +174,16 @@ for f in files: if ast.protocol: allmessages[ast.protocol.name] = ipdl.genmsgenum(ast) allprotocols.append(ast.protocol.name) + # e.g. PContent::RequestMemoryReport (not prefixed or suffixed.) for md in ast.protocol.messageDecls: allmessageprognames.append("%s::%s" % (md.namespace, md.decl.progname)) + if md.sendSemantics is SYNC: + allsyncmessages.append( + "%s__%s" % (ast.protocol.name, md.prettyMsgName()) + ) + allprotocols.sort() # Check if we have undefined message names in segmentCapacityDict. @@ -248,6 +256,23 @@ print( namespace IPC { +bool IPCMessageTypeIsSync(uint32_t aMessageType) +{ + switch (aMessageType) { +""", + file=ipc_msgtype_name, +) + +for msg in allsyncmessages: + print(" case %s:" % msg, file=ipc_msgtype_name) + +print( + """ return true; + default: + return false; + } +} + const char* StringFromIPCMessageType(uint32_t aMessageType) { switch (aMessageType) { |