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

1101 Коммитов

Автор SHA1 Сообщение Дата
Ryan VanderMeulen 4b1082a507 Backed out changeset 0ff4ad45f99c (bug 1337058) for causing bug 1370237.
--HG--
extra : rebase_source : 3ed4d5a41898ead386f8a75b0d2f7be1899cf767
2017-06-05 20:14:55 -04:00
Kartikaya Gupta 8bd2880fc4 Bug 1369840 - Add new test IPDL message to sync-messages.ini. r=dvander
MozReview-Commit-ID: 51i94Gj0Mgq
2017-06-04 22:29:35 -04:00
Kyle Machulis 2902c3f037 Bug 1337058 - Remove FindPlugins IPC message; r=bsmedberg
MozReview-Commit-ID: GQVHEeQp1dx

--HG--
extra : rebase_source : d421a613434be2bcca1120cfffb92ed9f20ba9d4
2017-06-01 15:33:23 -07:00
Kan-Ru Chen 2813dde8a6 Bug 1368031 - Pass resolver function to Recv methods instead of a MozPromise r=billm
Added new typedef for the Resolve function. The Resolve function is a
std::function accepting corresponding parameters. When it's invoked it
will send the reply immediately. Users can still wrap it in a
MozPromise if they want promise chaining.

The original typedef of the Promise type is repurposed as the Send*
functions' return type.

MozReview-Commit-ID: JZ4IsgJ87M1
2017-06-01 15:57:21 +08:00
Kan-Ru Chen fc620b75af Bug 1368031 - Do not send reply if actor is dead r=billm
Actors with async returns methods will automatically implement
WeakPtr so we can check in the resolving function whether it's safe to
send messages.

MozReview-Commit-ID: IyDwIYSShlS
2017-06-01 15:57:20 +08:00
Kearwood Gilbert eb3becc0b0 Bug 1362213 - Implement chrome-only API to manage VR sessions r=daoshengmu,kanru,smaug
- Added new chrome-only webidl methods to be used by browser UI and WebExtensions
- Implemented bitmasked group visibility for VR sessions to enable switching
  between chrome and regular content presentations.
- Implemented throttling mechanism to avoid runaway, unthrottled render loops
  for VR sessions that are hidden by group visibility bitmasks or due to
  lower level platform VR events, such as during the Oculus
  "Health and Safety Warning".
- Simplified the PVRManager IPC protocol while extending it to support
  VR session groups and later WebVR content performance profiling API's.
- Removed the last WebVR related sync IPC call.


MozReview-Commit-ID: BMEIPyYeEbq

--HG--
extra : rebase_source : 47d3682cad3d913504175b7d4c3e9d992236f097
2017-05-08 16:01:36 -07:00
Kartikaya Gupta d5c99e4ebb Bug 1367837 - Implement some APZ test util APIs for webrender. r=botond,dvander
This implements some methods exposed on DOMWindowUtils and used by
reftests, for the WebRender codepath. The implementation is very similar
to the implementation in LayerTransactionParent.

MozReview-Commit-ID: HP8OxzIzS7P
2017-05-28 07:48:36 -04:00
Kan-Ru Chen e900659346 Bug 1367176 - Expose promise typedef to public so it can be used outside of actor. r=billm
MozReview-Commit-ID: JRlPR2rs3ij

--HG--
extra : rebase_source : 7e23178f678d0fffd99d21bbf4fdbb954792fa0e
2017-05-24 13:06:35 -04:00
David Parks f2774deb20 Bug 1363290 - Part 3: Proxy win32's SetCursorPos for plugins in chrome process. r=jimm, r=jed
SetCursorPos is used by Flash's relative cursor motion behavior.  It is blocked by the plugin sandbox.  This patch allows it to run by proxying it on the main process.

--HG--
extra : histedit_source : 85515d398c0c107c2258185c0591a943b26e724a
2017-05-16 14:47:09 -07:00
Andrea Marchesini 281c7e8cdd Bug 1359718 - Get rid of PBlob - part 2 - PBlob, r=smaug, r=kanru 2017-05-23 18:05:19 +02:00
Andrea Marchesini bc8f9a2827 Bug 1359718 - Get rid of PBlob - part 1 - Remove PBlobStream, r=smaug, r=kanru 2017-05-23 18:04:27 +02:00
Ehsan Akhgari 1040ee9f65 Bug 1347035 - Store the maximum touch points for each tab child on the object instead of querying it synchronously from the parent actor when neeeded; r=smaug ipc-r=kanru 2017-05-23 17:00:09 -04:00
Sebastian Hengst b34db7c9fe Backed out changeset 48ed92a3d18a (bug 1359718) 2017-05-23 19:12:31 +02:00
Sebastian Hengst 4ac10ab053 Backed out changeset c3251f5022dd (bug 1359718) 2017-05-23 19:12:25 +02:00
Andrea Marchesini f512688b0b Bug 1359718 - Get rid of PBlob - part 2 - PBlob, r=smaug, r=kanru 2017-05-23 18:05:19 +02:00
Andrea Marchesini 7c4d305b8f Bug 1359718 - Get rid of PBlob - part 1 - Remove PBlobStream, r=smaug, r=kanru 2017-05-23 18:04:27 +02:00
Sebastian Hengst 77897ad1e3 Backed out changeset 3b7d055b4207 (bug 1359718) 2017-05-23 18:34:45 +02:00
Sebastian Hengst 89e8ea64b1 Backed out changeset 537abc431472 (bug 1359718) 2017-05-23 18:34:40 +02:00
Andrea Marchesini 7db3365daf Bug 1359718 - Get rid of PBlob - part 2 - PBlob, r=smaug, r=kanru 2017-05-23 18:05:19 +02:00
Andrea Marchesini ed95a3adde Bug 1359718 - Get rid of PBlob - part 1 - Remove PBlobStream, r=smaug, r=kanru 2017-05-23 18:04:27 +02:00
Wes Kocher 8b07ba2a07 Merge m-c to inbound a=merge
a=release IGNORE BAD COMMIT MESSAGES
2017-05-19 15:18:51 -07:00
Michael Layzell 7d8410d3a5 Bug 1348401 - Make the PPrinting::ShowProgress IPC message async, r=mconley, r=billm
MozReview-Commit-ID: 5pK08I3itYa
2017-05-19 16:16:13 -04:00
Kartikaya Gupta 5d656fab0f Merge m-c to graphics
MozReview-Commit-ID: HvsAeMjJAIA
2017-05-19 09:30:48 -04:00
Kartikaya Gupta aca076b94b Merge m-c to graphics
MozReview-Commit-ID: DFNbcj14mg9

--HG--
rename : memory/mozjemalloc/jemalloc.c => memory/mozjemalloc/mozjemalloc.cpp
rename : memory/mozjemalloc/jemalloc_types.h => memory/mozjemalloc/mozjemalloc_types.h
2017-05-18 08:34:15 -04:00
Jeff Muizelaar b9411eb4eb Bug 1364626. Ensure our transaction arrives at the compositor before asking the parent to paint. r=dvander
This makes UpdateLayerTree synchronous enough to ensure that the layer
transaction from the child reaches the compositor. Given the comment in
http://searchfox.org/mozilla-central/rev/484d2b7f51b7aed035147bbb4a565061659d9278/dom/interfaces/base/nsIDOMWindowUtils.idl#106
this seems to be the original intent of this function anyways. Without this, we
can have a race between the child talking to the compositor and the child
talking to the parent talking to the compositor.

This also changes GetCompositorBridgeChild to work even when the widget doesn't
have a CompositorBridge
2017-05-17 10:45:33 -04:00
Jeff Muizelaar 0ed20eff4a Revert "Ensure our transaction arrives at the compositor before asking the parent to paint"
This reverts commit e0ec2a72700f.
2017-05-17 10:44:33 -04:00
Jeff Muizelaar b2c7a3fec1 Ensure our transaction arrives at the compositor before asking the parent to paint
This makes UpdateLayerTree synchronous enough to ensure that the layer
transaction from the child reaches the compositor. Given the comment in
http://searchfox.org/mozilla-central/rev/484d2b7f51b7aed035147bbb4a565061659d9278/dom/interfaces/base/nsIDOMWindowUtils.idl#106
this seems to be the original intent of this function anyways. Without this, we
can have a race between the child talking to the compositor and the child
talking to the parent talking to the compositor.

This also changes GetCompositorBridgeChild to work even when the widget doesn't
have a CompositorBridge
2017-05-17 10:42:09 -04:00
Henry Chang 8091c86b7e Bug 1364857 - Reject pending promises for actor when it's going to be destroyed. r=kanru
The lifetime of async IPDL returned promise may be longer than its actor.
That is, the handler (receiver) may have not resolve/reject the promise when the actor
is destroyed. In this case, we have to reject all the pending promises before
ActorDestroy() is called on the "sender" side.

Besides, the handler (receiver) can reject with reason "ActorDestroyed" to silently
cancel the promise without trying to reply to the remote actor which may
have died. The sender-side promise is responsible for rejecting the pending promises,
which will be done in MessageChannel::RejectPendingPromisesForActor().

MozReview-Commit-ID: 4XjmquZzDBO

--HG--
extra : rebase_source : 48539e35e4587e09be1d66497b1ea32d1a95ee9a
2017-05-17 16:59:48 +08:00
JW Wang f63d012078 Bug 1365517 - Remove the call to AbstractThread::GetCurrent() in TestAsyncReturns.cpp. r=kanru
See bug 1365483 for the rationale.

MozReview-Commit-ID: AGFtjTzRqvC

--HG--
extra : rebase_source : c8309d12fe8cbbc964f7bdf8b4e79683a1af6756
2017-05-17 15:34:20 +08:00
David Anderson 42e57ec6d3 Remove old device reset and compositor swapping code. (bug 1363126 part 3, r=rhunt) 2017-05-11 22:44:28 -07:00
David Anderson 27df5ad5bd Handle remote device resets by recreating the entire rendering stack. (bug 1363126 part 1, r=rhunt, ipc_r=billm) 2017-05-11 22:44:27 -07:00
David Anderson af30648746 Make PLayerTransaction's constructor async. (bug 1350634, ipc_r=billm, r=mattwoodrow, r=kats)
PLayerTransaction's constructor was previously synchronous so we could
return a TextureFactoryIdentifier. This is quite reliably available
already in the case of opening a tab, due to RenderFrameParent knowing
which compositor it is attached to, so we can make the constructor
asynchronous.

In the top-level widget case, we add a new synchronous message to find
the TextureFactoryIdentifier.
2017-05-05 10:53:17 -07:00
Phil Ringnalda 6b129efd40 Backed out changeset 867fcd3e181d (bug 1350634) for leaking in sessionstore's browser-chrome tests
MozReview-Commit-ID: 7NS2GkfZSp0
2017-04-30 21:14:10 -07:00
David Anderson d7a1f66c55 Make PLayerTransaction's constructor async. (bug 1350634, ipc_r=billm, r=mattwoodrow, r=kats)
PLayerTransaction's constructor was previously synchronous so we could
return a TextureFactoryIdentifier. This is quite reliably available
already in the case of opening a tab, due to RenderFrameParent knowing
which compositor it is attached to, so we can make the constructor
asynchronous.

In the top-level widget case, we add a new synchronous message to find
the TextureFactoryIdentifier.
2017-04-30 17:22:56 -07:00
Samael Wang d5dd0ed263 Bug 1337064 - Remove sync protocol PContent::AllocateTabId. r=kanru
Remove sync protocol AllocateTabId. Instead we generate tabId in
each process with nsContentUtils::GenerateTabId, and register
RemoteFrameInfo in parent process. If the tab id was generated from
a content process, it's sent parent through either PBrowserConstructor
or PContent::CreateChildProcess.

MozReview-Commit-ID: D3W2fK9eCNH

--HG--
extra : rebase_source : 1913f8f586537be1c82a70a19cc8c6351671d0df
2017-04-05 18:42:00 +08:00
Kan-Ru Chen 6c2259f717 Bug 1358697 - Don't capture the Promise raw pointer and make static analysis happy. r=billm
MozReview-Commit-ID: 7lMVMcNBDHJ

--HG--
extra : rebase_source : 3526408144e9d0486e0c212151682bc98275c8e5
2017-04-22 10:38:52 +08:00
Iris Hsiao d838010e1d Backed out changeset 2f0e513820c0 (bug 1358697) for build bustage 2017-04-25 10:04:11 +08:00
Kan-Ru Chen 3d7756c274 Bug 1358697 - Don't capture the Promise raw pointer and make static analysis happy. r=billm
MozReview-Commit-ID: 7lMVMcNBDHJ

--HG--
extra : rebase_source : 4ea2e25c3a7e1f49a79b9b994024c00494f78047
2017-04-22 10:38:52 +08:00
Kan-Ru Chen ffab50c6f8 Bug 1313200 - Allow IPC messages to async return MozPromises. r=billm,jwwang
This patch implements async returns for IPDL using MozPromises. There
are following changes:

* Initialize AbstractThreads for MessageLoops
* Record promises and their reject functions
  * When async message returns, call their resolve functions
  * When send error or channel close, call their reject functions
* Implement "unresolved-ipc-promises" count for about:memory
* Test cases

See bug attachment for generated code from test cases

MozReview-Commit-ID: 7xmg8gwDGaW

--HG--
rename : ipc/ipdl/test/ipdl/error/AsyncReturn.ipdl => ipc/ipdl/test/ipdl/ok/AsyncReturn.ipdl
extra : rebase_source : 9a5821d6c0e5f7152b8152a17a409b94e8258dc3
2017-03-16 17:36:15 +08:00
Sebastian Hengst 45fe002ab2 Backed out changeset 325bf1bf5a1f (bug 1313200) for Android and reftest bustage. r=backout
--HG--
rename : ipc/ipdl/test/ipdl/ok/AsyncReturn.ipdl => ipc/ipdl/test/ipdl/error/AsyncReturn.ipdl
2017-04-18 18:24:56 +02:00
Kan-Ru Chen 625b54086e Bug 1313200 - Allow IPC messages to async return MozPromises. r=billm,jwwang
This patch implements async returns for IPDL using MozPromises. There
are following changes:

* Initialize AbstractThreads for MessageLoops
* Record promises and their reject functions
  * When async message returns, call their resolve functions
  * When send error or channel close, call their reject functions
* Implement "unresolved-ipc-promises" count for about:memory
* Test cases

See bug attachment for generated code from test cases

MozReview-Commit-ID: 7xmg8gwDGaW

--HG--
rename : ipc/ipdl/test/ipdl/error/AsyncReturn.ipdl => ipc/ipdl/test/ipdl/ok/AsyncReturn.ipdl
extra : rebase_source : 55c4f68a3f8b7d0df5ca9f9c45b9a205b337282d
2017-03-16 17:36:15 +08:00
Aaron Klotz 6302f1af4a Bug 1322532: Add sync text event to PDocAccessible; r=tbsaunde, r=billm
MozReview-Commit-ID: AFZMYghoOHe

--HG--
extra : rebase_source : 2364cf4a5ecaaceda151e16df170aebb77ae55e9
2017-04-13 17:08:42 -06:00
raouldc b4261cfb61 Bug 1352576 - Removed all instances of NPN_GetAuthenticationInfo from the codebase r=bsmedberg
NPN_GetAuthenticationInfo is an NPAPI API we implemented for Java and since we only support Flash we no longer need it.

MozReview-Commit-ID: HxNn91QeaMB

--HG--
extra : rebase_source : 016320ce93bde525dbf1b74f50f8b60d141d31cd
2017-04-13 23:57:08 +12:00
Bill McCloskey cd7be5521e Bug 1349699 - Assert when destroying a MessageLoop that a live MessageChannel is attached to (r=dvander)
MozReview-Commit-ID: GGr5UqJl3ui
2017-04-11 13:15:07 -07:00
Kartikaya Gupta 5e82717849 Bug 1350638 - Remove the GetCompositorOptions IPC message as it is no longer used. r=dvander
MozReview-Commit-ID: 18uiWGA9eJy

--HG--
extra : rebase_source : 217697a0e63d8c02d78de894ff7f33850924e50c
2017-04-09 17:31:59 -04:00
Phil Ringnalda 3c97553fda Backed out 2 changesets (bug 1349699) for Win8 opt xpcshell crashes at mozilla::ipc::MessageChannel::WillDestroyCurrentMessageLoop
Backed out changeset 5cc766c0864e (bug 1349699)
Backed out changeset 13f1d3918fe5 (bug 1349699)
2017-04-03 22:54:59 -07:00
Bill McCloskey 754aae1913 Bug 1349699 - Assert when destroying a MessageLoop that a live MessageChannel is attached to (r=dvander)
MozReview-Commit-ID: GGr5UqJl3ui
2017-04-03 21:54:19 -07:00
Phil Ringnalda 884bc64271 Backed out 3 changesets (bug 1349699) for Android mozilla::ipc::MessageChannel::WillDestroyCurrentMessageLoop crashes
Backed out changeset 8a50c2d76afc (bug 1349699)
Backed out changeset 3b9eadd61e26 (bug 1349699)
Backed out changeset 16e000b3fe0c (bug 1349699)
2017-04-03 21:07:49 -07:00
Bill McCloskey c3bd8c6e5b Bug 1349699 - Assert when destroying a MessageLoop that a live MessageChannel is attached to (r=dvander)
MozReview-Commit-ID: GGr5UqJl3ui
2017-04-03 19:41:13 -07:00
David Anderson 0f3b97ed9c When using the GPU process, combine layer ownership and window mapping into a single IPC message. (bug 1350660 part 1, r=rhunt, r=billm) 2017-04-03 15:13:37 -07:00
Kan-Ru Chen 8ba424eabb Bug 1194751 - Part 6. Use mozilla::widget::ScreenManager in content process. r=mconley
This is the most important part of the patch series. It removes the
PScreenManager protocol and use ScreenManager directly in the content
processes.

Initial and subsequent updates are sent via PContent::RefreshScreens.
struct ScreenDetails are kept to serialize Screen over IPC.

nsIScreenManager::ScreenForNativeWidget is removed because
nsIWidget::GetWidgetScreen can replace it. nsIScreen::GetId is removed
because it's not useful for the more general Screen class.

MozReview-Commit-ID: 5dJO3isgBuQ

--HG--
extra : rebase_source : 06aa4e4fd56e2b2af1e7483aee7c0cc7f35bdb97
2017-03-09 19:30:26 +08:00
Chris Pearce 78f1197a59 Bug 1315850 - Add LaunchGMPForNodeId to allowed sync IPCs. r=kanru
This merges two existing off-main-thread sync IPCs into a single operation.  We
will change them into a single async operation in a follow up.

MozReview-Commit-ID: EfMozbRysGR

--HG--
extra : rebase_source : c7f5c395a719b9f3f13d398f8ca976b09f25ce49
2017-03-13 11:46:28 +13:00
Andrew McCreight 8153ed878d Bug 1348838 - Pass in errfnSentinel in verify checkedRead. r=kanru
MozReview-Commit-ID: A40h9VEakBM

--HG--
extra : rebase_source : da708cb63228fa663a7ee472e821fb6b9798cb88
2017-03-20 09:55:52 -07:00
Carsten "Tomcat" Book 492970c342 merge mozilla-inbound to mozilla-central a=merge 2017-03-23 13:44:09 +01:00
Eric Rahm 3693cc51e3 Bug 1349350 - Make IPDL checker sync IPC message errors fatal. r=ehsan
The IPDL sync IPC message error checker needs to actually return a result and
exit if it fails.

MozReview-Commit-ID: 1ZAuAWRlsvk
2017-03-22 15:01:50 -07:00
Eric Rahm 1ad9009da0 Bug 1347000 - Fix false-positive sync message not found errors on windows builds. r=billm
MozReview-Commit-ID: 6ZLCJKotqEE
2017-03-22 15:01:49 -07:00
Wes Kocher 9a54a919a0 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 2LT2oEKZno8
2017-03-21 16:20:49 -07:00
Michael Layzell b6012319a5 Bug 1337056 - Part 10: Remove ReadPermissions from the sync-messages list, r=billm
MozReview-Commit-ID: 8Ki4KEHKnQm
2017-03-21 11:08:03 -04:00
Ehsan Akhgari 566751834a Bug 1346583 - Remove the PContent::Msg_OpenAnonymousTemporaryFile sync IPC; r=billm 2017-03-21 09:27:48 -04:00
Kearwood Gilbert b38d859652 Bug 1346926 - Make PVRManager::SetHaveEventListener async r=kanru
- There appears to be no issues with simply changing
  SetHaveEventListener from sync to async.

MozReview-Commit-ID: 3LKgDx9AZnm

--HG--
extra : rebase_source : 6c706f592f71a8c967a58f6906861fcff2525ebf
2017-03-21 13:21:17 -07:00
Kearwood Gilbert 4e410934af Bug 1346923 - Remove PVRManager::GetDisplays sync IPC r=daoshengmu,kanru
- PVRManager::GetDisplays was a sync IPC that was part of an optimization
  for a use case that has been eliminated by changes to the WebVR spec.
- This was an optimization for Navigator.activeVRDisplays that would allow
  enumeration of displays active in any content process without powering
  on any additional VR hardware.  This will no longer be necessary as the
  activeVRDisplays has been restricted to returning only the displays
  active in the current javascript context.

MozReview-Commit-ID: F6sOtM9nups

--HG--
extra : rebase_source : bd8967fab9677206d998eea922c8d1640551de1c
2017-03-15 16:40:57 -07:00
Andrew McCreight 042b6e5ca4 Bug 1347527, part 2 - Fix incorrect protocol name. r=kanru
This was causing the wrong error.

MozReview-Commit-ID: GQmuOOH55Ta

--HG--
extra : rebase_source : 1689af838857a9f08571fe3fc0a43c822abf242c
2017-03-15 06:24:53 -07:00
Andrew McCreight 04d2052106 Bug 1347527, part 1 - "can't use compression" IPDL error message doesn't have a closing paren. r=kanru
MozReview-Commit-ID: CONYxlOB2sP

--HG--
extra : rebase_source : 3c0784e9fd25c9bf2a67ec6fca9cb6d61730a9b9
2017-03-15 06:03:56 -07:00
Andrew McCreight d64b9bd504 Bug 1319620 - Check that IPDL unit tests in error/ fail for the right reason. r=billm
An IPDL unit test that is intended to fail should check that the
reason the test fails matches the expected reason for failure. We have
had a number of cases where some change, like renaming a keyword,
causes tests to start failing for the wrong reason, which means they
are no longer testing anything useful.

To support this, each file in error/ must contain one or more error
annotations. An error annotation is a line starting with "//error:",
followed by whatever the rest of the expected error is. For every one
of these annotations that a file has, the stderr output of compiling
the test must contain the specified string, including the "error:". It
is also an error for an error/ file to not contain an error
annotation.

To generate the initial set of annotations, I just copied and pasted
the error that each test produced. I did some light auditing to check
that the errors are reasonable, which did turn up one minor error
which I fixed as part of bug 1347527.

This patch does not check that every error produced by compiling the
file is in the list of expected errors. I think that's less of a
problem if it does occur.

MozReview-Commit-ID: BrePLGPPRil

--HG--
extra : rebase_source : 0ddb2f866c4b4ab74b7e975ce5877568c8cc3b62
2017-03-15 10:43:51 -07:00
Andrew McCreight a83e44233a Bug 1346958 - Eliminate PickleIterator::operator= calls. r=kanru
MozReview-Commit-ID: BGJUt9NG3GX

--HG--
extra : rebase_source : 0eb1dfb289c009097357e99bd84dbc83f6755997
2017-03-13 14:24:45 -07:00
Kearwood Gilbert 5441d7848d Bug 1345564 - Reduce sync IPC calls used by WebVR r=daoshengmu,Ehsan,kanru
- Eliminated the VRDisplay.GetImmediateSensorState sync call
  and associated code as it is no longer needed.

MozReview-Commit-ID: 7BsCKC9EbsY

--HG--
extra : rebase_source : ae2de369d156e397d919d83b6c63b10374953bae
2017-03-03 16:21:18 -08:00
Andrew McCreight 6634f11883 Bug 1345977 - Add unused message to PTestSyncHang to prevent compiler warning. r=billm
Adding this unused message prevents a compiler warning
about the private field mState being unused.

Also, get rid of some trailing whitespace.

MozReview-Commit-ID: Lb43JQhIbJU

--HG--
extra : rebase_source : c76eb5383a1535c79f2a66d3d6f8454e5b61d945
2017-03-10 14:34:19 -08:00
Andrew McCreight 50ab94e943 Bug 1345897 - Use a separate error function for sentinel errors. r=kanru
Using a separate error function will distinguish mismatched sentinels
from other errors, such as array length problems.

MozReview-Commit-ID: Gl8swNhqLns

--HG--
extra : rebase_source : 494759b105086c6c26f3ac53fb644bbf51c12800
2017-03-09 13:37:55 -08:00
Andrew McCreight 91a4a0b1a5 Bug 1346345 - Implement != operator for IPDL structs. r=kanru
MozReview-Commit-ID: H1CDbuXZ5U0

--HG--
extra : rebase_source : 88005a00cf7c9625179b63354d8947635fcf8d2a
2017-03-10 11:42:07 -08:00
Ehsan Akhgari e559e3333d Bug 1343731 - Remove the sync IPC during DataStorage initialization; r=keeler,billm
Instead of initializing DataStorage objects on demand in the content
process, we initialize them at content process startup by getting the
parent to send down the information about the existing DataStorages at
child process startup.  After that point, the dynamic change
notifications added in bug 1215723 will take care of keeping the
information in sync.
2017-03-10 22:35:07 -05:00
Ehsan Akhgari 5ab5fb52c4 Bug 1342636 - Part 3: Remove the GetCurrentScreenConfiguration sync IPC message; r=billm 2017-03-10 21:29:04 -05:00
Michael Layzell 3acb9e3b8a Bug 1342635 - Part 2: Add a telemetry probe for IPDL IPC serialzation time, r=billm
MozReview-Commit-ID: Gyx4QO8f5yx
2017-03-10 09:15:26 -05:00
Michael Layzell 657e5bfebf Bug 1342635 - Part 1: Add a telemetry probe for IPDL IPC deserialization time, r=billm
MozReview-Commit-ID: 8XWFWoRECrC
2017-03-10 09:15:26 -05:00
Ehsan Akhgari dcb0bf572d Bug 1345497 - Remove the unused PVRManager::GetControllers sync IPC; r=kip,billm 2017-03-09 23:26:47 -05:00
Ehsan Akhgari cc09372649 Bug 1345111 follow-up: Add a few platform-specific sync IPC messages back; fake-r=billm 2017-03-08 23:27:47 -05:00
Ehsan Akhgari 0946cb8425 Bug 1345111 - Make the IPDL compiler error out when it finds sync-messages.ini entries without corresponding IPDL sync messages; r=billm
This ensures that our sync-messages.ini correctly reflects the existing set of
sync IPC messages we have.
2017-03-08 22:43:35 -05:00
Andrea Marchesini 12b54aa0f5 Bug 1299500 - Get rid of DeviceStorage API - part 10 - DeviceStorage, r=ehsan, r=billm 2017-03-08 20:15:45 +01:00
Wes Kocher ee0cad3420 Backed out changeset 2288120b007e (bug 1345111) for Windows build failures a=backout
MozReview-Commit-ID: IcBrJg6Ff8T
2017-03-07 17:28:01 -08:00
Ehsan Akhgari 0899f728cc Bug 1345111 - Make the IPDL compiler error out when it finds sync-messages.ini entries without corresponding IPDL sync messages; r=billm
This ensures that our sync-messages.ini correctly reflects the existing set of
sync IPC messages we have.
2017-03-07 20:13:29 -05:00
Andrew McCreight e5898d34c7 Bug 1342580 - Don't generate actor "state" method. r=kanru
MozReview-Commit-ID: 8Am8TIQfH0h

--HG--
extra : rebase_source : bcd0458573c2aa48908f1407ad3e7e72870c94aa
2017-02-24 15:35:35 -08:00
Eitan Isaacson 650a105b84 Bug 1337077 - Remove sync state transfer of SpeechSynthesis. r=smaug
MozReview-Commit-ID: LMjZOEjeg8Q

--HG--
extra : rebase_source : 62b456a917ccdf767a8242ad88652e84881d0d10
2017-02-23 10:18:21 -05:00
David Parks 8e150e4643 Bug 1284897 - Hook GetSaveFileNameW/GetOpenFileNameW to record and grant a sandboxed process permission to access user-chosen files. r=jimm
--HG--
extra : rebase_source : 024eae9f9657579debd38baba1526acfdca2385a
2017-02-08 11:38:40 -08:00
Kartikaya Gupta 8ec93b1895 Bug 1340067 - Follow-up to delist a formerly sync message that is now async. r=dvander?
MozReview-Commit-ID: CcKSgmSy2hA
2017-02-21 11:00:41 -05:00
Kan-Ru Chen 09858c1716 Bug 1336919 - Add a sync message whitelist and check it in IPDL compile phase. r=billm
MozReview-Commit-ID: ENFkBzpGo2j
2017-02-20 10:40:54 +08:00
Blake Kaplan 7f89fb24f2 Bug 1335989 - Avoid a second copy when sending substrings through IPC. r=billm
MozReview-Commit-ID: HF27bYPH7Uq

--HG--
extra : rebase_source : 3b919d462068d76862e38401be1db9add1aebd05
2017-02-15 16:26:04 -08:00
Carsten "Tomcat" Book b218b4c6ae merge mozilla-inbound to mozilla-central a=merge 2017-02-16 13:15:55 +01:00
Wes Kocher 3797956aa6 Merge m-c to inbound a=merge
MozReview-Commit-ID: BemR756HJnR
2017-02-15 16:33:03 -08:00
Bill McCloskey ce7bbe01fe Bug 1339224 - Give names to built-in IPC messages (r=kanru)
MozReview-Commit-ID: DEC2gXK6o0M
2017-02-15 12:30:01 -08:00
Andrew McCreight 90506fcef4 Bug 1338594 - Add more basic IPDL tests. r=kanru
MozReview-Commit-ID: 2hS9GoTSyb8

--HG--
extra : rebase_source : f3dc85bfa524e7f8316446f9162b2481cba472c9
2017-02-09 08:49:33 -08:00
Andrew McCreight 0a919fc483 Bug 1338728 - Don't check for delete in CheckTypes. r=kanru
GatherDecls also checks for it.

MozReview-Commit-ID: AmCdcUE1EMu

--HG--
extra : rebase_source : 1d27f3e35369a90ac37ab4cbca3f393187a25107
2017-02-10 16:39:55 -08:00
Andrew McCreight e8691e4e82 Bug 1338915 - Print a more specific message for invalid compression. r=kanru
MozReview-Commit-ID: IeSOZNBDkSR

--HG--
extra : rebase_source : 968129bfcdf5d2316537da50514b16b942604648
2017-02-14 08:54:27 -08:00
Andrew McCreight a03c79af0a Bug 1339477 - Add more IPDL unit tests. r=kanru
--HG--
extra : rebase_source : 3e06de7f11cd51633e58639951254dbfe0cf0fe8
2017-02-14 08:34:04 -08:00
Andrew McCreight 854e3bed0e Bug 1328421 - Replace MessageId with ID in the IPDL parser. r=billm
MozReview-Commit-ID: YHfxmB1McY

--HG--
extra : rebase_source : e3d96ab8d56e47535268a71457ec4aa25ef98658
2017-02-14 09:53:25 -08:00
Andrew McCreight a090af81d1 Bug 1338592 - Use .nested, not .nestedRange on Protocol. r=billm
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
2017-02-10 09:12:42 -08:00
Bevis Tseng ee3c2357de Bug 1338455 - SetManager in prior to Register to Inherit EventTarget from Manager. r=billm
MozReview-Commit-ID: DkbhLm4g939
2017-02-10 15:42:45 +08:00
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
Bill McCloskey a99edd3404 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 11:32:28 -08:00
Bill McCloskey 4b9d7f03a5 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 11:32:27 -08:00
Bill McCloskey ad7ac34ca4 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 11:32:27 -08:00
Bill McCloskey 1f23e3694d 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 11:32:26 -08:00
Bill McCloskey 5dee271cac 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 11:32:25 -08:00
Bill McCloskey 2dc5f495db 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 11:32:24 -08:00
Bill McCloskey 1a00da8679 Bug 792652 - Get rid of CloneProtocol (r=dvander)
CloneProtocol is leftover code from Nuwa. We can remove it now.
2016-11-08 11:32:23 -08:00
Bill McCloskey a054d4a461 Bug 1312960 - Remove FlushPendingInterruptQueue (r=dvander) 2016-10-30 22:04:02 -07:00
Kan-Ru Chen 1f16719ab5 Bug 1309799 - Change IPC profiler label format to share strings. r=billm
MozReview-Commit-ID: FZtb8qLpKYI

--HG--
extra : rebase_source : 4b347cd1da9b7a30b980ce33b9af7ac36146071b
2016-10-20 14:06:14 +08:00
Kan-Ru Chen 4364802eff Bug 1309799 - Generate StringFromIPCMessageType and use it in MessageChannel::MaybeHandleError. r=billm
MozReview-Commit-ID: HSuAAM0JdjS

--HG--
extra : rebase_source : 0181275a9631f343aedd5a683911d7909fcb5866
2016-10-13 14:18:45 +08:00
Bill McCloskey 1f13f73c7f Bug 1306708 - Add prio() for message priority to IPDL (r=dvander) 2016-10-04 20:34:55 -07:00
Bill McCloskey f478d1188c Bug 1306708 - Rename prio to nested in IPDL (r=dvander) 2016-10-04 20:34:54 -07:00
Bill McCloskey b83db28a45 Revert "Bug 1306708 - Rename prio to nested in IPDL (r=dvander)" on a CLOSED TREE
This reverts commit b1460c626078afbb9290e7d9ecaf3af605d5e893.
2016-10-04 15:55:19 -07:00
Bill McCloskey f2da85c062 Revert "Bug 1306708 - Add prio() for message priority to IPDL (r=dvander)"
This reverts commit 952e64ef2fb51f3e945d92b4ea27be271261e40d.
2016-10-04 15:55:09 -07:00
Bill McCloskey 3f54eaa3bc Bug 1306708 - Add prio() for message priority to IPDL (r=dvander) 2016-10-04 15:28:26 -07:00
Bill McCloskey eddd80027c Bug 1306708 - Rename prio to nested in IPDL (r=dvander) 2016-10-04 15:28:14 -07:00
Nathan Froyd 32b4accd77 Bug 1307500 - enhance string sharing between ipdl-generated MOZ_DIAGNOSTIC_ASSERT messages; r=billm
For every protocol's RemoveManagee method, and every sub-protocol that
protocol manages, we generate:

  MOZ_DIAGNOSTIC_ASSERT(mManagedPSubProtcolChild.Contains(actor), "...");

which dumps strings into the binary like:

(mManagedPAsmJSCacheEntryChild).Contains(actor) (actor not managed by this!)
MOZ_RELEASE_ASSERT((mManagedPAsmJSCacheEntryChild).Contains(actor)) (actor not managed by this!)

The linker is capable of merging multiple strings together, but
including the sub-protocol in every assert expression effectively
defeats this linker optimization, resulting in ~40KB of unnecessary
strings.

We can improve this situation by taking a reference to the managee
container, and using that reference in the assertion expression.  All
the assertion expressions are identical, and the linker can perform the
expected string merging, for a savings of ~40KB.
2016-10-04 23:42:55 -04:00
Matt Woodrow a8c2c8fb5b Bug 1297826 - Make FatalError virtual on IPDL generated classes, and propagate calls up to top-level protocols. r=billm 2016-10-04 21:31:25 +13:00
Aaron Klotz 98faee3572 Bug 1304876: Fix 64-bit build failure in IPC TestDataStructures test; r=billm
MozReview-Commit-ID: G0b0mvV8gus
2016-09-19 13:15:39 -06:00
Nicholas Nethercote d6cfd7634f Bug 1302309 - Cast some MaybeDestroy() calls to void. r=billm.
Most calls to MaybeDestroy() have their return value checked, but those that
take a T__None argument legitimately don't. Coverity gets upset by this, so
let's cast those calls to void to make Coverity happier.

--HG--
extra : rebase_source : 798c852371a682372c61cae953cc13c160b9ff9a
2016-09-13 13:48:42 +10:00
Bill McCloskey bb0a94054a Bug 1303499 - Fix broken IPDL tests (r=me, NPOTB) 2016-09-16 20:35:11 -07:00
Nathan Froyd 499fc0976b Bug 1297804 - part 4 - avoid array bounds checks in DestroySubtree loops; r=billm
The IPDL compiler generates code like this in DestroySubtree methods:

    // Recursively shutting down PAPZ kids
    nsTArray<PAPZChild*> kids((mManagedPAPZChild).Count());
    // Accumulate kids into a stable structure to iterate over
    ManagedPAPZChild(kids);
    for (uint32_t i = 0; (i) < ((kids).Length()); (++(i))) {
        // Guarding against a child removing a sibling from the list during the iteration.
        if ((mManagedPAPZChild).Contains(kids[i])) {
            (kids[i])->DestroySubtree(subtreewhy);
        }
    }

There are three problems with this code:

1) We initialize |kids| with a capacity, which is wasted work;
   ManagedPAPZChild() is going to resize the array for us anyway.
2) We're constantly reading from |kids.Length()| in the loop, when we
   only really need to read from it once.
3) We're repeatedly accessing kids[i], and doing needless bounds checks.

Let's fix those three problems.
2016-09-02 16:14:28 -04:00
Nathan Froyd 4de7ea1914 Bug 1297804 - part 2 - eschew array bounds checking in nsTArray IPDL-generated code, writer-side; r=billm
For better or worse, the IPDL compiler, for protocols that send or
receive arrays, generates Write methods for transferring those arrays,
rather than going through the standard ParamTraits specializations.
These generated methods perform unnecessary bounds checks when accessing
elements; such checks can be safely bypassed because we know the exact
length of all the arrays involved.  (Some compilers are not smart enough
to eliminate the bounds checks on their own.)
2016-09-02 16:14:28 -04:00
Nathan Froyd b086521c81 Bug 1297804 - part 1 - eschew array bounds checking in nsTArray IPDL-generated code, reader-side; r=billm
For better or worse, the IPDL compiler, for protocols that send or
receive arrays, generates Read methods for transferring those arrays,
rather than going through the standard ParamTraits specializations.
These generated methods perform unnecessary bounds checks when accessing
elements; such checks can be safely bypassed because we know the exact
length of all the arrays involved.  (Some compilers are not smart enough
to eliminate the bounds checks on their own.)
2016-09-02 16:14:28 -04:00
Nathan Froyd 25c7ca2c50 Bug 1297804 - part 0 - add a RangedFor stament type to IPDL's code generator; r=billm
This addition makes many of the upcoming patches significantly easier to
write, and enables us to avoid unpleasantness trying to fiddle with
ipdl.py's notions of C++ types.  (For instance, there's no good way,
when you have a type in-hand, to say the moral equivalent of
std::add_pointer<T>::type.)
2016-09-02 16:14:28 -04:00
Nathan Froyd 29e8bfeb34 Bug 1299594 - part 2 - remove opened actor tracking from IToplevelProtocol; r=billm
The only thing we needed opened actor tracking for was the ability to
clone all the actors.  But now that we no longer have support for
cloning actors, we no longer need to track the actors that we've cloned,
which makes a number of things significantly simpler.
2016-09-02 16:13:50 -04:00
Nathan Froyd fff9bd3854 Bug 1299594 - part 1 - remove CloneManagees/CloneToplevel code from IPDL; r=billm
CloneOpenedToplevels, which is never called, is the only interesting
caller of CloneToplevel.  And CloneToplevel, in turn, is the only
interesting caller of CloneManagees.  Which means we can ditch all this
code for a decent amount of space savings, both in code and writable
static data (no more useless virtual function entries in vtables).
2016-09-02 16:13:50 -04:00
Nathan Froyd 286887898c Bug 1297801 - part 4 - use non-null-checked operator new in IPDL code; r=billm
The standard placement new function requires a null check, implicitly
generated by the compiler, on its returned value.  For places we know
don't deal with null pointers, such as all the generated methods of IPDL
code, we can use an overloaded operator new that doesn't require the
null check.
2016-08-29 20:41:22 -04:00
Nathan Froyd 72439d5587 Bug 1297801 - part 3 - make mozilla::ipc::Trigger 4 bytes instead of 8; r=billm
We construct Trigger structures for every IPDL send and recv to run
the (currently defunct) IPDL state machine for each protocol.  These
structures are 64 bits to hold an enum that could be represented in 1
bit and an IPDL message enum that can easily be represented in 31 bits.
Therefore, we can make the Trigger structure smaller by storing the
members as bitfields, rather than full-width integers.  (The message
enums are formed from a 16-bit protocol enum and a 16-bit
protocol-specific message enum; since the protocol enum goes in the
upper bits, we'd need 32768 protocols to overflow the bitfield we're
using in Trigger...a number that we're not going to hit anytime soon.)

This change saves ~15K of space on x86-64 Linux.
2016-08-29 20:41:22 -04:00
Nathan Froyd fda65898ab Bug 1297801 - part 2 - make IPDL Transition functions take an inout parameter for State; r=billm
The calls to IPDL Transition() functions consistently look like:

  Transition(VAR, ..., &VAR);

We can save space by only passing &VAR and deriving the state we're
coming from by loading VAR in Transition itself.  It's not great using
inout parameters here, but we call Transition enough times that this
change saves a reasonable amount of space: about 10K on x86-64 Linux.
The unsightliness of inout parameters here is lessened by the only
callers of Transition being generated code.
2016-08-29 20:41:22 -04:00
Nathan Froyd a8474a5f11 Bug 1297801 - part 1 - commonize the managee->array functions in IPDL generated code; r=billm
There's no reason to generate identical code for every kind of managed
protocol; we can have a single instance that operates on void* and cast
our way to victory.  This change saves ~60K of text on x86-64 Linux.
2016-08-29 20:41:22 -04:00
Kan-Ru Chen b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
David Anderson 7bdb79f9ac Generate template-friendly value readers for IPDL unions. (bug 1288259 part 1, r?=billm)
--HG--
extra : rebase_source : 7376052d8a50427ab64205246463917fbd0e0d61
2016-08-04 11:13:38 -07:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
David Anderson 6b2b817ec9 Add a callback for top-level actors to free themselves. (bug 1285364, r=billm)
--HG--
extra : rebase_source : 6954a2b34b521c886fba536cd7bedd5f30b94763
2016-07-13 11:21:58 -07:00
David Anderson e6a98dc91b Clean up Transport memory management in IPDL. (bug 1283744, r=billm) 2016-07-06 18:51:20 -07:00
Gabor Krizsanits 34e5765a00 Bug 1277614 - Guarding child iteration in DestroySubtree. r=wmccloskey 2016-06-22 13:21:48 +02:00
Cervantes Yu ce65905912 Bug 1268900 - Part 3: Test case for the IPDL keyword 'verify'. r=billm
MozReview-Commit-ID: KZeiDniAkoX
2016-06-22 17:52:07 +08:00
Cervantes Yu e4edd8f2c6 Bug 1268900 - Part 2: Code generation for the IPC message verifier. r=billm
MozReview-Commit-ID: 8mJ53UeuHWu
2016-06-22 17:51:49 +08:00
Cervantes Yu 1873f9d596 Bug 1268900 - Part 1: IPDL parser change for message verifier. r=billm
MozReview-Commit-ID: 4i9AiyP2AzN
2016-06-22 17:51:32 +08:00
Jonathan Watt b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Bill McCloskey 7dbc02ed0f Bug 1262671 - Use BufferList for Pickle (r=froydnj) 2016-05-27 09:57:41 -07:00
Bill McCloskey b7441af61a Bug 1262671 - IPC sentinel checking (r=froydnj) 2016-05-27 09:57:38 -07:00
Bill McCloskey 291c555f34 Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
Bill McCloskey f159cad060 Bug 1273312 - Add task.h to ipdl unit tests (r=khuey) 2016-05-27 09:57:36 -07:00
Nathan Froyd a5f42fc63a Bug 1262937 - part 8 - factor out array length deserialization errors; r=jld 2016-05-21 04:07:56 -04:00
Nathan Froyd 647562c2d2 Bug 1262937 - part 7 - factor out union type deserialization errors; r=jld 2016-05-21 04:07:56 -04:00
Nathan Froyd dfe775eb9f Bug 1262937 - part 6 - enable custom error message for ipdl.py's checkedRead; r=jld
To enable string sharing, we're going to have helpful functions that
take a small, distinguishable, sharable string and construct a more
complete error message out of that.  To do that easily with checkedRead,
we need to be able to pass custom parameters into the error function.
2016-05-21 04:07:56 -04:00
Nathan Froyd dcc74a62c9 Bug 1262937 - part 5 - factor out actor reading code to a common base class; r=jld
Actor reading from IPC message is codegen'd with a lot of repeated code.
We can improve that by moving the core actor reading code out of
subclasses into IProtocolmanager.  While we still need to codegen a bit
of code to cast the read actor to the proper type, the code overall is
smaller.  The lone downside is that if we do encounter an error reading
the actor id out of the message, the precision of our crash messages is
reduced somewhat: we no longer have the protocol name doing the reading,
nor do we get crash report annotations, since we can't tell whether
we're in the parent or child process.
2016-05-21 04:07:56 -04:00
Nathan Froyd 2b69fc29e3 Bug 1262937 - part 3 - move quoting out of checkedRead; r=jld
checkedRead is set up to single-quote whatever message is passed in.
This scheme works great for all existing messages, but it makes some
callsites a little surprising ("where's the matching quote?") and
doesn't work well with message changes to be made in future patches.
Let's move the quoting out to client code.
2016-05-21 04:07:56 -04:00
Nathan Froyd 99e5f4a2e6 Bug 1262937 - part 2 - don't include the message name when complaining about handler failure; r=jld
Similar to part 1, this change enables the strings passed to
ProtocolErrorBreakpoint to be collapsed into a single string, saving
~60K of read-only data (!).  This change does affect debuggability
slightly, but given that ProtocolErrorBreakpoint only tries to throw the
passed-in string to stderr, I don't think it's a huge deal.
2016-05-21 04:07:56 -04:00
Nathan Froyd 558d2f2756 Bug 1262937 - part 1 - don't include the protocol name in Clone error messages; r=jld
We have better ways of getting the protocol name at the point of the
error (e.g. backtraces).  Removing it means the error message can be
condensed to a single string by the compiler/linking, saving ~8k of
read-only data.
2016-05-21 04:07:56 -04:00
Bob Owen 2447fbb7fa Bug 1035125 Part 1: Back out changeset 1910714b56c6 and associated subsequent changes. r=bsmedberg
The original changeset that is being backed out had comment:
Bug 1023941 - Part 5: Loader hook to redirect the missing import.

The changes made in bug 1023941 were to work around the fact that with VS2013, msvcr120.dll imports kernel32!GetLogicalProcessorInformation, which is not available on Windows XP SP2.
In VS2015, the GetLogicalProcessorInformation requirement has moved into concrt140.dll (concurrency runtime), which we don't use.
So, now that our build infra is building with VS2015, we can remove the hooking and static runtime linking required to get the VS2013 fix to work.

In addition we need to do that to be able us to link the Chromium sandbox code into firefox.exe and get it to build and run with both VS2015 and VS2013.

MozReview-Commit-ID: 1tlXaYJ8dHH

--HG--
extra : rebase_source : 49b216e34fc5c77af96df1f67ee44c46d5368bfe
2016-05-15 16:23:56 +01:00
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Jed Davis 7e91f65f43 Bug 1191452 - Limit IPDL-generated Move()s to Recv methods. r=billm
Specifically, it's important not to try to use Move() in the
Alloc+SendConstructor convenience method, because that Move()s the same
value twice (as discovered in bug 1186706), and neither callee
requires rvalue references in that case anyway.

This also removes the previous feature of calling makeCxxArgs with
params=0 to omit the message's input parameters, because it's not being
used and doesn't appear to have ever been used; it could be restored
(e.g., as paramsems=None) if needed.
2016-05-11 09:37:00 +02:00