Skip to content

Commit

Permalink
Backed out changeset 3d865fe1a532 (bug 1878958) for causing lint fail…
Browse files Browse the repository at this point in the history
…ures. CLOSED TREE
  • Loading branch information
chorotan committed Feb 19, 2024
1 parent 97a9c1d commit 41faadc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
1 change: 0 additions & 1 deletion ipc/chromium/src/chrome/common/ipc_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ namespace IPC {
//------------------------------------------------------------------------------

// Generated by IPDL compiler
bool IPCMessageTypeIsSync(uint32_t aMessageType);
const char* StringFromIPCMessageType(uint32_t aMessageType);

class Channel;
Expand Down
23 changes: 0 additions & 23 deletions ipc/ipdl/ipdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import ipdl

from ipdl.ast import SYNC

def log(minv, fmt, *args):
if _verbosity >= minv:
Expand Down Expand Up @@ -97,7 +96,6 @@ def log(minv, fmt, *args):
log(2, 'Generated C++ sources will be generated in "%s"', cppdir)

allmessages = {}
allsyncmessages = []
allmessageprognames = []
allprotocols = []

Expand Down Expand Up @@ -174,14 +172,10 @@ def normalizedFilename(f):
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.
Expand Down Expand Up @@ -254,23 +248,6 @@ def normalizedFilename(f):
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) {
Expand Down
4 changes: 3 additions & 1 deletion tools/fuzzing/ipc/IPCFuzzController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,12 +895,14 @@ NS_IMETHODIMP IPCFuzzController::IPCFuzzLoop::Run() {
uint8_t portIndex = controlData[0];
uint8_t actorIndex = controlData[1];
uint16_t typeOffset = *(uint16_t*)(&controlData[2]);
bool isSync = controlData[4] > 127;
uint8_t portInstanceIndex = controlData[5];

UniquePtr<IPC::Message> msg(new IPC::Message(ipcMsgData, ipcMsgLen));

if (preserveHeader) {
isConstructor = msg->is_constructor();
isSync = msg->is_sync();
msgType = msg->header()->type;

if (!msgType) {
Expand Down Expand Up @@ -939,7 +941,7 @@ NS_IMETHODIMP IPCFuzzController::IPCFuzzLoop::Run() {
msg->header()->flags.SetConstructor();
}

if (IPC::IPCMessageTypeIsSync(msgType)) {
if (!isConstructor && isSync) {
MOZ_FUZZING_NYX_DEBUG("INFO: Sending sync message...\n");
msg->header()->flags.SetSync();
}
Expand Down

0 comments on commit 41faadc

Please sign in to comment.