Граф коммитов

856 Коммитов

Автор SHA1 Сообщение Дата
Andrew McCreight 490c8baf66 Bug 1336589 - Don't check struct decls from an included file in the context of the includee. r=billm
See MutRecHeader1.ipdlh for a more detailed explanation.

MozReview-Commit-ID: JHYd7qKSjrr

--HG--
extra : rebase_source : 2d405b3cb4384d6c815fe1634216682fd828f930
2017-02-08 11:07:24 -08:00
Andrew McCreight de95dbd061 Bug 1337536 - MessageType ctor assert should check cdtype. r=billm
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
2017-02-07 14:15:31 -08:00
Andrew McCreight 9a8abaf744 Bug 1337914 - Add dummy argument to IPDLUnitTestProcessChild::Init. r=kanru
This fixes a build error.

MozReview-Commit-ID: DMc4lwtuipo

--HG--
extra : rebase_source : 2686efb3e8fccc090b8fbfa352838d13b7709610
2017-02-08 12:26:20 -08:00
Andrew McCreight 621a063c39 Bug 1335886, part 4 - Remove the unused node arg to {enter,exit}Scope. r=billm
MozReview-Commit-ID: Fuj3RrnBBwV

--HG--
extra : rebase_source : 4dff4f1dc4a52f8d53637442995ebabd66cdf9b8
2017-02-01 13:07:59 -08:00
Andrew McCreight baf5f306e7 Bug 1335886, part 3 - Don't use symtab property to avoid infinite recursion. r=billm
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
2017-02-01 12:50:02 -08:00
Andrew McCreight 4f5c5e3153 Bug 1335886, part 2 - Nodes never have existing symbol tables in enterScope. r=billm
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
2017-02-01 11:51:43 -08:00
Andrew McCreight 77ff8c47bf Bug 1335886, part 1 - Set symtab on GatherDecls instead of TcheckVisitor. r=billm
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
2017-02-01 11:56:03 -08:00
Andrew McCreight 79c6450803 Bug 1336180 - Remove obsolete references to .type attribute in type.py. r=billm
MozReview-Commit-ID: KZiSLMOj4x4

--HG--
extra : rebase_source : 353340d2927bbefcb3365bc30636bead9b019a1f
2017-02-01 14:55:50 -08:00
Andrew McCreight 5f5807e1c3 Bug 1316755, part 2 - Remove bridges, opens and spawns from IPDL. r=billm
MozReview-Commit-ID: 2BDEXV0r8QB

--HG--
extra : rebase_source : 286b10988daab138b18f816149853b43069df65e
2017-01-26 16:43:27 -08:00
Andrew McCreight cd7431a68e Bug 1316755, part 1 - Remove IPDL unit tests that use bridges, opens, and spawns. r=billm
MozReview-Commit-ID: 3Te6nPOhYss

--HG--
extra : rebase_source : 3b8bf30e9f0c3c7c962a73fd8043af8152ebc93a
2017-01-26 16:30:18 -08:00
Andrew McCreight 7ebc34bfc2 Bug 1335103 - Remove spurious usage of Actor in lower.py. r=billm
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
2017-01-27 15:48:52 -08:00
Andrew McCreight 92628f1901 Bug 1334720 - Remove some unused IPDL code generator methods. r=jld
MozReview-Commit-ID: 4PRMjdjyFM8

--HG--
extra : rebase_source : 47592a3ee082a52b075c1d659754e07369e98d52
2017-01-26 17:05:10 -08:00
Bill McCloskey 4fd9d369d6 Bug 1331804 - Change default IPC message name to make it clearer (r=kanru)
MozReview-Commit-ID: 69l9FuqgSTV
2017-01-24 16:34:37 -08:00
Andrew McCreight a619072cc3 Bug 1332445 - Get rid of SymbolTable::globalScope. r=kanru
MozReview-Commit-ID: Ar69yiCqJnT

--HG--
extra : rebase_source : 33a19aaf6f1586bd1c023cfe7637201ea6774301
2017-01-23 10:52:22 -08:00
Andrew McCreight d6a0e6b709 Bug 1332486, part 3 - Merge CxxType into ImportedCxxType. r=kanru
MozReview-Commit-ID: 2lrVvDZJYhD

--HG--
extra : rebase_source : 1049108315123e3ade71d828cca5fc2f5c023a40
2017-01-23 10:45:11 -08:00
Andrew McCreight 656a6d5bf6 Bug 1332486, part 2 - Remove some type predicates that are never used. r=kanru
MozReview-Commit-ID: 89S5cZqaguH

--HG--
extra : rebase_source : 599d40bfb53ecdadb57902bcde3ab7c3ef3bb970
2017-01-23 10:42:17 -08:00
Andrew McCreight 44f6bf8952 Bug 1332486, part 1 - Remove the unused BuiltinCxxType. r=kanru
MozReview-Commit-ID: JRrWI26xWCy

--HG--
extra : rebase_source : 7be6512436e66075d900477f30057182de34483d
2017-01-23 10:39:39 -08:00
Mike Hommey f9c3dd278b Bug 1332523 - Make the Bootstrap API entry point the same for both dependent and standalone linkage. r=bsmedberg
--HG--
extra : rebase_source : 21d9371dfa0a7ed7ff056d8486f28c978df8932d
2017-01-13 07:29:56 +09:00
Andrew McCreight 09bbd9cfe3 Bug 1331787 - Make IPDL aborts fatal in release builds. r=billm
MozReview-Commit-ID: JSgNXtnjNxv

--HG--
extra : rebase_source : fbe1cbf05b0a7f50c26b57a1800bddbdd6e49469
2017-01-17 15:42:30 -08:00
Mike Hommey 09dc362a61 Bug 1306327 - Use the new XRE Bootstrap API in Desktop Firefox. r=bsmedberg
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
2016-12-16 11:10:02 +09:00
Nathan Froyd d489d17c87 Bug 1322553 - part 3 - add profiler start/end markers for sync IPC; r=mstange
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;
    }
2017-01-07 15:56:49 -05:00
Andrew McCreight f27d72c33d Bug 1323468, part 4 - inline |from| in Transition. r=kanru
MozReview-Commit-ID: LwcpNikbe2b

--HG--
extra : rebase_source : 25ace3d2f3e408ca48c72f6e8ea11217990a6f12
2016-12-14 11:15:05 -08:00
Andrew McCreight d0dc5ef0a4 Bug 1323468, part 3 - Change the return type of Transition to void. r=kanru
This function either crashes or returns true.

MozReview-Commit-ID: IX2MPbgLal0

--HG--
extra : rebase_source : f199280e2670c2d28357ea67523ae0336c160551
2016-12-14 10:27:22 -08:00
Andrew McCreight 888e432b17 Bug 1323468, part 2 - Pass the message id directly to Transition and eliminate Trigger. r=kanru
MozReview-Commit-ID: GU3lXP3eRh6

--HG--
extra : rebase_source : c01247a988cc80cf2739c10a44dc0a971495e528
2016-12-14 10:09:47 -08:00
Andrew McCreight 2a9fd5cd2a Bug 1323468, part 1 - Remove some unused variables from genTransitionFunc. r=kanru
MozReview-Commit-ID: 7aoV1jcO5Sn

--HG--
extra : rebase_source : f184797c0408890f0360651e8c233cef89896515
2016-12-14 09:41:33 -08:00
Andrew McCreight d00682b3cf Bug 1321029 - State::__Error is no longer used. r=kanru
MozReview-Commit-ID: 3HfwUrcGeTv

--HG--
extra : rebase_source : 67941c9703cba52938c0ba92c69288da95dde54b
2016-11-28 15:39:11 -08:00
Carsten "Tomcat" Book fd4709f9c1 merge mozilla-inbound to mozilla-central a=merge 2016-12-14 16:41:28 +01:00
Bill McCloskey 67bf1ff2ba Revert "Bug 1319271 - Return early in Send__delete__ method when Send fails. r=billm"
This reverts commit 8807f9ccde574d50a142ac9378890cc7ac5b68e2.
2016-12-13 16:46:32 -08:00
Kan-Ru Chen 4fa8f3b74f Bug 1319271 - Return early in Send__delete__ method when Send fails. r=billm
Only for the async version.

MozReview-Commit-ID: GOVSpzT3JlX
2016-12-07 12:12:43 -10:00
Tomislav Jurin 348bfffc19 Bug 1296189 - Replace NS_RUNTIMEABORT("some string literal message") with MOZ_CRASH(). r=froydnj 2016-12-02 13:46:53 -08:00
Andrew McCreight f03404b039 Bug 1321010 - Remove two minor bits of deritrus from IPDL Python code. r=kanru
The bug referred to in the comment was fixed 6 years ago.

The includes in cgen.py are unused.

--HG--
extra : rebase_source : f4521112ee3f2280836ac7030b25ddcba2321eda
2016-11-28 15:16:57 -08:00
Andrew McCreight 3b21f2993f Bug 1316757, part 7 - Remove IPDL state machine from frontend. r=billm
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
2016-11-23 15:04:09 -08:00
Andrew McCreight 0492d18521 Bug 1316757, part 6 - Comment out various race-related state machines. r=billm
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
2016-11-23 14:58:49 -08:00
Andrew McCreight ff229fdc74 Bug 1316757, part 5 - Comment out simple uses of state machine from cxx/ unit tests. r=billm
MozReview-Commit-ID: 3Ce1nte6EoN

--HG--
extra : rebase_source : ef8f0b1e5d7c9016151f3dcf08398456b929420d
2016-12-13 13:07:38 -08:00
Andrew McCreight 2f16f62dfe Bug 1316757, part 4 - Remove trivial state machines from IPDL unit tests. r=billm
MozReview-Commit-ID: GJgfzQ8CArj

--HG--
extra : rebase_source : 87aa940d87dd2286168699a0a25508bcb34dbdc2
2016-11-23 09:13:46 -08:00
Andrew McCreight a3d8276ca3 Bug 1316757, part 3 - Delete IPDL unit tests that look like they only test state machine stuff. r=billm
MozReview-Commit-ID: 7Lek3YzLIft

--HG--
extra : rebase_source : 16a53cbd579554a82b84ee28f638b3517537e413
2016-11-23 09:10:45 -08:00
Andrew McCreight c5c7f69cf3 Bug 1316757, part 2 - Remove assertions involving state() from cxx/ unit tests. r=billm
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
2016-11-28 13:43:09 -08:00
Andrew McCreight 4bf21b65b7 Bug 1320833 - Only generate State enum case for PFoo::State::__Dying when hasReentrantDelete(). r=kanru
MozReview-Commit-ID: DpxXD7y8GpD

--HG--
extra : rebase_source : ae9044309196f8c799674d85ebe0db869b4207f4
2016-11-28 15:49:26 -08:00
Andrew McCreight 5a67cdbd4f Bug 1320835 - Remove unused _getcallerpath from IPDL's parser.py. r=kanru
MozReview-Commit-ID: APiXElSQGQ1

--HG--
extra : rebase_source : e8a3c140ff9594f34e76809c72e2f6567285c455
2016-11-28 14:47:57 -08:00
Andrew McCreight f91a03949a Bug 1320755 - Remove dependence of IPDL unit tests on state() method. r=dvander
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
2016-11-23 15:21:58 -08:00
Andrew McCreight ced5e33c0a Bug 1319910 - Crash child, not parent, on FatalError in TestActorPunning and TestBadActor. r=billm
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
2016-11-23 13:40:04 -08:00
Andrew McCreight 1cb2f34ca9 Bug 1319595, part 7 - Remove obsolete test. r=billm
Bill said it is okay to declare interrupt parent-to-child messages now.

MozReview-Commit-ID: 5Ma6pfkUZmt

--HG--
extra : rebase_source : 68fd3f51a9154136003871425762816593d66139
2016-11-22 16:06:11 -08:00
Andrew McCreight 35d5402bc4 Bug 1319595, part 6 - Fix various IPDL tests. r=billm
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
2016-11-22 15:26:08 -08:00
Andrew McCreight 554d2bf9c1 Bug 1319595, part 5 - Rename rpc to interrupt in IPDL error/ unit tests. r=billm
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
2016-11-22 15:01:33 -08:00
Andrew McCreight 6d897bf5ca Bug 1319595, part 4 - Fix type checker handling of end points without qualifiers. r=billm
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
2016-11-22 13:55:59 -08:00
Andrew McCreight 025b63715a Bug 1319595, part 3 - Allow including a type twice as long as it is from the same file both times. r=billm
This patch fixes multipleUsingCxxTypes.ipdl. This is a regression from
bug 918651.

MozReview-Commit-ID: 3ByBvp6FZUe

--HG--
extra : rebase_source : 8038d8662360a8f12e571716eb7c59d2b3754508
2016-11-22 14:25:04 -08:00
Andrew McCreight 175c88a5d3 Bug 1319595, part 2 - Add async annotations to IPDL unit tests. r=billm
As of bug 1240871 these are no longer optional.

MozReview-Commit-ID: 2r2uxJP9dDr

--HG--
extra : rebase_source : 6ca55ae336a7c7d37764b657333e331f3b6158c9
2016-11-22 14:05:19 -08:00
Andrew McCreight 05edbf70f3 Bug 1319595, part 1 - Remove IPDL error tests involving state machine or bridge/open. r=billm
MozReview-Commit-ID: 4TUWBGzh3eJ

--HG--
extra : rebase_source : 1e7bed9deaec652e7aafab03860e58a2c3b10716
2016-11-22 14:01:34 -08:00
Phil Ringnalda 109396b4d6 Backed out changeset a9856363aac7 (bug 1319271) for opt Windows crashes in plugin tests 2016-11-25 21:17:57 -08:00
Kan-Ru Chen f58e35a5a9 Bug 1319271 - Return early in Send__delete__ method when Send fails. r=billm
MozReview-Commit-ID: GOVSpzT3JlX
2016-11-25 10:16:31 +08:00
Andrew McCreight 09ae562045 Bug 1319615 - Delete trailing whitespace from some IPDL files. r=billm
MozReview-Commit-ID: Jetx4ARsSZZ

--HG--
extra : rebase_source : dca27fc488f1d87ee51d08a32c3f476a62930cb8
2016-11-21 13:33:34 -08:00
Andrew McCreight f26fee6332 Bug 1319582 - Fix misspelling of hierarchy in IPDL error message. r=billm
MozReview-Commit-ID: HmTrQKlA60D

--HG--
extra : rebase_source : 82bf612dd22caf5898d04c8b628de5b645df0863
2016-11-22 15:12:05 -08:00
Mike Hommey aa465311ee Bug 1319350 - Add dedicated targets for some one-offs in the build. r=mshal
--HG--
extra : rebase_source : 5094663983fbdf4c3f95b685945c6be4cf3b179e
2016-11-22 16:55:58 +09:00
Bill McCloskey 92bc2d9707 Bug 1317844 - Allow an event target to be specified for each IPC actor (r=dvander)
MozReview-Commit-ID: 1xuWFTS8skZ
2016-11-21 17:03:39 -08:00
Bill McCloskey ce28731f8b Revert "Bug 1317844 - Allow an event target to be specified for each IPC actor (r=dvander)"
This reverts commit 30396b9e84304ad7ee7d5a253ec886325a0f0cbe.
2016-11-21 16:49:44 -08:00
Bill McCloskey 60edaca23d Bug 1317844 - Allow an event target to be specified for each IPC actor (r=dvander)
MozReview-Commit-ID: 1xuWFTS8skZ
2016-11-21 16:43:15 -08:00
Bill McCloskey 75ee8c1609 Bug 1317844 - Add IPC message constructor flag (r=dvander)
MozReview-Commit-ID: 3eEAN5LqJ6N
2016-11-21 16:43:10 -08:00
Andrew McCreight bf271af4ea Bug 1318743 - Remove errout from IPDL parser. r=billm
MozReview-Commit-ID: 922dDCgd6s6

--HG--
extra : rebase_source : c562c551e63a93570fbe8390bf746c3df5ef0a63
2016-11-18 11:07:06 -08:00
Andrew McCreight 72a1e0edd5 Bug 1318110 - Correctly handle parse errors in inner IPDL parsers. r=billm
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
2016-11-17 14:18:06 -08:00
Andrew McCreight 90b5777783 Bug 1317180, part 8 - Remove unused optional argument chmodallowed to _canonicalType. r=billm
As of the previous patch, this argument no longer does anything.

--HG--
extra : rebase_source : 06587e3823050dbf19e223caa79483df66d3220f
2016-11-14 11:18:00 -08:00
Andrew McCreight 0e484796c6 Bug 1317180, part 7 - Remove TypeSpec fields myChmod and otherChmod that are never set. r=billm
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
2016-11-14 11:17:12 -08:00
Andrew McCreight 219ef41aa4 Bug 1317180, part 6 - Removed some unused arguments from TypeSpec ctor. r=billm
--HG--
extra : rebase_source : 5f695d6f40cf1e3ba562fcf3a4938945ff8f3acb
2016-11-14 10:57:43 -08:00
Andrew McCreight d5d74e48b0 Bug 1317180, part 5 - Get rid of the now-unused state field in TypeSpec. r=billm
--HG--
extra : rebase_source : cb1d89066a37c6fbe2173a4b2bf358e46971c3bb
2016-11-14 10:50:49 -08:00
Andrew McCreight 2ec13a692a Bug 1317180, part 4 - Inline ScalarType. r=billm
MozReview-Commit-ID: 5pvEBXPgjZI

--HG--
extra : rebase_source : 63692f132005177ede6d4a747ecbfaf4c1554c14
2016-11-13 09:53:36 -08:00
Andrew McCreight 54b9d65d1b Bug 1317180, part 3 - Remove unused ActorType syntax. r=billm
MozReview-Commit-ID: 9ln5tyA2aSo

--HG--
extra : rebase_source : d2f89d22541f985b1454d24ac23997328d351766
2016-11-13 09:52:25 -08:00
Andrew McCreight 6af7792084 Bug 1317180, part 2 - Remove really old ~ syntax error for MessageId in IPDL parser. r=billm
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
2016-11-13 09:48:07 -08:00
Andrew McCreight 922c8bc81d Bug 1317180, part 1 - Remove trailing whitespace from ast.py and parser.py. r=billm
MozReview-Commit-ID: IrQ7kiddrYO

--HG--
extra : rebase_source : c8ee3ff8cf497457371db1c4d260c2669ced7711
2016-11-13 09:18:23 -08:00
Kan-Ru Chen f8100451db Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm
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
2016-11-15 04:26:00 +01:00
Andrew McCreight e1cc56c7f4 Bug 1317177, part 2 - Remove unused functions. r=billm
MozReview-Commit-ID: EM1Mj6chXCV

--HG--
extra : rebase_source : 27be5ba79727d6d9e3efba5debadd23220a3dacb
2016-11-13 09:02:11 -08:00
Andrew McCreight 4aa4ade024 Bug 1317177, part 1 - Add missing override annotations. r=billm
MozReview-Commit-ID: ESLBskahTIK

--HG--
extra : rebase_source : 9c3a63cd7ab465fd08eac351c3909f983d1e5600
2016-11-13 09:02:03 -08:00
Bill McCloskey 1429a6789b Bug 792652 - Move mId to toplevel protocol (r=dvander) 2016-11-08 15:22:55 -08:00
Bill McCloskey 16cd6076eb Bug 792652 - Move over toplevel shmem code (r=dvander) 2016-11-08 15:22:54 -08:00
Bill McCloskey be9065397e Bug 792652 - Move toplevel actor map to IToplevelProtocol (r=dvander) 2016-11-08 15:22:53 -08:00
Bill McCloskey ef443ad460 Bug 792652 - Move TakeMinidump to IToplevelProtocol (r=dvander) 2016-11-08 15:22:52 -08:00
Bill McCloskey a6224b4684 Bug 792652 - Move some channel methods to IToplevelProtocol (r=dvander)
Move Open, Close, SetReplyTimeoutMs to IToplevelProtocol.
2016-11-08 15:22:51 -08:00
Bill McCloskey 4e0c0139b2 Bug 792652 - Move over toplevel process ID field (r=dvander)
Moves some state to IToplevelProtocol.
2016-11-08 15:22:49 -08:00
Bill McCloskey 57135907a4 Bug 792652 - Remove pointless OnFoo methods (r=dvander)
A bunch of these methods just delegate from OnFoo to Foo. Not
sure why we have OnFoo.
2016-11-08 15:22:48 -08:00
Bill McCloskey bbb256b840 Bug 792652 - Move shmem methods to ProtocolUtils (r=dvander)
This patch moves some shmem management code into IProtocol. Someday
maybe we can get rid of IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead.
2016-11-08 15:22:46 -08:00
Bill McCloskey b47737ed9f Bug 792652 - Move FatalError to IProtocol (r=dvander)
This patch moves FatalError to IProtocol. I had to make a few changes.
- I added a ProtocolName() method to find the name of the protocol.
- I gave the two-argument version of FatalError its own name. Otherwise
  C++ doesn't like there to be two virtual methods with the same name
  in cases where one is overridden and the other isn't (as happens
  in IToplevelProtocol).
2016-11-08 15:22:45 -08:00
Bill McCloskey 12585264a1 Bug 792652 - Add mSide to IProtocol (r=dvander)
This patch adds a field to hold ParentSide/ChildSide state. Useful for
later changes.
2016-11-08 15:22:43 -08:00
Bill McCloskey f8bd2627a7 Bug 792652 - Stop generating code for toplevel-only methods in non-toplevel protocols (r=dvander)
Moves OnProcessingError, OnChannelError, OnChannelConnected so that they're
only generated for toplevel protocols. For some reason APZCTreeManagerChild
implemented OnProcessingError. I'm not sure what the intention was there so
I removed it.
2016-11-08 15:22:42 -08:00
Bill McCloskey 88c9f678a0 Bug 792652 - Move mChannel to IProtocol (r=dvander)
This moves the mChannel field to IProtocol. The toplevel protocol still keeps
its own mChannel field that's a MessageChannel (no pointer).
2016-11-08 15:22:41 -08:00
Bill McCloskey a4ec434a63 Bug 792652 - Stop generating some simple sub-protocol methods (r=dvander)
This moves some of the generated methods in subprotocols that simply defer
to the parent protocol to IProtocol. These methods are still overridden in
the toplevel protocol.
2016-11-08 15:22:39 -08:00
Bill McCloskey 5f55831a5e Bug 792652 - Store Manager() in IProtocol (r=dvander)
This patch stores mManager in IProtocol rather than in each individual
PFoo. It also adds a generic accessor for that field. Note that each
individual protocol still defines a Manager() function that returns
PFooParent or whatever. I tried to get rid of that but it was a lot
of work.
2016-11-08 15:22:38 -08:00
Bill McCloskey 81c169c2a9 Bug 792652 - Remove methods from MessageListener (r=dvander)
With this change, MessageChannel stores mListener as an IToplevelProtocol
rather than a MessageListener (which isn't really a useful concept on
its own). The MessageListener methods are split out to IProtocol and
IToplevelProtocol. MessageListener gets deleted. Some of the inline
functions in MessageChannel had to be moved to MessageChannel.cpp since
IToplevelProtocol isn't defined in MessageChannel.h.
2016-11-08 15:22:36 -08:00
Bill McCloskey 5e4a576d00 Bug 792652 - IToplevelProtocol refactoring (r=dvander)
Currently toplevel protocols inherit from both IProtocolManager<IProtocol>
and IToplevelProtocol. This change makes IToplevelProtocol inherit from
IProtocol, so now toplevel protocols only inherit from
IToplevelProtocol.
2016-11-08 15:22:35 -08:00
Bill McCloskey 4e78a26c74 Bug 792652 - Simplify IPDL type hierarchy (r=dvander)
Currently all our protocols inherit from IProtocolManager<IProtocol>. I have
no idea why. This patch switches everything over to IProtocol, without any
templates. I had to move ReadActor to the .cpp file to avoid redefinition
errors.
2016-11-08 15:22:34 -08:00
Bill McCloskey d9f445e359 Bug 792652 - Get rid of CloneProtocol (r=dvander)
CloneProtocol is leftover code from Nuwa. We can remove it now.
2016-11-08 15:22:33 -08:00
Wes Kocher 4b3d16605a Backed out 18 changesets (bug 792652) for build bustage on linux64 a=backout CLOSED TREE
Backed out changeset 90eaf6aec002 (bug 792652)
Backed out changeset ddd915ab4a48 (bug 792652)
Backed out changeset 95eff6c45cae (bug 792652)
Backed out changeset 75855b5a9ab9 (bug 792652)
Backed out changeset b658ebaad5d7 (bug 792652)
Backed out changeset 2ba36b8ac60c (bug 792652)
Backed out changeset 94fcd3bf3f34 (bug 792652)
Backed out changeset cf9c4164eb43 (bug 792652)
Backed out changeset 59e6d0a4f35b (bug 792652)
Backed out changeset bdf86b8b9c43 (bug 792652)
Backed out changeset 8edf4b247250 (bug 792652)
Backed out changeset 63a3c8e4016e (bug 792652)
Backed out changeset e3e496eab991 (bug 792652)
Backed out changeset 5a1e3136323a (bug 792652)
Backed out changeset dbbe3a8c00e7 (bug 792652)
Backed out changeset 1829d5358808 (bug 792652)
Backed out changeset 004cd692ba6d (bug 792652)
Backed out changeset 92e7fee81fa2 (bug 792652)
2016-11-08 12:05:28 -08:00
Bill McCloskey 67dfdfc8f1 Bug 792652 - Move mId to toplevel protocol (r=dvander) 2016-11-08 11:32:35 -08:00
Bill McCloskey 9d9cc9e45c Bug 792652 - Move over toplevel shmem code (r=dvander) 2016-11-08 11:32:34 -08:00
Bill McCloskey ab22794700 Bug 792652 - Move toplevel actor map to IToplevelProtocol (r=dvander) 2016-11-08 11:32:34 -08:00
Bill McCloskey 999339c203 Bug 792652 - Move TakeMinidump to IToplevelProtocol (r=dvander) 2016-11-08 11:32:33 -08:00
Bill McCloskey c0782dea68 Bug 792652 - Move some channel methods to IToplevelProtocol (r=dvander)
Move Open, Close, SetReplyTimeoutMs to IToplevelProtocol.
2016-11-08 11:32:32 -08:00
Bill McCloskey 21ae8ace50 Bug 792652 - Move over toplevel process ID field (r=dvander)
Moves some state to IToplevelProtocol.
2016-11-08 11:32:32 -08:00
Bill McCloskey 5f4e75da9e Bug 792652 - Remove pointless OnFoo methods (r=dvander)
A bunch of these methods just delegate from OnFoo to Foo. Not
sure why we have OnFoo.
2016-11-08 11:32:31 -08:00
Bill McCloskey 2ddcd52630 Bug 792652 - Move shmem methods to ProtocolUtils (r=dvander)
This patch moves some shmem management code into IProtocol. Someday
maybe we can get rid of IHadBetterBeIPDLCodeCallingThis_OtherwiseIAmADoodyhead.
2016-11-08 11:32:31 -08:00
Bill McCloskey 35fc224b71 Bug 792652 - Move FatalError to IProtocol (r=dvander)
This patch moves FatalError to IProtocol. I had to make a few changes.
- I added a ProtocolName() method to find the name of the protocol.
- I gave the two-argument version of FatalError its own name. Otherwise
  C++ doesn't like there to be two virtual methods with the same name
  in cases where one is overridden and the other isn't (as happens
  in IToplevelProtocol).
2016-11-08 11:32:30 -08:00
Bill McCloskey 215c366d52 Bug 792652 - Add mSide to IProtocol (r=dvander)
This patch adds a field to hold ParentSide/ChildSide state. Useful for
later changes.
2016-11-08 11:32:30 -08:00
Bill McCloskey 0991523235 Bug 792652 - Stop generating code for toplevel-only methods in non-toplevel protocols (r=dvander)
Moves OnProcessingError, OnChannelError, OnChannelConnected so that they're
only generated for toplevel protocols. For some reason APZCTreeManagerChild
implemented OnProcessingError. I'm not sure what the intention was there so
I removed it.
2016-11-08 11:32:29 -08:00