The parser always sets the first value of the tuple .nestedRange to
NOT_NESTED, so there's no need to actually store it. Instead, we
create a range when we're creating the ProtocolType. This makes it
clearer what is happening. The range is needed for the type because
the nesting pair is compared with those from messages, where the first
element can be something else.
Prior to bug 1306708, the lower range could be specified in the IPDL
file, but all uses were NOT_NESTED, so I suppose that is why it was
eliminated.
Note that the constructor for Protocol sets .nested to NOT_NESTED, but
prior to my patch, the field was never used. The constructor also
never initialized .nestedRange, but the parser always sets it so that
isn't much of an issue.
MozReview-Commit-ID: FMnoZRrkfoA
--HG--
extra : rebase_source : 3adb64b27d4a7a4e9c6c7695b145136813dbed5d
See MutRecHeader1.ipdlh for a more detailed explanation.
MozReview-Commit-ID: JHYd7qKSjrr
--HG--
extra : rebase_source : 2d405b3cb4384d6c815fe1634216682fd828f930
type is some existing Python object, so this assertion can never fail.
Looking at GatherDecls::visitMessageDecl, I think this is supposed to
be checking cdecl.
MozReview-Commit-ID: 8Oppw5SYdWO
--HG--
extra : rebase_source : d2e5d6c4f22a490e14f668a1f6ed28738dc56ca8
Instead, just stick a "visited" property on them. The symtab property
on nodes isn't used for any other purpose.
The next patch will eliminate the unused args to enterScope and
exitScope.
MozReview-Commit-ID: 3WW2NPVB0gM
--HG--
extra : rebase_source : 2c2add652e1156a397a155c74015671877af3690
This code gets deleted in the next patch, but the point here is that
we can still compile Firefox with this assertion in place.
MozReview-Commit-ID: 33dw0xm7L4R
--HG--
extra : rebase_source : 140fca3b0b5abf5b3d6636ea63bae2adf1311b09
It is always initially set to None, and the other subclass of
TcheckVisitor (CheckTypes) never uses it.
MozReview-Commit-ID: CKxXoHXopqF
--HG--
extra : rebase_source : 2422e31fb99f894948da01a0bcd7d5a2bf92ceb7
Actor is used in the process checking code, which will get deleted in
a separate bug. Instead, just convert the actor name + side to a
string manually.
MozReview-Commit-ID: 9zfD4MuscVw
--HG--
extra : rebase_source : 95037d1db717618ebb34ec44832e9d2498815ebd
This just wraps all the XRE method calls to go through the Bootstrap API
instead of relying on the XPCOM glue methods.
--HG--
extra : rebase_source : eccbe18b9b21ca1ab6c403515ffd60f0a9174d9c
This is gnarly IPDL code, but the generated code is probably easier to
review. Before when sending a sync message, we had:
bool sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
if ((!(sendok__))) {
return false;
}
Now, we have:
bool sendok__;
{
GeckoProfilerTracingRAII syncIPCTracer(
"IPC",
"PJavaScript::Msg_PreventExtensions");
sendok__ = (GetIPCChannel())->Send(msg__, (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
The bug referred to in the comment was fixed 6 years ago.
The includes in cgen.py are unused.
--HG--
extra : rebase_source : f4521112ee3f2280836ac7030b25ddcba2321eda
This patch removes all user-specified state machine support from the
IPDL parser, then deletes all of the code related to it from the AST,
type checking, and code generation. The default state machine code
relating to tracking whether the protocol is dead or not will still be
generated. In fact, this patch should not change the code that is
generated for any protocol that does not use the custom state machine
syntax.
MozReview-Commit-ID: 1fABHR3zJx
--HG--
extra : rebase_source : a2c6655e767741eb7d697e55548c2409a4bdff12
The state machine stuff provides a decent compact overview of where
races are supposed to happen, so I just commented them out.
MozReview-Commit-ID: 1K5mw2kyXWb
--HG--
extra : rebase_source : db3fea5e80c47e04c103b1231077bd9b2c62c4d4
With the removal of state machines, the state() method is no longer
supported, so these assertions must be removed.
MozReview-Commit-ID: 4HV8cQqowlp
--HG--
extra : rebase_source : 512c740e7a7de8904b237d745cddea82dc82a603
The uses of state() in TestHangs and TestStackHooks only have two
states, depending on how many times the method has been called.
Two uses of state() have to be fixed in TestLatency. Each waits for 5
messages, then resets the state and sends replies.
MozReview-Commit-ID: 7Glj7wbl1ni
--HG--
extra : rebase_source : 55a88a9b31b2effc8af5629262a5f4d34987ba40
The parent process crashes if it gets a bad message from the child,
but that makes it hard to test. This patch overrides the fatal error
handling method and uses the old behavior, that kills the child.
I copied the code to kill the child from TestHangs.
MozReview-Commit-ID: 3YgqaCgHGI0
--HG--
extra : rebase_source : cbecee2742014e969c641b89833cff5f46b99a33
Bill said it is okay to declare interrupt parent-to-child messages now.
MozReview-Commit-ID: 5Ma6pfkUZmt
--HG--
extra : rebase_source : 68fd3f51a9154136003871425762816593d66139
managerNoCtor.ipdl: Add a message so that parsing doesn't just fail
immediately with a syntax error.
shmem_access_union.ipdl: Remove this test, which involves the
semi-removed ACL feature for shmem.
oldIncludesyntax.ipdl: To be safe, make the protocol more valid by
adding a message.
multimanNonexistentMgrs.ipdl: Make the name of the protocol match the
name of the file.
MozReview-Commit-ID: 9zx5fmAWIIc
--HG--
extra : rebase_source : a5b9b9f19bc0329a06ca4ff8be3ef4b879054dd9
Change message annotations from "rpc" to "intr" to match the current
name, and similarly rename the protocols and the files.
MozReview-Commit-ID: Dd9ikvAHMnV
--HG--
extra : rebase_source : 0b2d57ca2c4405319f4ecd6ba2f633128355b381
If qname has no quals, then fullname would be None, which breaks the
string concatenation in parentEndpointDecl and childEndpointDecl, even
if no endpoints are declared. This patch uses the short name if there
are no quals, while preserving the behavior that we want to pass None
into declare for fullname.
MozReview-Commit-ID: 9nuO8GWhBRH
--HG--
extra : rebase_source : df7e8b80d06b5cf1d4905624c0a3c4eac6703612
This patch fixes multipleUsingCxxTypes.ipdl. This is a regression from
bug 918651.
MozReview-Commit-ID: 3ByBvp6FZUe
--HG--
extra : rebase_source : 8038d8662360a8f12e571716eb7c59d2b3754508
As of bug 1240871 these are no longer optional.
MozReview-Commit-ID: 2r2uxJP9dDr
--HG--
extra : rebase_source : 6ca55ae336a7c7d37764b657333e331f3b6158c9
The IPDL parser handles include statements by using a stack of
parsers. If an inner parser encounters a parsing error, it will print
out an error message, which is maybe okay, but then it makes two
mistakes:
1. It does not pop the current parser off of the parser stack. This
means that the file that included the syntactically invalid file will
be parsed as though it were the invalid file. In bkelly's case, an
.ipdl file included an invalid .ipdlh file, so he got a bizarre error
message about how you can't define a protocol in a header, because the
parser was treating the protocol in the .ipdl file as though it were
in the .ipdlh file. I fixed this by using a "finally" clause to pop
the parser stack, ensuring that it is correct even in case of error.
2. A parse error in the include should cause the entire parse to fail,
but instead it will keep going. inc.tu will get set to None, which
eventually causes an error later in type checking, when it attempts to
examine inc.tu. I fixed this by only catching the parse error where we
invoke the outermost parser. This has the drawback that later errors
in other files will not be reported. An alternate fix would set a
global flag to indicate that a parse error had occured, and somehow
report that to the caller.
I think this bug was introduced in 2009 by commit
cb8189926a69872c73508fba50830f0d07af341f.
MozReview-Commit-ID: DhbDUO7MXGB
--HG--
extra : rebase_source : cee371cd54ebf575f78aa8b2441afbde8b3c2b8f
The other fields, spec, array, and nullable, are set in some places.
Also remove a dead chunk of code with a FIXME that refers to a bug
that was WONTFIXed in 2010.
--HG--
extra : rebase_source : 184d001a1233e9c035af070bc920c8cbeabc27cc
MessageId has the production "'~' ID", but if you use it, it produces
an error. This error was added in 2009, in bug 525342. I doubt anybody
expects it to work any more, so it should just be a regular parse
error. This is the only usage of the literal ~ so it can now be
removed from there.
MozReview-Commit-ID: AivlLE8Nubv
--HG--
extra : rebase_source : 66f76d1528f0bcf624af97b9437834874e537eb8
We will use the new type for the generated IPDL message handler
prototype to make sure correct error handling method is called.
MozReview-Commit-ID: AzVbApxFGZ0