gecko-dev/dom/ipc
Ryan Hunt 67120bc4e1 Bug 1532725 - Make TabParent::Recv{MouseEvent, HandleTap, ..} a script boundary and hold a strong reference. r=bzbarsky
These message handlers are currently marked as MOZ_CAN_RUN_SCRIPT, but are called from
PBrowserChild::OnMessageReceived which is not marked to run script. For some reason this is not
currently an issue on tip.

I suspect it has something to do with unified builds as renaming files caused this issue to
happen. I haven't looked into it enough to say for certain.

This commit changes the message handlers to be script boundaries so that the analysis is
satisified. This seemed like an easier change than modifying IPDL to emit the script boundary
around PBrowserChild::OnMessageReceived.

Additionally, Nika pointed out that IPDL doesn't hold a strong reference when calling
message handlers. If the script enters a nested event loop, it may be possible for
the protocol to be freed before control returns to it. This commit adds strong
references to prevent this.

Differential Revision: https://phabricator.services.mozilla.com/D22450

--HG--
extra : rebase_source : 0d756e5a921be8154e5fb3715304a8588700e079
2019-03-06 16:54:58 -06:00
..
fuzztest Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
tests Bug 1531837 - Part 2: Add testcase with allFrames and includeChrome for JS Window Actors, r=nika 2019-03-07 15:13:44 +00:00
CPOWManagerGetter.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
CSPMessageUtils.cpp Bug 1518454: Part 1, backend changes, add CSP to loadURIOptions dictionary and pass CSP explicitly from frontend to docshell. r=bz 2019-02-21 16:00:32 +01:00
CSPMessageUtils.h Bug 1518454: Part 1, backend changes, add CSP to loadURIOptions dictionary and pass CSP explicitly from frontend to docshell. r=bz 2019-02-21 16:00:32 +01:00
CoalescedInputData.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
CoalescedMouseData.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
CoalescedMouseData.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
CoalescedWheelData.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
CoalescedWheelData.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ColorPickerParent.cpp Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug 2019-01-03 17:48:33 +01:00
ColorPickerParent.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ContentChild.cpp Bug 1532727 - replace OptionalURIParams with URIParams? in IPDL; r=froydnj 2019-03-06 14:05:50 +00:00
ContentChild.h Bug 1532727 - replace OptionalURIParams with URIParams? in IPDL; r=froydnj 2019-03-06 14:05:50 +00:00
ContentParent.cpp Bug 1532727 - replace OptionalURIParams with URIParams? in IPDL; r=froydnj 2019-03-06 14:05:50 +00:00
ContentParent.h Bug 1532727 - replace OptionalURIParams with URIParams? in IPDL; r=froydnj 2019-03-06 14:05:50 +00:00
ContentProcess.cpp Bug 1485216 - remove Scheduler and related code from xpcom/threads; r=mccr8 2019-01-22 20:16:56 -05:00
ContentProcess.h Bug 1400344: Rename mscom::MainThreadRuntime to mscom::ProcessRuntime and make it aware of Win32k lockdown and of multiple instantiations; r=Jamie 2019-02-14 18:56:20 +00:00
ContentProcessManager.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
ContentProcessManager.h Bug 1522579 - Part 1: Remove PContentBridge, r=mccr8 2019-02-25 20:04:45 +00:00
DOMTypes.ipdlh Bug 1518454: Part 1, backend changes, add CSP to loadURIOptions dictionary and pass CSP explicitly from frontend to docshell. r=bz 2019-02-21 16:00:32 +01:00
DocShellMessageUtils.cpp Bug 1516555 - Reformat everything to the Google coding style r=Ehsan 2018-12-28 15:48:06 +00:00
DocShellMessageUtils.h Bug 1516555 - Reformat everything to the Google coding style r=Ehsan 2018-12-28 15:48:06 +00:00
FilePickerParent.cpp Bug 1522579 - Part 2: Remove consumers of nsIContentParent, r=mccr8 2019-02-25 20:04:47 +00:00
FilePickerParent.h Bug 1512990 - Part 4 - remove declarations of Recv/Answer methods from IPDL protocol base class; r=froydnj 2019-02-06 15:58:43 +00:00
IdType.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
JSWindowActorChild.cpp Bug 1527625 - Fill required arguments for ReceiveMessageArgument, r=nika 2019-03-05 17:12:40 +00:00
JSWindowActorChild.h Bug 1527625 - Fill required arguments for ReceiveMessageArgument, r=nika 2019-03-05 17:12:40 +00:00
JSWindowActorParent.cpp Bug 1527625 - Fill required arguments for ReceiveMessageArgument, r=nika 2019-03-05 17:12:40 +00:00
JSWindowActorParent.h Bug 1527625 - Fill required arguments for ReceiveMessageArgument, r=nika 2019-03-05 17:12:40 +00:00
JSWindowActorService.cpp Bug 1533401 - Use native maybe support IPDL in JSWindowActorEventDecl instead of two booleans, r=nika 2019-03-07 15:11:32 +00:00
JSWindowActorService.h Bug 1527625 - Fill required arguments for ReceiveMessageArgument, r=nika 2019-03-05 17:12:40 +00:00
MMPrinter.cpp Bug 1512690 - Add a mechanism to omit logging specified Message Manager topics r=tjr 2018-12-11 13:28:26 -06:00
MMPrinter.h Bug 1512690 - Introduce a MesageManager log topic for MM topics and data r=tjr 2018-12-11 11:31:24 -06:00
ManifestMessagesChild.jsm Bug 1514594: Part 3 - Change ChromeUtils.import API. 2019-01-17 10:18:31 -08:00
MemMapSnapshot.cpp Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
MemMapSnapshot.h Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre 2019-01-18 10:16:18 +01:00
MemoryReportRequest.cpp Bug 1531476 - replace MaybeFileDesc with FileDescriptor? in IPDL; r=mccr8 2019-02-28 21:20:40 +00:00
MemoryReportRequest.h Bug 1531476 - replace MaybeFileDesc with FileDescriptor? in IPDL; r=mccr8 2019-02-28 21:20:40 +00:00
MemoryReportTypes.ipdlh Bug 1531476 - replace MaybeFileDesc with FileDescriptor? in IPDL; r=mccr8 2019-02-28 21:20:40 +00:00
PBrowser.ipdl Bug 1532727 - replace OptionalURIParams with URIParams? in IPDL; r=froydnj 2019-03-06 14:05:50 +00:00
PBrowserOrId.ipdlh
PColorPicker.ipdl
PContent.ipdl Bug 1533401 - Use native maybe support IPDL in JSWindowActorEventDecl instead of two booleans, r=nika 2019-03-07 15:11:32 +00:00
PContentPermission.ipdlh Bug 1502747 - Remove nsIContentPermissionType.access and all of its supporting code r=snorp,baku 2018-10-30 07:48:55 +00:00
PContentPermissionRequest.ipdl
PCycleCollectWithLogs.ipdl
PFilePicker.ipdl Bug 1514364 - Add appendRawFilter to nsIFilePicker to expose actual accept filters to GV for onFilePrompt. r=snorp, smaug 2019-01-24 10:21:05 -06:00
PLoginReputation.ipdl
PPluginWidget.ipdl
PProcessHangMonitor.ipdl
PRemoteFrame.ipdl Bug 1524980 - Use RemoteFrameChild if present in nsFocusManager::Focus(). r=nika 2019-03-05 19:33:52 +00:00
PTabContext.ipdlh
PURLClassifier.ipdl
PURLClassifierInfo.ipdlh
PURLClassifierLocal.ipdl Bug 1514202 - Port flash url-classifier to nsIUrlClassifierFeature - part 1 - Flash feature, r=dimi, r=edgar, r=valentin 2019-01-04 14:45:42 +01:00
PWindowGlobal.ipdl Bug 1513877 - Implement send and receive methods for base WindowActor class. r=nika 2019-02-08 13:02:08 +00:00
PermissionMessageUtils.cpp Bug 1507991 - Part 3: Serialize nsIPrincipal using PrincipalInfo, r=baku 2019-02-28 16:50:31 +00:00
PermissionMessageUtils.h Bug 1507991 - Part 3: Serialize nsIPrincipal using PrincipalInfo, r=baku 2019-02-28 16:50:31 +00:00
PreallocatedProcessManager.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
PreallocatedProcessManager.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
PrefsTypes.ipdlh Bug 1513057 - P1: Start the new socket process basics (prefs, full xpcom init, logging, no sandboxing) r=mayhemer,dragana 2019-01-11 18:57:23 +00:00
ProcessHangMonitor.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
ProcessHangMonitor.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ProcessHangMonitorIPC.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
ProcessPriorityManager.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
ProcessPriorityManager.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
RemoteFrameChild.cpp Bug 1524980 - Use RemoteFrameChild if present in nsFocusManager::Focus(). r=nika 2019-03-05 19:33:52 +00:00
RemoteFrameChild.h Bug 1524980 - Use RemoteFrameChild if present in nsFocusManager::Focus(). r=nika 2019-03-05 19:33:52 +00:00
RemoteFrameParent.cpp Bug 1524980 - Use RemoteFrameChild if present in nsFocusManager::Focus(). r=nika 2019-03-05 19:33:52 +00:00
RemoteFrameParent.h Bug 1524980 - Use RemoteFrameChild if present in nsFocusManager::Focus(). r=nika 2019-03-05 19:33:52 +00:00
ServiceWorkerConfiguration.ipdlh
SharedMap.cpp Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika 2019-02-25 16:05:29 -06:00
SharedMap.h Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
SharedMapChangeEvent.h Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
SharedStringMap.cpp Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
SharedStringMap.h Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
StringTable.h Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
StructuredCloneData.cpp Bug 1522579 - Part 3: Remove consumers of nsIContentChild, r=mccr8 2019-02-25 20:04:49 +00:00
StructuredCloneData.h Bug 1522579 - Part 3: Remove consumers of nsIContentChild, r=mccr8 2019-02-25 20:04:49 +00:00
TabChild.cpp Bug 1532725 - Make TabParent::Recv{MouseEvent, HandleTap, ..} a script boundary and hold a strong reference. r=bzbarsky 2019-03-06 16:54:58 -06:00
TabChild.h Bug 1532725 - Make TabParent::Recv{MouseEvent, HandleTap, ..} a script boundary and hold a strong reference. r=bzbarsky 2019-03-06 16:54:58 -06:00
TabContext.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TabContext.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TabMessageUtils.cpp Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TabMessageUtils.h Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format 2018-11-30 11:46:48 +01:00
TabParent.cpp Bug 1532727 - replace OptionalURIParams with URIParams? in IPDL; r=froydnj 2019-03-06 14:05:50 +00:00
TabParent.h Bug 1532727 - replace OptionalURIParams with URIParams? in IPDL; r=froydnj 2019-03-06 14:05:50 +00:00
URLClassifierChild.h Bug 1514202 - Port flash url-classifier to nsIUrlClassifierFeature - part 1 - Flash feature, r=dimi, r=edgar, r=valentin 2019-01-04 14:45:42 +01:00
URLClassifierParent.cpp Bug 1501458 - Remove unused tracking protection code from nsUrlClassifierDBService. r=baku 2019-01-17 21:24:43 +00:00
URLClassifierParent.h Bug 1501458 - Remove unused tracking protection code from nsUrlClassifierDBService. r=baku 2019-01-17 21:24:43 +00:00
WindowGlobalChild.cpp Bug 1527625 - Fill required arguments for ReceiveMessageArgument, r=nika 2019-03-05 17:12:40 +00:00
WindowGlobalChild.h Bug 1522637 - Part 1: Disable in tests for allowLinkedWebInFileUriProcess, r=bobowen 2019-02-15 19:49:02 +00:00
WindowGlobalParent.cpp Bug 1527625 - Fill required arguments for ReceiveMessageArgument, r=nika 2019-03-05 17:12:40 +00:00
WindowGlobalParent.h Bug 1516240 - Part 2: Allow serializing BrowsingContext over IPC, r=farre 2019-02-13 21:02:53 +00:00
jar.mn
moz.build Bug 1522579 - Part 6: Completely remove nsIContent{Parent,Child}, r=mccr8 2019-02-25 20:04:55 +00:00
nsIHangReport.idl
remote-test.js Bug 1508990 - Enable ESLint for dom/ipc/ (manual changes) r=Standard8,mrbkap 2018-12-13 00:45:24 +00:00
test.xul Bug 1524683 - Remove nsIFrameLoaderOwner from tests; r=nika 2019-02-15 22:20:49 +00:00