Merge autoland to mozilla-central. a=merge

This commit is contained in:
Csoregi Natalia 2019-02-26 23:49:43 +02:00
Родитель 26d3e5b30a 42eb2a2c50
Коммит 0858aaa5b8
226 изменённых файлов: 2134 добавлений и 1308 удалений

Просмотреть файл

@ -950,11 +950,7 @@ pref("app.productInfo.baseURL", "https://www.mozilla.org/firefox/features/");
pref("security.alternate_certificate_error_page", "certerror");
// Enable the new certificate error pages.
#ifdef EARLY_BETA_OR_EARLIER
pref("browser.security.newcerterrorpage.enabled", true);
#else
pref("browser.security.newcerterrorpage.enabled", false);
#endif
pref("browser.security.newcerterrorpage.mitm.enabled", true);
pref("security.certerrors.recordEventTelemetry", true);

Просмотреть файл

@ -21,6 +21,7 @@ add_task(async function() {
let dummyPage = getChromeDir(getResolvedURI(gTestPath));
dummyPage.append(DUMMY_FILE);
dummyPage.normalize();
const uriString = Services.io.newFileURI(dummyPage).spec;
let viewSourceBrowser = viewSourceTab.linkedBrowser;

Просмотреть файл

@ -20,7 +20,7 @@ add_task(async function test_contextmenu_openlink_after_tabnavigated() {
BrowserTestUtils.loadURI(gBrowser.selectedBrowser, "about:blank");
await BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser);
let awaitNewTabOpen = BrowserTestUtils.waitForNewTab(gBrowser, "http://example.com/");
let awaitNewTabOpen = BrowserTestUtils.waitForNewTab(gBrowser, "http://example.com/", true);
info("Click the 'open link in new tab' menu item");
let openLinkMenuItem = contextMenu.querySelector("#context-openlinkintab");
@ -32,11 +32,8 @@ add_task(async function test_contextmenu_openlink_after_tabnavigated() {
// Close the contextMenu popup if it has not been closed yet.
contextMenu.hidePopup();
await BrowserTestUtils.browserLoaded(newTab.linkedBrowser);
const newTabURL = await ContentTask.spawn(newTab.linkedBrowser, null, async function() {
return content.location.href;
});
is(newTabURL, "http://example.com/", "Got the expected URL loaded in the new tab");
is(newTab.linkedBrowser.currentURI.spec, "http://example.com/",
"Got the expected URL loaded in the new tab");
BrowserTestUtils.removeTab(newTab);
BrowserTestUtils.removeTab(tab);

Просмотреть файл

@ -1419,9 +1419,26 @@ BrowserGlue.prototype = {
let fpEnabled = Services.prefs.getBoolPref("privacy.trackingprotection.fingerprinting.enabled");
let cmEnabled = Services.prefs.getBoolPref("privacy.trackingprotection.cryptomining.enabled");
let categoryPref;
switch (Services.prefs.getStringPref("browser.contentblocking.category", null)) {
case "standard":
categoryPref = 0;
break;
case "strict":
categoryPref = 1;
break;
case "custom":
categoryPref = 2;
break;
default:
// Any other value is unsupported.
categoryPref = 3;
break;
}
Services.telemetry.scalarSet("contentblocking.fingerprinting_blocking_enabled", fpEnabled);
Services.telemetry.scalarSet("contentblocking.cryptomining_blocking_enabled", cmEnabled);
Services.telemetry.scalarSet("contentblocking.category", categoryPref);
},
_sendMediaTelemetry() {

Просмотреть файл

@ -1335,8 +1335,9 @@ var PanelView = class extends AssociatedToNode {
if (element.closest("[hidden]")) {
continue;
}
// Take the label for toolbarbuttons; it only exists on those elements.
element = element.labelElement || element;
element = element.multilineLabel || element;
let bounds = element.getBoundingClientRect();
let previous = gMultiLineElementsMap.get(element);

Просмотреть файл

@ -92,9 +92,8 @@ class UrlbarController {
*/
async startQuery(queryContext) {
// Cancel any running query.
if (this._lastQueryContext) {
this.cancelQuery(this._lastQueryContext);
}
this.cancelQuery();
this._lastQueryContext = queryContext;
queryContext.lastResultCount = 0;
@ -174,11 +173,14 @@ class UrlbarController {
}
/**
* When switching tabs, clear some internal caches to handle cases like
* backspace, autofill or repeated searches.
* When the containing context changes (for example when switching tabs),
* clear any caches that connects consecutive searches in the same context.
* For example it can be used to clear information used to improve autofill
* or save resourced on repeated searches.
*/
tabContextChanged() {
// TODO: implementation needed (bug 1496685)
viewContextChanged() {
this.cancelQuery();
this._notify("onViewContextChanged");
}
/**

Просмотреть файл

@ -1107,7 +1107,7 @@ class UrlbarInput {
}
_on_TabSelect(event) {
this.controller.tabContextChanged();
this.controller.viewContextChanged();
}
_on_keydown(event) {

Просмотреть файл

@ -272,6 +272,16 @@ class UrlbarView {
}
}
/**
* Notified when the view context changes, for example when switching tabs.
* It can be used to reset internal state tracking.
*/
onViewContextChanged() {
// Clear rows, so that when reusing results we don't visually leak them
// across different contexts.
this._rows.textContent = "";
}
/**
* Passes DOM events for the view to the _on_<event type> methods.
* @param {Event} event

Просмотреть файл

@ -259,9 +259,9 @@ View (e.g. showing/hiding a panel). It is also responsible for reporting Telemet
// Used by the View to listen for results.
addQueryListener(listener);
removeQueryListener(listener);
// Used to indicate the View context changed, as such any cached information
// should be reset.
tabContextChanged();
// Used to indicate the View context changed, so that cached information
// about the latest search is no more relevant and can be dropped.
viewContextChanged();
}
@ -347,8 +347,12 @@ Represents the base *View* implementation, communicates with the *Controller*.
onQueryCancelled(queryContext);
// Invoked when the query is done.
onQueryFinished(queryContext);
// Invoked when the view context changed, so that cached information about
// the latest search is no more relevant and can be dropped.
onViewContextChanged();
}
UrlbarResult
===========
@ -399,6 +403,7 @@ The following RESULT_TYPEs are supported:
// Payload: { icon, url, device, title }
REMOTE_TAB: 6,
Shared Modules
==============

20
config/external/nspr/pr/moz.build поставляемый
Просмотреть файл

@ -110,6 +110,12 @@ LOCAL_INCLUDES += [
]
SOURCES += [
'/nsprpub/pr/src/io/prpolevt.c', # conflicting definition of PRFilePrivate
'/nsprpub/pr/src/misc/praton.c', # duplicate definition of index_hex
'/nsprpub/pr/src/misc/prcountr.c', # duplicate definition of QName, RName
]
UNIFIED_SOURCES += [
'/nsprpub/pr/src/io/prfdcach.c',
'/nsprpub/pr/src/io/priometh.c',
'/nsprpub/pr/src/io/pripv6.c',
@ -118,7 +124,6 @@ SOURCES += [
'/nsprpub/pr/src/io/prmapopt.c',
'/nsprpub/pr/src/io/prmmap.c',
'/nsprpub/pr/src/io/prmwait.c',
'/nsprpub/pr/src/io/prpolevt.c',
'/nsprpub/pr/src/io/prprf.c',
'/nsprpub/pr/src/io/prscanf.c',
'/nsprpub/pr/src/io/prstdio.c',
@ -131,8 +136,6 @@ SOURCES += [
'/nsprpub/pr/src/memory/prshma.c',
'/nsprpub/pr/src/misc/pralarm.c',
'/nsprpub/pr/src/misc/pratom.c',
'/nsprpub/pr/src/misc/praton.c',
'/nsprpub/pr/src/misc/prcountr.c',
'/nsprpub/pr/src/misc/prdtoa.c',
'/nsprpub/pr/src/misc/prenv.c',
'/nsprpub/pr/src/misc/prerr.c',
@ -158,7 +161,7 @@ SOURCES += [
if CONFIG['OS_TARGET'] != 'WINNT':
DEFINES['_PR_PTHREADS'] = True
SOURCES += [
UNIFIED_SOURCES += [
'/nsprpub/pr/src/md/unix/unix.c',
'/nsprpub/pr/src/md/unix/unix_errors.c',
'/nsprpub/pr/src/md/unix/uxproces.c',
@ -172,17 +175,22 @@ if CONFIG['OS_TARGET'] != 'WINNT':
]
else:
SOURCES += [
# ntinrval.c needs windows.h without WIN32_LEAN_AND_MEAN, so it can't be
# unified after any file that pulled in windows.h in lean-and-mean mode.
'/nsprpub/pr/src/md/windows/ntinrval.c',
# w32poll.c needs a custom value of FD_SETSIZE for winsock.h.
'/nsprpub/pr/src/md/windows/w32poll.c',
]
UNIFIED_SOURCES += [
'/nsprpub/pr/src/io/prdir.c',
'/nsprpub/pr/src/io/prfile.c',
'/nsprpub/pr/src/io/prio.c',
'/nsprpub/pr/src/io/prsocket.c',
'/nsprpub/pr/src/md/windows/ntgc.c',
'/nsprpub/pr/src/md/windows/ntinrval.c',
'/nsprpub/pr/src/md/windows/ntmisc.c',
'/nsprpub/pr/src/md/windows/ntsec.c',
'/nsprpub/pr/src/md/windows/ntsem.c',
'/nsprpub/pr/src/md/windows/w32ipcsem.c',
'/nsprpub/pr/src/md/windows/w32poll.c',
'/nsprpub/pr/src/md/windows/w32rng.c',
'/nsprpub/pr/src/md/windows/w32shm.c',
'/nsprpub/pr/src/md/windows/w95cv.c',

Просмотреть файл

@ -50,7 +50,7 @@ class RuntimePage extends PureComponent {
showProfilerDialog: PropTypes.bool.isRequired,
tabs: PropTypes.arrayOf(PropTypes.object).isRequired,
temporaryExtensions: PropTypes.arrayOf(PropTypes.object).isRequired,
temporaryInstallError: PropTypes.string,
temporaryInstallError: PropTypes.object,
};
}
@ -109,6 +109,23 @@ class RuntimePage extends PureComponent {
return null;
}
let errorMessages = [temporaryInstallError.message];
// Additional error messages can be found in additionalErrors.
if (Array.isArray(temporaryInstallError.additionalErrors)) {
errorMessages = errorMessages.concat(temporaryInstallError.additionalErrors);
}
const errors = errorMessages.map((message, index) => {
return dom.div(
{
className: "technical-text",
key: "tmp-extension-install-error-" + index,
},
message
);
});
return Message(
{
level: MESSAGE_LEVEL.ERROR,
@ -121,12 +138,7 @@ class RuntimePage extends PureComponent {
},
dom.span({}, "There was an error during the temporary add-on installation")
),
dom.div(
{
className: "technical-text",
},
temporaryInstallError
)
errors
)
);
}

Просмотреть файл

@ -80,7 +80,7 @@ function uiReducer(state = UiState(), action) {
case TEMPORARY_EXTENSION_INSTALL_FAILURE: {
const { error } = action;
return Object.assign({}, state, { temporaryInstallError: error.message });
return Object.assign({}, state, { temporaryInstallError: error });
}
default:

Просмотреть файл

@ -15,7 +15,7 @@ support-files =
helper-serviceworker.js
helper-telemetry.js
mocks/*
resources/bad-extension/*
resources/bad-extensions/*
resources/packaged-extension/*
resources/service-workers/*
resources/test-adb-extension/*

Просмотреть файл

@ -11,22 +11,19 @@ Services.scriptloader.loadSubScript(CHROME_URL_ROOT + "helper-addons.js", this);
* extensions.
*/
const BAD_EXTENSION_PATH = "resources/bad-extension/manifest.json";
const INVALID_JSON_EXTENSION_PATH = "resources/bad-extensions/invalid-json/manifest.json";
const INVALID_PROP_EXTENSION_PATH =
"resources/bad-extensions/invalid-property/manifest.json";
const EXTENSION_PATH = "resources/test-temporary-extension/manifest.json";
const EXTENSION_NAME = "test-temporary-extension";
add_task(async function() {
// Extension with an invalid JSON manifest will not be parsed. We check the expected
// error message is displayed
add_task(async function testInvalidJsonExtension() {
const { document, tab, window } = await openAboutDebugging();
await selectThisFirefoxPage(document, window.AboutDebugging.store);
info("Install a bad extension");
// Do not use installTemporaryAddon here since the install will fail.
prepareMockFilePicker(BAD_EXTENSION_PATH);
document.querySelector(".js-temporary-extension-install-button").click();
info("Wait until the install error message appears");
await waitUntil(() => document.querySelector(".js-message"));
const installError = document.querySelector(".js-message");
const installError = await installBadExtension(INVALID_JSON_EXTENSION_PATH, document);
ok(installError.textContent.includes("JSON.parse: unexpected keyword"),
"The expected installation error is displayed: " + installError.textContent);
@ -43,3 +40,31 @@ add_task(async function() {
await removeTab(tab);
});
// Extension with a valid JSON manifest but containing an invalid property should display
// a detailed error message coming from the Addon Manager.
add_task(async function testInvalidPropertyExtension() {
const { document, tab, window } = await openAboutDebugging();
await selectThisFirefoxPage(document, window.AboutDebugging.store);
const installError = await installBadExtension(INVALID_PROP_EXTENSION_PATH, document);
ok(installError.textContent.includes("Extension is invalid"),
"The basic installation error is displayed: " + installError.textContent);
ok(installError.textContent.includes(
"Reading manifest: Error processing content_scripts.0.matches"),
"The detailed installation error is also displayed: " + installError.textContent);
await removeTab(tab);
});
async function installBadExtension(path, document) {
info("Install a bad extension at path: " + path);
// Do not use installTemporaryAddon here since the install will fail.
prepareMockFilePicker(path);
document.querySelector(".js-temporary-extension-install-button").click();
info("Wait until the install error message appears");
await waitUntil(() => document.querySelector(".js-message"));
return document.querySelector(".js-message");
}

Просмотреть файл

@ -0,0 +1,26 @@
{
"manifest_version": 2,
"name": "test-invalid-extension",
"version": "1",
"description": "the name says it all",
"permissions": [
"*://*.foo.com/*",
"alarms",
"notifications",
"tabs"
],
"background": {
"scripts": ["background.js"]
},
"content_scripts": [{
"matches": "*://*.foo.com/*",
"js": ["content.js"]
}],
"browser_action": {
"default_icon": {
"32": "home.svg"
},
"default_title": "foobarbaz (v1)",
"browser_style": true
}
}

Просмотреть файл

@ -207,6 +207,12 @@ button {
fill: #0c0c0d;
}
.addons-install-error__additional-errors {
font-family: monospace;
font-size: 13px;
margin-block: 8px;
}
.addons-options {
flex: 1;
}

Просмотреть файл

@ -67,7 +67,7 @@ class AddonsControls extends Component {
})
.catch(e => {
console.error(e);
this.setState({ installError: e.message, lastInstallErrorFile: file });
this.setState({ installError: e, lastInstallErrorFile: file });
});
}

Просмотреть файл

@ -17,22 +17,31 @@ const Strings = Services.strings.createBundle(
class AddonsInstallError extends Component {
static get propTypes() {
return {
error: PropTypes.string,
error: PropTypes.object,
retryInstall: PropTypes.func,
};
}
render() {
const { error } = this.props;
if (!this.props.error) {
return null;
}
const text = Strings.formatStringFromName("addonInstallError", [this.props.error], 1);
const text = Strings.formatStringFromName("addonInstallError", [error.message], 1);
const additionalErrors = Array.isArray(error.additionalErrors) ?
dom.div(
{ className: "addons-install-error__additional-errors" },
error.additionalErrors.join(" ")
) : null;
return dom.div(
{ className: "addons-install-error" },
dom.span(
{},
dom.div({ className: "warning" }),
dom.span({}, text),
additionalErrors
),
dom.button(
{ className: "addons-install-retry", onClick: this.props.retryInstall },

Просмотреть файл

@ -97,7 +97,7 @@ Menu.prototype.popup = function(screenX, screenY, toolbox) {
popup = doc.createXULElement("menupopup");
popup.setAttribute("menu-api", "true");
popup.setAttribute("consumeoutsideclicks", "true");
popup.setAttribute("consumeoutsideclicks", "false");
if (this.id) {
popup.id = this.id;

Просмотреть файл

@ -208,6 +208,21 @@
color: var(--theme-selection-color);
}
.network-monitor .tracking-protection {
background-color: var(--toolbarbutton-background);
color: inherit;
margin-top: 2px;
margin-bottom: 2px;
}
.theme-dark .network-monitor .tracking-protection .tracking-resource {
filter: brightness(500%);
}
.theme-light .network-monitor .tracking-protection .tracking-resource {
filter: brightness(0);
}
.theme-dark .network-monitor .edit-and-resend-button {
background-color: var(--toolbarbutton-background);
color: var(--theme-selection-color);

Просмотреть файл

@ -384,7 +384,7 @@
width: 16px;
height: 16px;
margin: 0 3px 0 -3px;
vertical-align: text-bottom;
vertical-align: middle;
background-image: url(chrome://devtools/content/netmonitor/src/assets/icons/shield.svg);
background-repeat: no-repeat;
}

Просмотреть файл

@ -15,6 +15,7 @@ const { L10N } = require("../utils/l10n");
const {
getHeadersURL,
getHTTPStatusCodeURL,
getTrackingProtectionURL,
} = require("../utils/mdn-utils");
const {
fetchNetworkUpdatePacket,
@ -358,6 +359,7 @@ class HeadersPanel extends Component {
statusText,
urlDetails,
referrerPolicy,
isThirdPartyTrackingResource,
},
} = this.props;
const item = { fromCache, fromServiceWorker, status, statusText };
@ -416,6 +418,27 @@ class HeadersPanel extends Component {
);
}
let trackingProtectionStatus;
if (isThirdPartyTrackingResource) {
const trackingProtectionDocURL = getTrackingProtectionURL();
trackingProtectionStatus = (
div({ className: "tabpanel-summary-container tracking-protection" },
div({
className: "tracking-resource",
}),
L10N.getStr("netmonitor.trackingResource.tooltip"),
trackingProtectionDocURL ? MDNLink({
url: trackingProtectionDocURL,
title: SUMMARY_STATUS_LEARN_MORE,
}) : span({
className: "headers-summary learn-more-link",
}),
)
);
}
const summaryVersion = httpVersion ?
this.renderSummary(SUMMARY_VERSION, httpVersion) : null;
@ -437,6 +460,7 @@ class HeadersPanel extends Component {
div({ className: "panel-container" },
div({ className: "headers-overview" },
summaryUrl,
trackingProtectionStatus,
summaryMethod,
summaryAddress,
summaryStatus,

Просмотреть файл

@ -214,10 +214,20 @@ function getFilterBoxURL() {
`#Filtering_by_properties`;
}
/**
* Get the MDN URL for Tracking Protection
*
* @return {string} The MDN URL for the documentation of Tracking Protection.
*/
function getTrackingProtectionURL() {
return `${MDN_URL}Mozilla/Firefox/Privacy/Tracking_Protection${getGAParams()}`;
}
module.exports = {
getHeadersURL,
getHTTPStatusCodeURL,
getNetMonitorTimingsURL,
getPerformanceAnalysisURL,
getFilterBoxURL,
getTrackingProtectionURL,
};

Просмотреть файл

@ -4,9 +4,11 @@
/* CSS Variables specific to the Changes panel that aren't defined by the themes */
:root {
--changes-button-background-color: var(--grey-90-a10);
--changes-button-background-color-hover: var(--grey-90-a15);
--changes-button-background-color-active: var(--grey-90-a20);
--changes-button-copy-all-background-color--hover: var(--grey-90-a10);
--changes-button-copy-all-background-color--active: var(--grey-90-a15);
--changes-button-copy-rule-background-color: var(--grey-90-a10);
--changes-button-copy-rule-background-color--hover: var(--grey-90-a15);
--changes-button-copy-rule-background-color--active: var(--grey-90-a20);
--diff-add-background-color: #f1feec;
--diff-add-text-color: #54983f;
--diff-remove-background-color: #fbf2f5;
@ -22,7 +24,11 @@
}
:root.theme-dark {
--changes-button-background-color: #252526;
--changes-button-copy-all-background-color--hover: var(--grey-10-a10);
--changes-button-copy-all-background-color--active: var(--grey-10-a15);
--changes-button-copy-rule-background-color: var(--grey-10-a10);
--changes-button-copy-rule-background-color--hover: var(--grey-10-a15);
--changes-button-copy-rule-background-color--active: var(--grey-10-a20);
--diff-add-background-color: rgba(18, 188, 0, 0.15);
--diff-add-text-color: #12BC00;
--diff-remove-background-color: rgba(255, 0, 57, 0.15);
@ -84,34 +90,56 @@
.changes__copy-all-changes-button {
-moz-context-properties: fill;
background: url(chrome://devtools/skin/images/copy.svg) no-repeat;
background-position: 4px 3px;
background-size: 16px;
border: none;
border-radius: 3px;
color: var(--theme-body-color);
fill: currentColor;
height: 16px;
margin: 7px 10px;
padding-left: 21px;
margin: 2px 5px;
padding: 4px 5px 4px 25px;
}
.changes__copy-all-changes-button:hover {
background-color: var(--changes-button-copy-all-background-color--hover);
}
.changes__copy-all-changes-button:active {
background-color: var(--changes-button-copy-all-background-color--active);
}
/* Hide the Copy Rule button by default. */
.changes__copy-rule-button {
background-color: var(--changes-button-background-color);
border-radius: 5px;
/**
* The rgba() format of the background colors makes the button see-through and it looks
* bad when stacked on top of long selectors.
*
* To solve this and not change the color format which is inherited from the Photon
* color guide in `client/themes/variables.css`, we use a blending trick to overlay the
* rgba() color value onto a solid color used for the panel background (achieved with
* a linear gradient with no transition). This keeps the rgba() color, but prevents the
* see-through effect.
*/
background-blend-mode: overlay;
background-color: var(--changes-button-copy-rule-background-color);
background-image:
linear-gradient(var(--theme-sidebar-background), var(--theme-sidebar-background));
border-radius: 8px;
border: none;
color: var(--theme-body-color);
display: none;
padding: 1px 5px;
padding: 1px 7px;
position: absolute;
right: 5px;
top: 2px;
}
.changes__copy-rule-button:hover {
background-color: var(--changes-button-background-color-hover);
background-color: var(--changes-button-copy-rule-background-color--hover);
}
.changes__copy-rule-button:active {
background-color: var(--changes-button-background-color-active);
background-color: var(--changes-button-copy-rule-background-color--active);
}
.changes__rule {

Просмотреть файл

@ -243,6 +243,9 @@
--yellow-80: #715100;
--grey-10: #f9f9fa;
--grey-10-a10: rgba(249, 249, 250, 0.1);
--grey-10-a15: rgba(249, 249, 250, 0.15);
--grey-10-a20: rgba(249, 249, 250, 0.2);
--grey-20: #ededf0;
--grey-25: #e0e0e2;
--grey-30: #d7d7db;

Просмотреть файл

@ -73,7 +73,10 @@ class ConsoleOutput extends Component {
}
componentDidMount() {
scrollToBottom(this.outputNode);
if (this.props.visibleMessages.length > 0) {
scrollToBottom(this.outputNode);
}
const {
serviceContainer,
onFirstMeaningfulPaint,
@ -207,7 +210,9 @@ class ConsoleOutput extends Component {
}
function scrollToBottom(node) {
node.scrollTop = node.scrollHeight;
if (node.scrollHeight > node.clientHeight) {
node.scrollTop = node.scrollHeight;
}
}
function isScrolledToBottom(outputNode, scrollNode) {

Просмотреть файл

@ -451,6 +451,36 @@ bool MaybeCrossOriginObject<Base>::enumerate(JSContext* cx,
return js::GetPropertyKeys(cx, self, 0, &props);
}
template <typename Base>
bool MaybeCrossOriginObject<Base>::hasInstance(JSContext* cx,
JS::Handle<JSObject*> proxy,
JS::MutableHandle<JS::Value> v,
bool* bp) const {
if (!IsPlatformObjectSameOrigin(cx, proxy)) {
// In the cross-origin case we never have @@hasInstance, and we're never
// callable, so just go ahead and report an error. If we enter the realm of
// "proxy" to do that, our caller won't be able to do anything with the
// exception, so instead let's wrap "proxy" into our realm. We definitely
// do NOT want to call JS::InstanceofOperator here after entering "proxy's"
// realm, because that would do the wrong thing with @@hasInstance on the
// object by seeing any such definitions when we should not.
JS::Rooted<JS::Value> val(cx, JS::ObjectValue(*proxy));
if (!MaybeWrapValue(cx, &val)) {
return false;
}
return js::ReportIsNotFunction(cx, val);
}
// Safe to enter the realm of "proxy" and do the normal thing of looking up
// @@hasInstance, etc.
JSAutoRealm ar(cx, proxy);
JS::Rooted<JS::Value> val(cx, v);
if (!MaybeWrapValue(cx, &val)) {
return false;
}
return JS::InstanceofOperator(cx, proxy, val, bp);
}
// Force instantiations of the out-of-line template methods we need.
template class MaybeCrossOriginObject<js::Wrapper>;
template class MaybeCrossOriginObject<DOMProxyHandler>;

Просмотреть файл

@ -318,6 +318,14 @@ class MaybeCrossOriginObject : public Base,
bool enumerate(JSContext* cx, JS::Handle<JSObject*> proxy,
JS::AutoIdVector& props) const final;
/**
* Spidermonkey-internal hook used for instanceof. We need to override this
* because otherwise we can end up doing instanceof work in the wrong
* compartment.
*/
bool hasInstance(JSContext* cx, JS::Handle<JSObject*> proxy,
JS::MutableHandle<JS::Value> v, bool* bp) const final;
/**
* Spidermonkey-internal hook used by Object.prototype.toString. Subclasses
* need to implement this, because we don't know what className they want.

Просмотреть файл

@ -0,0 +1,28 @@
<script>
function start() {
o14=window.document;
o432=document.createElement('audio');
o433=document.createElement('track');
o432.appendChild(o433);
o493=o432.textTracks;
o14.write('<html></html>');
o757=document.createElement('iframe');
o757.addEventListener('load', fun0, false);
document.documentElement.appendChild(o757);
o432.controls^=1;
}
function fun0(e) {
o1062=e.target;
o1063=o1062.contentWindow;
o1064=o1063.document;
document.documentElement.appendChild(o432);
setTimeout(fun1,240);
}
function fun1() {
o433.parentNode.removeChild(o433);
document.replaceChild(o1064.documentElement,document.documentElement);
SpecialPowers.forceGC();
SpecialPowers.forceCC();
}
</script>
<body onload="start()"></body>

Просмотреть файл

@ -246,6 +246,7 @@ load 1505875.html
load 1508845.html
load 1516289.html
load 1516560.html
load 1528675.html
load structured_clone_container_throws.html
load xhr_empty_datauri.html
load xhr_html_nullresponse.html

Просмотреть файл

@ -9914,7 +9914,7 @@ class CGStaticMethodJitinfo(CGGeneric):
"static const JSJitInfo %s_methodinfo = {\n"
" { (JSJitGetterOp)%s },\n"
" { prototypes::id::_ID_Count }, { 0 }, JSJitInfo::StaticMethod,\n"
" JSJitInfo::AliasEverything, JSVAL_TYPE_MISSING, false, false,\n"
" JSJitInfo::AliasEverything, JSVAL_TYPE_OBJECT, false, false,\n"
" false, false, 0\n"
"};\n" %
(IDLToCIdentifier(method.identifier.name),

Просмотреть файл

@ -148,5 +148,6 @@ skip-if = toolkit == 'android'
[test_bug1112040.html]
[test_bug1160342_marquee.html]
[test_bug1171215.html]
[test_bug1530292.html]
[test_no_find_showDialog.html]
skip-if = toolkit == 'android' # Bug 1358633 - window.find doesn't work for Android

Просмотреть файл

@ -0,0 +1,47 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1530292
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1530292</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for Bug 1530292 **/
SimpleTest.waitForExplicitFinish();
addLoadEvent(() => {
// This is really a crashtest, but we need some cross-origin (and hence
// cross-compartment) windows to test it, so can't use the crashtest
// harness.
try {
({} instanceof frames[0]);
ok(false, "Should have thrown for same-process window");
} catch (e) {
is(e.message, "frames[0] is not a function");
}
try {
({} instanceof frames[1]);
ok(false, "Should have thrown for maybe other-process window");
} catch (e) {
is(e.message, "frames[1] is not a function");
}
SimpleTest.finish();
});
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1530292">Mozilla Bug 1530292</a>
<p id="display"></p>
<div id="content" style="display: none">
<!-- Cross-origin but same-site; must be same-process -->
<iframe src="//test1.mochi.test:8888/tests/dom/tests/mochitest/bugs/file_empty.html"></iframe>
<!-- Completely cross-origin; might be cross-process -->
<iframe src="//example.org/tests/dom/tests/mochitest/bugs/file_empty.html"></iframe>
</div>
<pre id="test">
</pre>
</body>
</html>

Просмотреть файл

@ -518,7 +518,7 @@ static inline Corner operator++(Corner& aCorner) {
}
// Indices into "half corner" arrays (nsStyleCorners e.g.)
enum HalfCorner {
enum HalfCorner : uint8_t {
// This order is important!
eCornerTopLeftX = 0,
eCornerTopLeftY = 1,

Просмотреть файл

@ -2345,18 +2345,14 @@ impl Device {
ibo_id: IBOId,
owns_vertices_and_indices: bool,
) -> VAO {
debug_assert!(self.inside_frame);
let instance_stride = descriptor.instance_stride() as usize;
let vao_id = self.gl.gen_vertex_arrays(1)[0];
self.gl.bind_vertex_array(vao_id);
self.bind_vao_impl(vao_id);
descriptor.bind(self.gl(), main_vbo_id, instance_vbo_id);
ibo_id.bind(self.gl()); // force it to be a part of VAO
self.gl.bind_vertex_array(0);
VAO {
id: vao_id,
ibo_id,
@ -2374,7 +2370,7 @@ impl Device {
debug_assert!(self.inside_frame);
let vao_id = self.gl.gen_vertex_arrays(1)[0];
self.gl.bind_vertex_array(vao_id);
self.bind_vao_impl(vao_id);
let mut attrib_index = 0;
for stream in streams {
@ -2388,8 +2384,6 @@ impl Device {
attrib_index += stream.attributes.len();
}
self.gl.bind_vertex_array(0);
CustomVAO {
id: vao_id,
}

Просмотреть файл

@ -4246,6 +4246,10 @@ impl Renderer {
}
fn draw_frame_debug_items(&mut self, items: &[DebugItem]) {
if items.is_empty() {
return;
}
let debug_renderer = match self.debug.get_mut(&mut self.device) {
Some(render) => render,
None => return,

Просмотреть файл

@ -138,6 +138,298 @@ DIRECT_CALL_OVERRIDES = {
("PWebSocket", "child"): ("WebSocketChannelChild", "mozilla/net/WebSocketChannelChild.h"),
("PWebSocket", "parent"): ("WebSocketChannelParent", "mozilla/net/WebSocketChannelParent.h"),
# _ipdltest
("PTestActorPunning", "child"): (
"TestActorPunningChild", "mozilla/_ipdltest/TestActorPunning.h"
),
("PTestActorPunning", "parent"): (
"TestActorPunningParent", "mozilla/_ipdltest/TestActorPunning.h"
),
("PTestActorPunningPunned", "child"): (
"TestActorPunningPunnedChild", "mozilla/_ipdltest/TestActorPunning.h"
),
("PTestActorPunningPunned", "parent"): (
"TestActorPunningPunnedParent", "mozilla/_ipdltest/TestActorPunning.h"
),
("PTestActorPunningSub", "child"): (
"TestActorPunningSubChild", "mozilla/_ipdltest/TestActorPunning.h"
),
("PTestActorPunningSub", "parent"): (
"TestActorPunningSubParent", "mozilla/_ipdltest/TestActorPunning.h"
),
("PTestAsyncReturns", "child"): (
"TestAsyncReturnsChild", "mozilla/_ipdltest/TestAsyncReturns.h"
),
("PTestAsyncReturns", "parent"): (
"TestAsyncReturnsParent", "mozilla/_ipdltest/TestAsyncReturns.h"
),
("PTestBadActor", "parent"): ("TestBadActorParent", "mozilla/_ipdltest/TestBadActor.h"),
("PTestBadActor", "child"): ("TestBadActorChild", "mozilla/_ipdltest/TestBadActor.h"),
("PTestBadActorSub", "child"): ("TestBadActorSubChild", "mozilla/_ipdltest/TestBadActor.h"),
("PTestBadActorSub", "parent"): ("TestBadActorSubParent", "mozilla/_ipdltest/TestBadActor.h"),
("PTestCancel", "child"): ("TestCancelChild", "mozilla/_ipdltest/TestCancel.h"),
("PTestCancel", "parent"): ("TestCancelParent", "mozilla/_ipdltest/TestCancel.h"),
("PTestCrashCleanup", "child"): (
"TestCrashCleanupChild", "mozilla/_ipdltest/TestCrashCleanup.h"
),
("PTestCrashCleanup", "parent"): (
"TestCrashCleanupParent", "mozilla/_ipdltest/TestCrashCleanup.h"
),
("PTestDataStructures", "child"): (
"TestDataStructuresChild", "mozilla/_ipdltest/TestDataStructures.h"
),
("PTestDataStructures", "parent"): (
"TestDataStructuresParent", "mozilla/_ipdltest/TestDataStructures.h"
),
("PTestDataStructuresSub", "child"): (
"TestDataStructuresSub", "mozilla/_ipdltest/TestDataStructures.h"
),
("PTestDataStructuresSub", "parent"): (
"TestDataStructuresSub", "mozilla/_ipdltest/TestDataStructures.h"
),
("PTestDemon", "child"): ("TestDemonChild", "mozilla/_ipdltest/TestDemon.h"),
("PTestDemon", "parent"): ("TestDemonParent", "mozilla/_ipdltest/TestDemon.h"),
("PTestDesc", "child"): ("TestDescChild", "mozilla/_ipdltest/TestDesc.h"),
("PTestDesc", "parent"): ("TestDescParent", "mozilla/_ipdltest/TestDesc.h"),
("PTestDescSub", "child"): ("TestDescSubChild", "mozilla/_ipdltest/TestDesc.h"),
("PTestDescSub", "parent"): ("TestDescSubParent", "mozilla/_ipdltest/TestDesc.h"),
("PTestDescSubsub", "child"): ("TestDescSubsubChild", "mozilla/_ipdltest/TestDesc.h"),
("PTestDescSubsub", "parent"): ("TestDescSubsubParent", "mozilla/_ipdltest/TestDesc.h"),
("PTestEndpointBridgeMain", "child"): (
"TestEndpointBridgeMainChild", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
),
("PTestEndpointBridgeMain", "parent"): (
"TestEndpointBridgeMainParent", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
),
("PTestEndpointBridgeMainSub", "child"): (
"TestEndpointBridgeMainSubChild", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
),
("PTestEndpointBridgeMainSub", "parent"): (
"TestEndpointBridgeMainSubParent", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
),
("PTestEndpointBridgeSub", "child"): (
"TestEndpointBridgeSubChild", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
),
("PTestEndpointBridgeSub", "parent"): (
"TestEndpointBridgeSubParent", "mozilla/_ipdltest/TestEndpointBridgeMain.h"
),
("PTestEndpointOpens", "child"): (
"TestEndpointOpensChild", "mozilla/_ipdltest/TestEndpointOpens.h"
),
("PTestEndpointOpens", "parent"): (
"TestEndpointOpensParent", "mozilla/_ipdltest/TestEndpointOpens.h"
),
("PTestEndpointOpensOpened", "child"): (
"TestEndpointOpensOpenedChild", "mozilla/_ipdltest/TestEndpointOpens.h"
),
("PTestEndpointOpensOpened", "parent"): (
"TestEndpointOpensOpenedParent", "mozilla/_ipdltest/TestEndpointOpens.h"
),
("PTestFailedCtor", "child"): ("TestFailedCtorChild", "mozilla/_ipdltest/TestFailedCtor.h"),
("PTestFailedCtor", "parent"): ("TestFailedCtorParent", "mozilla/_ipdltest/TestFailedCtor.h"),
("PTestFailedCtorSub", "child"): (
"TestFailedCtorSubChild", "mozilla/_ipdltest/TestFailedCtor.h"
),
("PTestFailedCtorSub", "parent"): (
"TestFailedCtorSubParent", "mozilla/_ipdltest/TestFailedCtor.h"
),
("PTestFailedCtorSubsub", "child"): (
"TestFailedCtorSubsub", "mozilla/_ipdltest/TestFailedCtor.h"
),
("PTestFailedCtorSubsub", "parent"): (
"TestFailedCtorSubsub", "mozilla/_ipdltest/TestFailedCtor.h"
),
("PTestHandle", "child"): ("TestHandleChild", "mozilla/_ipdltest/TestJSON.h"),
("PTestHandle", "parent"): ("TestHandleParent", "mozilla/_ipdltest/TestJSON.h"),
("PTestJSON", "child"): ("TestJSONChild", "mozilla/_ipdltest/TestJSON.h"),
("PTestJSON", "parent"): ("TestJSONParent", "mozilla/_ipdltest/TestJSON.h"),
("PTestHangs", "child"): ("TestHangsChild", "mozilla/_ipdltest/TestHangs.h"),
("PTestHangs", "parent"): ("TestHangsParent", "mozilla/_ipdltest/TestHangs.h"),
("PTestHighestPrio", "child"): ("TestHighestPrioChild", "mozilla/_ipdltest/TestHighestPrio.h"),
("PTestHighestPrio", "parent"): (
"TestHighestPrioParent", "mozilla/_ipdltest/TestHighestPrio.h"
),
("PTestInterruptErrorCleanup", "child"): (
"TestInterruptErrorCleanupChild", "mozilla/_ipdltest/TestInterruptErrorCleanup.h"
),
("PTestInterruptErrorCleanup", "parent"): (
"TestInterruptErrorCleanupParent", "mozilla/_ipdltest/TestInterruptErrorCleanup.h"
),
("PTestInterruptRaces", "child"): (
"TestInterruptRacesChild", "mozilla/_ipdltest/TestInterruptRaces.h"
),
("PTestInterruptRaces", "parent"): (
"TestInterruptRacesParent", "mozilla/_ipdltest/TestInterruptRaces.h"
),
("PTestInterruptShutdownRace", "child"): (
"TestInterruptShutdownRaceChild", "mozilla/_ipdltest/TestInterruptShutdownRace.h"
),
("PTestInterruptShutdownRace", "parent"): (
"TestInterruptShutdownRaceParent", "mozilla/_ipdltest/TestInterruptShutdownRace.h"
),
("PTestLatency", "child"): ("TestLatencyChild", "mozilla/_ipdltest/TestLatency.h"),
("PTestLatency", "parent"): ("TestLatencyParent", "mozilla/_ipdltest/TestLatency.h"),
("PTestLayoutThread", "child"): (
"TestOffMainThreadPaintingChild", "mozilla/_ipdltest/TestOffMainThreadPainting.h"
),
("PTestLayoutThread", "parent"): (
"TestOffMainThreadPaintingParent", "mozilla/_ipdltest/TestOffMainThreadPainting.h"
),
("PTestPaintThread", "child"): (
"TestPaintThreadChild", "mozilla/_ipdltest/TestOffMainThreadPainting.h"
),
("PTestPaintThread", "parent"): (
"TestPaintThreadParent", "mozilla/_ipdltest/TestOffMainThreadPainting.h"
),
("PTestManyChildAllocs", "child"): (
"TestManyChildAllocsChild", "mozilla/_ipdltest/TestManyChildAllocs.h"
),
("PTestManyChildAllocs", "parent"): (
"TestManyChildAllocsParent", "mozilla/_ipdltest/TestManyChildAllocs.h"
),
("PTestManyChildAllocsSub", "child"): (
"TestManyChildAllocsSubChild", "mozilla/_ipdltest/TestManyChildAllocs.h"
),
("PTestManyChildAllocsSub", "parent"): (
"TestManyChildAllocsSubParent", "mozilla/_ipdltest/TestManyChildAllocs.h"
),
("PTestMultiMgrs", "child"): ("TestMultiMgrsChild", "mozilla/_ipdltest/TestMultiMgrs.h"),
("PTestMultiMgrs", "parent"): ("TestMultiMgrsParent", "mozilla/_ipdltest/TestMultiMgrs.h"),
("PTestMultiMgrsBottom", "child"): (
"TestMultiMgrsBottomChild", "mozilla/_ipdltest/TestMultiMgrs.h"
),
("PTestMultiMgrsBottom", "parent"): (
"TestMultiMgrsBottomParent", "mozilla/_ipdltest/TestMultiMgrs.h"
),
("PTestMultiMgrsLeft", "child"): (
"TestMultiMgrsLeftChild", "mozilla/_ipdltest/TestMultiMgrs.h"
),
("PTestMultiMgrsLeft", "parent"): (
"TestMultiMgrsLeftParent", "mozilla/_ipdltest/TestMultiMgrs.h"
),
("PTestMultiMgrsRight", "child"): (
"TestMultiMgrsRightChild", "mozilla/_ipdltest/TestMultiMgrs.h"
),
("PTestMultiMgrsRight", "parent"): (
"TestMultiMgrsRightParent", "mozilla/_ipdltest/TestMultiMgrs.h"
),
("PTestNestedLoops", "child"): ("TestNestedLoopsChild", "mozilla/_ipdltest/TestNestedLoops.h"),
("PTestNestedLoops", "parent"): (
"TestNestedLoopsParent", "mozilla/_ipdltest/TestNestedLoops.h"
),
("PTestRaceDeadlock", "child"): (
"TestRaceDeadlockChild", "mozilla/_ipdltest/TestRaceDeadlock.h"
),
("PTestRaceDeadlock", "parent"): (
"TestRaceDeadlockParent", "mozilla/_ipdltest/TestRaceDeadlock.h"
),
("PTestRaceDeferral", "child"): (
"TestRaceDeferralChild", "mozilla/_ipdltest/TestRaceDeferral.h"
),
("PTestRaceDeferral", "parent"): (
"TestRaceDeferralParent", "mozilla/_ipdltest/TestRaceDeferral.h"
),
("PTestRacyInterruptReplies", "child"): (
"TestRacyInterruptRepliesChild", "mozilla/_ipdltest/TestRacyInterruptReplies.h"
),
("PTestRacyInterruptReplies", "parent"): (
"TestRacyInterruptRepliesParent", "mozilla/_ipdltest/TestRacyInterruptReplies.h"
),
("PTestRacyReentry", "child"): ("TestRacyReentryChild", "mozilla/_ipdltest/TestRacyReentry.h"),
("PTestRacyReentry", "parent"): (
"TestRacyReentryParent", "mozilla/_ipdltest/TestRacyReentry.h"
),
("PTestRacyUndefer", "child"): ("TestRacyUndeferChild", "mozilla/_ipdltest/TestRacyUndefer.h"),
("PTestRacyUndefer", "parent"): (
"TestRacyUndeferParent", "mozilla/_ipdltest/TestRacyUndefer.h"
),
("PTestRPC", "child"): ("TestRPCChild", "mozilla/_ipdltest/TestRPC.h"),
("PTestRPC", "parent"): ("TestRPCParent", "mozilla/_ipdltest/TestRPC.h"),
("PTestSanity", "child"): ("TestSanityChild", "mozilla/_ipdltest/TestSanity.h"),
("PTestSanity", "parent"): ("TestSanityParent", "mozilla/_ipdltest/TestSanity.h"),
("PTestSelfManage", "child"): (
"TestSelfManageChild", "mozilla/_ipdltest/TestSelfManageRoot.h"
),
("PTestSelfManage", "parent"): (
"TestSelfManageParent", "mozilla/_ipdltest/TestSelfManageRoot.h"
),
("PTestSelfManageRoot", "child"): (
"TestSelfManageRootChild", "mozilla/_ipdltest/TestSelfManageRoot.h"
),
("PTestSelfManageRoot", "parent"): (
"TestSelfManageRootParent", "mozilla/_ipdltest/TestSelfManageRoot.h"
),
("PTestShmem", "child"): ("TestShmemChild", "mozilla/_ipdltest/TestShmem.h"),
("PTestShmem", "parent"): ("TestShmemParent", "mozilla/_ipdltest/TestShmem.h"),
("PTestShutdown", "child"): ("TestShutdownChild", "mozilla/_ipdltest/TestShutdown.h"),
("PTestShutdown", "parent"): ("TestShutdownParent", "mozilla/_ipdltest/TestShutdown.h"),
("PTestShutdownSub", "child"): ("TestShutdownSubChild", "mozilla/_ipdltest/TestShutdown.h"),
("PTestShutdownSub", "parent"): ("TestShutdownSubParent", "mozilla/_ipdltest/TestShutdown.h"),
("PTestShutdownSubsub", "child"): (
"TestShutdownSubsubChild", "mozilla/_ipdltest/TestShutdown.h"
),
("PTestShutdownSubsub", "parent"): (
"TestShutdownSubsubParent", "mozilla/_ipdltest/TestShutdown.h"
),
("PTestStackHooks", "child"): ("TestStackHooksChild", "mozilla/_ipdltest/TestStackHooks.h"),
("PTestStackHooks", "parent"): ("TestStackHooksParent", "mozilla/_ipdltest/TestStackHooks.h"),
("PTestSyncError", "child"): ("TestSyncErrorChild", "mozilla/_ipdltest/TestSyncError.h"),
("PTestSyncError", "parent"): ("TestSyncErrorParent", "mozilla/_ipdltest/TestSyncError.h"),
("PTestSyncHang", "child"): ("TestSyncHangChild", "mozilla/_ipdltest/TestSyncHang.h"),
("PTestSyncHang", "parent"): ("TestSyncHangParent", "mozilla/_ipdltest/TestSyncHang.h"),
("PTestSyncWakeup", "child"): ("TestSyncWakeupChild", "mozilla/_ipdltest/TestSyncWakeup.h"),
("PTestSyncWakeup", "parent"): ("TestSyncWakeupParent", "mozilla/_ipdltest/TestSyncWakeup.h"),
("PTestUniquePtrIPC", "child"): (
"TestUniquePtrIPCChild", "mozilla/_ipdltest/TestUniquePtrIPC.h"
),
("PTestUniquePtrIPC", "parent"): (
"TestUniquePtrIPCParent", "mozilla/_ipdltest/TestUniquePtrIPC.h"
),
("PTestUrgency", "child"): ("TestUrgencyChild", "mozilla/_ipdltest/TestUrgency.h"),
("PTestUrgency", "parent"): ("TestUrgencyParent", "mozilla/_ipdltest/TestUrgency.h"),
("PTestUrgentHangs", "child"): ("TestUrgentHangsChild", "mozilla/_ipdltest/TestUrgentHangs.h"),
("PTestUrgentHangs", "parent"): (
"TestUrgentHangsParent", "mozilla/_ipdltest/TestUrgentHangs.h"
),
}
# Our long term goal is to burn this list down, so new entries should be added
@ -324,4 +616,15 @@ VIRTUAL_CALL_CLASSES = set([
("PLoginReputation", "child"),
("PPluginSurface", "child"),
("PTestShellCommand", "child"),
# _ipdltest
# Not actually subclassed
("PTestIndirectProtocolParamFirst", "child"),
("PTestIndirectProtocolParamFirst", "parent"),
("PTestIndirectProtocolParamManage", "child"),
("PTestIndirectProtocolParamManage", "parent"),
("PTestIndirectProtocolParamSecond", "child"),
("PTestIndirectProtocolParamSecond", "parent"),
("PTestPriority", "child"),
("PTestPriority", "parent"),
])

Просмотреть файл

@ -3,10 +3,10 @@ namespace _ipdltest {
protocol PTestShmem {
child:
async Give(Shmem mem, Shmem unsafe, size_t expectedSize);
async Give(Shmem mem, Shmem unsafe, uint32_t expectedSize);
parent:
async Take(Shmem mem, Shmem unsafe, size_t expectedSize);
async Take(Shmem mem, Shmem unsafe, uint32_t expectedSize);
async __delete__();
/*

Просмотреть файл

@ -14,6 +14,8 @@ namespace mozilla {
namespace _ipdltest {
class TestActorPunningParent : public PTestActorPunningParent {
friend class PTestActorPunningParent;
public:
static bool RunTestInProcesses() { return true; }
static bool RunTestInThreads() { return false; }
@ -21,16 +23,14 @@ class TestActorPunningParent : public PTestActorPunningParent {
void Main();
protected:
PTestActorPunningPunnedParent* AllocPTestActorPunningPunnedParent() override;
bool DeallocPTestActorPunningPunnedParent(
PTestActorPunningPunnedParent* a) override;
PTestActorPunningPunnedParent* AllocPTestActorPunningPunnedParent();
bool DeallocPTestActorPunningPunnedParent(PTestActorPunningPunnedParent* a);
PTestActorPunningSubParent* AllocPTestActorPunningSubParent() override;
bool DeallocPTestActorPunningSubParent(
PTestActorPunningSubParent* a) override;
PTestActorPunningSubParent* AllocPTestActorPunningSubParent();
bool DeallocPTestActorPunningSubParent(PTestActorPunningSubParent* a);
virtual mozilla::ipc::IPCResult RecvPun(PTestActorPunningSubParent* a,
const Bad& bad) override;
mozilla::ipc::IPCResult RecvPun(PTestActorPunningSubParent* a,
const Bad& bad);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown == why) fail("should have died from error!");
@ -60,19 +60,20 @@ class TestActorPunningSubParent : public PTestActorPunningSubParent {
};
class TestActorPunningChild : public PTestActorPunningChild {
friend class PTestActorPunningChild;
public:
TestActorPunningChild() {}
virtual ~TestActorPunningChild() {}
protected:
PTestActorPunningPunnedChild* AllocPTestActorPunningPunnedChild() override;
bool DeallocPTestActorPunningPunnedChild(
PTestActorPunningPunnedChild* a) override;
PTestActorPunningPunnedChild* AllocPTestActorPunningPunnedChild();
bool DeallocPTestActorPunningPunnedChild(PTestActorPunningPunnedChild* a);
PTestActorPunningSubChild* AllocPTestActorPunningSubChild() override;
bool DeallocPTestActorPunningSubChild(PTestActorPunningSubChild* a) override;
PTestActorPunningSubChild* AllocPTestActorPunningSubChild();
bool DeallocPTestActorPunningSubChild(PTestActorPunningSubChild* a);
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual void ActorDestroy(ActorDestroyReason why) override {
fail("should have been killed off!");
@ -90,7 +91,7 @@ class TestActorPunningSubChild : public PTestActorPunningSubChild {
TestActorPunningSubChild() {}
virtual ~TestActorPunningSubChild() {}
virtual mozilla::ipc::IPCResult RecvBad() override;
mozilla::ipc::IPCResult RecvBad();
};
} // namespace _ipdltest

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestAsyncReturnsParent : public PTestAsyncReturnsParent {
friend class PTestAsyncReturnsParent;
public:
TestAsyncReturnsParent();
virtual ~TestAsyncReturnsParent();
@ -20,7 +22,7 @@ class TestAsyncReturnsParent : public PTestAsyncReturnsParent {
void Main();
protected:
mozilla::ipc::IPCResult RecvPong(PongResolver&& aResolve) override;
mozilla::ipc::IPCResult RecvPong(PongResolver&& aResolve);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -30,13 +32,15 @@ class TestAsyncReturnsParent : public PTestAsyncReturnsParent {
};
class TestAsyncReturnsChild : public PTestAsyncReturnsChild {
friend class PTestAsyncReturnsChild;
public:
TestAsyncReturnsChild();
virtual ~TestAsyncReturnsChild();
protected:
mozilla::ipc::IPCResult RecvPing(PingResolver&& aResolve) override;
mozilla::ipc::IPCResult RecvNoReturn(NoReturnResolver&& aResolve) override;
mozilla::ipc::IPCResult RecvPing(PingResolver&& aResolve);
mozilla::ipc::IPCResult RecvNoReturn(NoReturnResolver&& aResolve);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -13,6 +13,8 @@ namespace mozilla {
namespace _ipdltest {
class TestBadActorParent : public PTestBadActorParent {
friend class PTestBadActorParent;
public:
TestBadActorParent() {}
virtual ~TestBadActorParent() {}
@ -31,26 +33,29 @@ class TestBadActorParent : public PTestBadActorParent {
virtual void HandleFatalError(const char* aErrorMsg) const override;
virtual PTestBadActorSubParent* AllocPTestBadActorSubParent() override;
PTestBadActorSubParent* AllocPTestBadActorSubParent();
virtual bool DeallocPTestBadActorSubParent(
PTestBadActorSubParent* actor) override {
bool DeallocPTestBadActorSubParent(PTestBadActorSubParent* actor) {
delete actor;
return true;
}
};
class TestBadActorSubParent : public PTestBadActorSubParent {
friend class PTestBadActorSubParent;
public:
TestBadActorSubParent() {}
virtual ~TestBadActorSubParent() {}
protected:
virtual void ActorDestroy(ActorDestroyReason why) override {}
virtual mozilla::ipc::IPCResult RecvPing() override;
mozilla::ipc::IPCResult RecvPing();
};
class TestBadActorChild : public PTestBadActorChild {
friend class PTestBadActorChild;
public:
TestBadActorChild() {}
virtual ~TestBadActorChild() {}

Просмотреть файл

@ -19,13 +19,13 @@ class TestCancelParent : public PTestCancelParent {
void Main();
virtual mozilla::ipc::IPCResult RecvDone1() override;
virtual mozilla::ipc::IPCResult RecvTest2_1() override;
virtual mozilla::ipc::IPCResult RecvStart3() override;
virtual mozilla::ipc::IPCResult RecvTest3_2() override;
virtual mozilla::ipc::IPCResult RecvDone() override;
mozilla::ipc::IPCResult RecvDone1();
mozilla::ipc::IPCResult RecvTest2_1();
mozilla::ipc::IPCResult RecvStart3();
mozilla::ipc::IPCResult RecvTest3_2();
mozilla::ipc::IPCResult RecvDone();
virtual mozilla::ipc::IPCResult RecvCheckParent(uint32_t *reply) override;
mozilla::ipc::IPCResult RecvCheckParent(uint32_t *reply);
virtual void ActorDestroy(ActorDestroyReason why) override {
passed("ok");
@ -38,12 +38,12 @@ class TestCancelChild : public PTestCancelChild {
TestCancelChild();
virtual ~TestCancelChild();
virtual mozilla::ipc::IPCResult RecvTest1_1() override;
virtual mozilla::ipc::IPCResult RecvStart2() override;
virtual mozilla::ipc::IPCResult RecvTest2_2() override;
virtual mozilla::ipc::IPCResult RecvTest3_1() override;
mozilla::ipc::IPCResult RecvTest1_1();
mozilla::ipc::IPCResult RecvStart2();
mozilla::ipc::IPCResult RecvTest2_2();
mozilla::ipc::IPCResult RecvTest3_1();
virtual mozilla::ipc::IPCResult RecvCheckChild(uint32_t *reply) override;
mozilla::ipc::IPCResult RecvCheckChild(uint32_t *reply);
virtual void ActorDestroy(ActorDestroyReason why) override { QuitChild(); }
};

Просмотреть файл

@ -29,12 +29,14 @@ class TestCrashCleanupParent : public PTestCrashCleanupParent {
};
class TestCrashCleanupChild : public PTestCrashCleanupChild {
friend class PTestCrashCleanupChild;
public:
TestCrashCleanupChild();
virtual ~TestCrashCleanupChild();
protected:
virtual mozilla::ipc::IPCResult AnswerDIEDIEDIE() override;
mozilla::ipc::IPCResult AnswerDIEDIEDIE();
virtual void ActorDestroy(ActorDestroyReason why) override {
fail("should have 'crashed'!");

Просмотреть файл

@ -30,6 +30,8 @@ class TestDataStructuresSub : public PTestDataStructuresSubParent,
// Main actors
class TestDataStructuresParent : public PTestDataStructuresParent {
friend class PTestDataStructuresParent;
public:
TestDataStructuresParent();
virtual ~TestDataStructuresParent();
@ -40,89 +42,75 @@ class TestDataStructuresParent : public PTestDataStructuresParent {
void Main();
protected:
virtual PTestDataStructuresSubParent* AllocPTestDataStructuresSubParent(
const int& i) override {
PTestDataStructuresSubParent* AllocPTestDataStructuresSubParent(
const int& i) {
PTestDataStructuresSubParent* actor = new TestDataStructuresSub(i);
mKids.AppendElement(actor);
return actor;
}
virtual bool DeallocPTestDataStructuresSubParent(
PTestDataStructuresSubParent* actor) override;
bool DeallocPTestDataStructuresSubParent(PTestDataStructuresSubParent* actor);
virtual mozilla::ipc::IPCResult RecvTest1(InfallibleTArray<int>&& i1,
InfallibleTArray<int>* o1) override;
mozilla::ipc::IPCResult RecvTest1(InfallibleTArray<int>&& i1,
InfallibleTArray<int>* o1);
virtual mozilla::ipc::IPCResult RecvTest2(
mozilla::ipc::IPCResult RecvTest2(
InfallibleTArray<PTestDataStructuresSubParent*>&& i1,
InfallibleTArray<PTestDataStructuresSubParent*>* o1) override;
InfallibleTArray<PTestDataStructuresSubParent*>* o1);
virtual mozilla::ipc::IPCResult RecvTest3(const IntDouble& i1,
const IntDouble& i2, IntDouble* o1,
IntDouble* o2) override;
mozilla::ipc::IPCResult RecvTest3(const IntDouble& i1, const IntDouble& i2,
IntDouble* o1, IntDouble* o2);
virtual mozilla::ipc::IPCResult RecvTest4(
InfallibleTArray<IntDouble>&& i1,
InfallibleTArray<IntDouble>* o1) override;
mozilla::ipc::IPCResult RecvTest4(InfallibleTArray<IntDouble>&& i1,
InfallibleTArray<IntDouble>* o1);
virtual mozilla::ipc::IPCResult RecvTest5(const IntDoubleArrays& i1,
const IntDoubleArrays& i2,
const IntDoubleArrays& i3,
IntDoubleArrays* o1,
IntDoubleArrays* o2,
IntDoubleArrays* o3) override;
mozilla::ipc::IPCResult RecvTest5(const IntDoubleArrays& i1,
const IntDoubleArrays& i2,
const IntDoubleArrays& i3,
IntDoubleArrays* o1, IntDoubleArrays* o2,
IntDoubleArrays* o3);
virtual mozilla::ipc::IPCResult RecvTest6(
InfallibleTArray<IntDoubleArrays>&& i1,
InfallibleTArray<IntDoubleArrays>* o1) override;
mozilla::ipc::IPCResult RecvTest6(InfallibleTArray<IntDoubleArrays>&& i1,
InfallibleTArray<IntDoubleArrays>* o1);
virtual mozilla::ipc::IPCResult RecvTest7_0(const ActorWrapper& i1,
ActorWrapper* o1) override;
mozilla::ipc::IPCResult RecvTest7_0(const ActorWrapper& i1, ActorWrapper* o1);
virtual mozilla::ipc::IPCResult RecvTest7(const Actors& i1, const Actors& i2,
const Actors& i3, Actors* o1,
Actors* o2, Actors* o3) override;
mozilla::ipc::IPCResult RecvTest7(const Actors& i1, const Actors& i2,
const Actors& i3, Actors* o1, Actors* o2,
Actors* o3);
virtual mozilla::ipc::IPCResult RecvTest8(
InfallibleTArray<Actors>&& i1, InfallibleTArray<Actors>* o1) override;
mozilla::ipc::IPCResult RecvTest8(InfallibleTArray<Actors>&& i1,
InfallibleTArray<Actors>* o1);
virtual mozilla::ipc::IPCResult RecvTest9(const Unions& i1, const Unions& i2,
const Unions& i3, const Unions& i4,
Unions* o1, Unions* o2, Unions* o3,
Unions* o4) override;
mozilla::ipc::IPCResult RecvTest9(const Unions& i1, const Unions& i2,
const Unions& i3, const Unions& i4,
Unions* o1, Unions* o2, Unions* o3,
Unions* o4);
virtual mozilla::ipc::IPCResult RecvTest10(
InfallibleTArray<Unions>&& i1, InfallibleTArray<Unions>* o1) override;
mozilla::ipc::IPCResult RecvTest10(InfallibleTArray<Unions>&& i1,
InfallibleTArray<Unions>* o1);
virtual mozilla::ipc::IPCResult RecvTest11(const SIntDouble& i,
SIntDouble* o) override;
mozilla::ipc::IPCResult RecvTest11(const SIntDouble& i, SIntDouble* o);
virtual mozilla::ipc::IPCResult RecvTest12(const SIntDoubleArrays& i,
SIntDoubleArrays* o) override;
mozilla::ipc::IPCResult RecvTest12(const SIntDoubleArrays& i,
SIntDoubleArrays* o);
virtual mozilla::ipc::IPCResult RecvTest13(const SActors& i,
SActors* o) override;
mozilla::ipc::IPCResult RecvTest13(const SActors& i, SActors* o);
virtual mozilla::ipc::IPCResult RecvTest14(const Structs& i,
Structs* o) override;
mozilla::ipc::IPCResult RecvTest14(const Structs& i, Structs* o);
virtual mozilla::ipc::IPCResult RecvTest15(
mozilla::ipc::IPCResult RecvTest15(
const WithStructs& i1, const WithStructs& i2, const WithStructs& i3,
const WithStructs& i4, const WithStructs& i5, WithStructs* o1,
WithStructs* o2, WithStructs* o3, WithStructs* o4,
WithStructs* o5) override;
WithStructs* o2, WithStructs* o3, WithStructs* o4, WithStructs* o5);
virtual mozilla::ipc::IPCResult RecvTest16(const WithUnions& i,
WithUnions* o) override;
mozilla::ipc::IPCResult RecvTest16(const WithUnions& i, WithUnions* o);
virtual mozilla::ipc::IPCResult RecvTest17(
InfallibleTArray<Op>&& sa) override;
mozilla::ipc::IPCResult RecvTest17(InfallibleTArray<Op>&& sa);
virtual mozilla::ipc::IPCResult RecvTest18(
InfallibleTArray<nsIntRegion>&& ra) override;
mozilla::ipc::IPCResult RecvTest18(InfallibleTArray<nsIntRegion>&& ra);
virtual mozilla::ipc::IPCResult RecvDummy(const ShmemUnion& su,
ShmemUnion* rsu) override {
mozilla::ipc::IPCResult RecvDummy(const ShmemUnion& su, ShmemUnion* rsu) {
*rsu = su;
return IPC_OK();
}
@ -138,25 +126,25 @@ class TestDataStructuresParent : public PTestDataStructuresParent {
};
class TestDataStructuresChild : public PTestDataStructuresChild {
friend class PTestDataStructuresChild;
public:
TestDataStructuresChild();
virtual ~TestDataStructuresChild();
protected:
virtual PTestDataStructuresSubChild* AllocPTestDataStructuresSubChild(
const int& i) override {
PTestDataStructuresSubChild* AllocPTestDataStructuresSubChild(const int& i) {
PTestDataStructuresSubChild* actor = new TestDataStructuresSub(i);
mKids.AppendElement(actor);
return actor;
}
virtual bool DeallocPTestDataStructuresSubChild(
PTestDataStructuresSubChild* actor) override {
bool DeallocPTestDataStructuresSubChild(PTestDataStructuresSubChild* actor) {
delete actor;
return true;
}
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -29,12 +29,12 @@ class TestDemonParent : public PTestDemonParent {
void ArtificialSleep() override;
#endif
mozilla::ipc::IPCResult RecvAsyncMessage(const int& n) override;
mozilla::ipc::IPCResult RecvHiPrioSyncMessage() override;
mozilla::ipc::IPCResult RecvAsyncMessage(const int& n);
mozilla::ipc::IPCResult RecvHiPrioSyncMessage();
mozilla::ipc::IPCResult RecvSyncMessage(const int& n) override;
mozilla::ipc::IPCResult RecvUrgentAsyncMessage(const int& n) override;
mozilla::ipc::IPCResult RecvUrgentSyncMessage(const int& n) override;
mozilla::ipc::IPCResult RecvSyncMessage(const int& n);
mozilla::ipc::IPCResult RecvUrgentAsyncMessage(const int& n);
mozilla::ipc::IPCResult RecvUrgentSyncMessage(const int& n);
virtual void ActorDestroy(ActorDestroyReason why) override {
mDone = true;
@ -62,15 +62,15 @@ class TestDemonChild : public PTestDemonChild {
TestDemonChild();
virtual ~TestDemonChild();
mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
#ifdef DEBUG
bool NeedArtificialSleep() override { return true; }
void ArtificialSleep() override;
#endif
mozilla::ipc::IPCResult RecvAsyncMessage(const int& n) override;
mozilla::ipc::IPCResult RecvHiPrioSyncMessage() override;
mozilla::ipc::IPCResult RecvAsyncMessage(const int& n);
mozilla::ipc::IPCResult RecvHiPrioSyncMessage();
virtual void ActorDestroy(ActorDestroyReason why) override { _exit(0); }

Просмотреть файл

@ -19,6 +19,8 @@ namespace _ipdltest {
// Top-level
//
class TestDescParent : public PTestDescParent {
friend class PTestDescParent;
public:
TestDescParent() {}
virtual ~TestDescParent() {}
@ -28,12 +30,11 @@ class TestDescParent : public PTestDescParent {
void Main();
virtual mozilla::ipc::IPCResult RecvOk(PTestDescSubsubParent* a) override;
mozilla::ipc::IPCResult RecvOk(PTestDescSubsubParent* a);
protected:
virtual PTestDescSubParent* AllocPTestDescSubParent(
PTestDescSubsubParent*) override;
virtual bool DeallocPTestDescSubParent(PTestDescSubParent* actor) override;
PTestDescSubParent* AllocPTestDescSubParent(PTestDescSubsubParent*);
bool DeallocPTestDescSubParent(PTestDescSubParent* actor);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -43,17 +44,18 @@ class TestDescParent : public PTestDescParent {
};
class TestDescChild : public PTestDescChild {
friend class PTestDescChild;
public:
TestDescChild() {}
virtual ~TestDescChild() {}
protected:
virtual PTestDescSubChild* AllocPTestDescSubChild(
PTestDescSubsubChild*) override;
PTestDescSubChild* AllocPTestDescSubChild(PTestDescSubsubChild*);
virtual bool DeallocPTestDescSubChild(PTestDescSubChild* actor) override;
bool DeallocPTestDescSubChild(PTestDescSubChild* actor);
virtual mozilla::ipc::IPCResult RecvTest(PTestDescSubsubChild* a) override;
mozilla::ipc::IPCResult RecvTest(PTestDescSubsubChild* a);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -65,26 +67,28 @@ class TestDescChild : public PTestDescChild {
// First descendent
//
class TestDescSubParent : public PTestDescSubParent {
friend class PTestDescSubParent;
public:
TestDescSubParent() {}
virtual ~TestDescSubParent() {}
protected:
virtual void ActorDestroy(ActorDestroyReason why) override {}
virtual PTestDescSubsubParent* AllocPTestDescSubsubParent() override;
virtual bool DeallocPTestDescSubsubParent(
PTestDescSubsubParent* actor) override;
PTestDescSubsubParent* AllocPTestDescSubsubParent();
bool DeallocPTestDescSubsubParent(PTestDescSubsubParent* actor);
};
class TestDescSubChild : public PTestDescSubChild {
friend class PTestDescSubChild;
public:
TestDescSubChild() {}
virtual ~TestDescSubChild() {}
protected:
virtual PTestDescSubsubChild* AllocPTestDescSubsubChild() override;
virtual bool DeallocPTestDescSubsubChild(
PTestDescSubsubChild* actor) override;
PTestDescSubsubChild* AllocPTestDescSubsubChild();
bool DeallocPTestDescSubsubChild(PTestDescSubsubChild* actor);
};
//-----------------------------------------------------------------------------

Просмотреть файл

@ -22,6 +22,8 @@ namespace _ipdltest {
// "Main" process
//
class TestEndpointBridgeMainParent : public PTestEndpointBridgeMainParent {
friend class PTestEndpointBridgeMainParent;
public:
TestEndpointBridgeMainParent() {}
virtual ~TestEndpointBridgeMainParent() {}
@ -33,22 +35,23 @@ class TestEndpointBridgeMainParent : public PTestEndpointBridgeMainParent {
protected:
mozilla::ipc::IPCResult RecvBridged(
mozilla::ipc::Endpoint<PTestEndpointBridgeMainSubParent>&& endpoint)
override;
mozilla::ipc::Endpoint<PTestEndpointBridgeMainSubParent>&& endpoint);
virtual void ActorDestroy(ActorDestroyReason why) override;
};
class TestEndpointBridgeMainSubParent
: public PTestEndpointBridgeMainSubParent {
friend class PTestEndpointBridgeMainSubParent;
public:
explicit TestEndpointBridgeMainSubParent() {}
virtual ~TestEndpointBridgeMainSubParent() {}
protected:
virtual mozilla::ipc::IPCResult RecvHello() override;
virtual mozilla::ipc::IPCResult RecvHelloSync() override;
virtual mozilla::ipc::IPCResult AnswerHelloRpc() override;
mozilla::ipc::IPCResult RecvHello();
mozilla::ipc::IPCResult RecvHelloSync();
mozilla::ipc::IPCResult AnswerHelloRpc();
virtual void ActorDestroy(ActorDestroyReason why) override;
};
@ -59,12 +62,14 @@ class TestEndpointBridgeMainSubParent
class TestEndpointBridgeSubParent;
class TestEndpointBridgeMainChild : public PTestEndpointBridgeMainChild {
friend class PTestEndpointBridgeMainChild;
public:
TestEndpointBridgeMainChild();
virtual ~TestEndpointBridgeMainChild() {}
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual void ActorDestroy(ActorDestroyReason why) override;
@ -72,6 +77,8 @@ class TestEndpointBridgeMainChild : public PTestEndpointBridgeMainChild {
};
class TestEndpointBridgeSubParent : public PTestEndpointBridgeSubParent {
friend class PTestEndpointBridgeSubParent;
public:
TestEndpointBridgeSubParent() {}
virtual ~TestEndpointBridgeSubParent() {}
@ -79,7 +86,7 @@ class TestEndpointBridgeSubParent : public PTestEndpointBridgeSubParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvBridgeEm() override;
mozilla::ipc::IPCResult RecvBridgeEm();
virtual void ActorDestroy(ActorDestroyReason why) override;
};
@ -88,27 +95,31 @@ class TestEndpointBridgeSubParent : public PTestEndpointBridgeSubParent {
// "Subsub" process --- child of "sub"
//
class TestEndpointBridgeSubChild : public PTestEndpointBridgeSubChild {
friend class PTestEndpointBridgeSubChild;
public:
TestEndpointBridgeSubChild();
virtual ~TestEndpointBridgeSubChild() {}
protected:
virtual mozilla::ipc::IPCResult RecvPing() override;
mozilla::ipc::IPCResult RecvPing();
mozilla::ipc::IPCResult RecvBridged(
Endpoint<PTestEndpointBridgeMainSubChild>&& endpoint) override;
Endpoint<PTestEndpointBridgeMainSubChild>&& endpoint);
virtual void ActorDestroy(ActorDestroyReason why) override;
};
class TestEndpointBridgeMainSubChild : public PTestEndpointBridgeMainSubChild {
friend class PTestEndpointBridgeMainSubChild;
public:
explicit TestEndpointBridgeMainSubChild() : mGotHi(false) {}
virtual ~TestEndpointBridgeMainSubChild() {}
protected:
virtual mozilla::ipc::IPCResult RecvHi() override;
virtual mozilla::ipc::IPCResult AnswerHiRpc() override;
mozilla::ipc::IPCResult RecvHi();
mozilla::ipc::IPCResult AnswerHiRpc();
virtual void ActorDestroy(ActorDestroyReason why) override;

Просмотреть файл

@ -19,6 +19,8 @@ namespace mozilla {
namespace _ipdltest {
class TestEndpointOpensParent : public PTestEndpointOpensParent {
friend class PTestEndpointOpensParent;
public:
TestEndpointOpensParent() {}
virtual ~TestEndpointOpensParent() {}
@ -29,9 +31,8 @@ class TestEndpointOpensParent : public PTestEndpointOpensParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvStartSubprotocol(
mozilla::ipc::Endpoint<PTestEndpointOpensOpenedParent>&& endpoint)
override;
mozilla::ipc::IPCResult RecvStartSubprotocol(
mozilla::ipc::Endpoint<PTestEndpointOpensOpenedParent>&& endpoint);
virtual void ActorDestroy(ActorDestroyReason why) override;
};
@ -41,14 +42,16 @@ class TestEndpointOpensParent : public PTestEndpointOpensParent {
namespace _ipdltest2 {
class TestEndpointOpensOpenedParent : public PTestEndpointOpensOpenedParent {
friend class PTestEndpointOpensOpenedParent;
public:
explicit TestEndpointOpensOpenedParent() {}
virtual ~TestEndpointOpensOpenedParent() {}
protected:
virtual mozilla::ipc::IPCResult RecvHello() override;
virtual mozilla::ipc::IPCResult RecvHelloSync() override;
virtual mozilla::ipc::IPCResult AnswerHelloRpc() override;
mozilla::ipc::IPCResult RecvHello();
mozilla::ipc::IPCResult RecvHelloSync();
mozilla::ipc::IPCResult AnswerHelloRpc();
virtual void ActorDestroy(ActorDestroyReason why) override;
};
@ -60,12 +63,14 @@ class TestEndpointOpensOpenedParent : public PTestEndpointOpensOpenedParent {
namespace _ipdltest {
class TestEndpointOpensChild : public PTestEndpointOpensChild {
friend class PTestEndpointOpensChild;
public:
TestEndpointOpensChild();
virtual ~TestEndpointOpensChild() {}
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual void ActorDestroy(ActorDestroyReason why) override;
};
@ -75,13 +80,15 @@ class TestEndpointOpensChild : public PTestEndpointOpensChild {
namespace _ipdltest2 {
class TestEndpointOpensOpenedChild : public PTestEndpointOpensOpenedChild {
friend class PTestEndpointOpensOpenedChild;
public:
explicit TestEndpointOpensOpenedChild() : mGotHi(false) {}
virtual ~TestEndpointOpensOpenedChild() {}
protected:
virtual mozilla::ipc::IPCResult RecvHi() override;
virtual mozilla::ipc::IPCResult AnswerHiRpc() override;
mozilla::ipc::IPCResult RecvHi();
mozilla::ipc::IPCResult AnswerHiRpc();
virtual void ActorDestroy(ActorDestroyReason why) override;

Просмотреть файл

@ -19,6 +19,8 @@ namespace _ipdltest {
// Top-level
//
class TestFailedCtorParent : public PTestFailedCtorParent {
friend class PTestFailedCtorParent;
public:
TestFailedCtorParent() {}
virtual ~TestFailedCtorParent() {}
@ -33,9 +35,8 @@ class TestFailedCtorParent : public PTestFailedCtorParent {
void Main();
protected:
virtual PTestFailedCtorSubParent* AllocPTestFailedCtorSubParent() override;
virtual bool DeallocPTestFailedCtorSubParent(
PTestFailedCtorSubParent* actor) override;
PTestFailedCtorSubParent* AllocPTestFailedCtorSubParent();
bool DeallocPTestFailedCtorSubParent(PTestFailedCtorSubParent* actor);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (AbnormalShutdown != why) fail("unexpected destruction!");
@ -45,18 +46,19 @@ class TestFailedCtorParent : public PTestFailedCtorParent {
};
class TestFailedCtorChild : public PTestFailedCtorChild {
friend class PTestFailedCtorChild;
public:
TestFailedCtorChild() {}
virtual ~TestFailedCtorChild() {}
protected:
virtual PTestFailedCtorSubChild* AllocPTestFailedCtorSubChild() override;
PTestFailedCtorSubChild* AllocPTestFailedCtorSubChild();
virtual mozilla::ipc::IPCResult AnswerPTestFailedCtorSubConstructor(
mozilla::ipc::IPCResult AnswerPTestFailedCtorSubConstructor(
PTestFailedCtorSubChild* actor) override;
virtual bool DeallocPTestFailedCtorSubChild(
PTestFailedCtorSubChild* actor) override;
bool DeallocPTestFailedCtorSubChild(PTestFailedCtorSubChild* actor);
virtual void ProcessingError(Result aCode, const char* aReason) override;
@ -71,17 +73,17 @@ class TestFailedCtorChild : public PTestFailedCtorChild {
class TestFailedCtorSubsub;
class TestFailedCtorSubParent : public PTestFailedCtorSubParent {
friend class PTestFailedCtorSubParent;
public:
TestFailedCtorSubParent() : mOne(nullptr), mTwo(nullptr), mThree(nullptr) {}
virtual ~TestFailedCtorSubParent();
protected:
virtual PTestFailedCtorSubsubParent* AllocPTestFailedCtorSubsubParent()
override;
PTestFailedCtorSubsubParent* AllocPTestFailedCtorSubsubParent();
virtual bool DeallocPTestFailedCtorSubsubParent(
PTestFailedCtorSubsubParent* actor) override;
virtual mozilla::ipc::IPCResult RecvSync() override { return IPC_OK(); }
bool DeallocPTestFailedCtorSubsubParent(PTestFailedCtorSubsubParent* actor);
mozilla::ipc::IPCResult RecvSync() { return IPC_OK(); }
virtual void ActorDestroy(ActorDestroyReason why) override;
@ -91,15 +93,15 @@ class TestFailedCtorSubParent : public PTestFailedCtorSubParent {
};
class TestFailedCtorSubChild : public PTestFailedCtorSubChild {
friend class PTestFailedCtorSubChild;
public:
TestFailedCtorSubChild() {}
virtual ~TestFailedCtorSubChild() {}
protected:
virtual PTestFailedCtorSubsubChild* AllocPTestFailedCtorSubsubChild()
override;
virtual bool DeallocPTestFailedCtorSubsubChild(
PTestFailedCtorSubsubChild* actor) override;
PTestFailedCtorSubsubChild* AllocPTestFailedCtorSubsubChild();
bool DeallocPTestFailedCtorSubsubChild(PTestFailedCtorSubsubChild* actor);
virtual void ActorDestroy(ActorDestroyReason why) override;
};

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestHangsParent : public PTestHangsParent {
friend class PTestHangsParent;
public:
TestHangsParent();
virtual ~TestHangsParent();
@ -25,9 +27,9 @@ class TestHangsParent : public PTestHangsParent {
protected:
virtual bool ShouldContinueFromReplyTimeout() override;
virtual mozilla::ipc::IPCResult RecvNonce() override { return IPC_OK(); }
mozilla::ipc::IPCResult RecvNonce() { return IPC_OK(); }
virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
mozilla::ipc::IPCResult AnswerStackFrame();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (AbnormalShutdown != why) fail("unexpected destruction!");
@ -42,22 +44,24 @@ class TestHangsParent : public PTestHangsParent {
};
class TestHangsChild : public PTestHangsChild {
friend class PTestHangsChild;
public:
TestHangsChild();
virtual ~TestHangsChild();
protected:
virtual mozilla::ipc::IPCResult RecvStart() override {
mozilla::ipc::IPCResult RecvStart() {
if (!SendNonce()) fail("sending Nonce");
return IPC_OK();
}
virtual mozilla::ipc::IPCResult AnswerStackFrame() override {
mozilla::ipc::IPCResult AnswerStackFrame() {
if (CallStackFrame()) fail("should have failed");
return IPC_OK();
}
virtual mozilla::ipc::IPCResult AnswerHang() override;
mozilla::ipc::IPCResult AnswerHang();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (AbnormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -19,10 +19,10 @@ class TestHighestPrioParent : public PTestHighestPrioParent {
void Main();
mozilla::ipc::IPCResult RecvMsg1() override;
mozilla::ipc::IPCResult RecvMsg2() override;
mozilla::ipc::IPCResult RecvMsg3() override;
mozilla::ipc::IPCResult RecvMsg4() override;
mozilla::ipc::IPCResult RecvMsg1();
mozilla::ipc::IPCResult RecvMsg2();
mozilla::ipc::IPCResult RecvMsg3();
mozilla::ipc::IPCResult RecvMsg4();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -40,8 +40,8 @@ class TestHighestPrioChild : public PTestHighestPrioChild {
TestHighestPrioChild();
virtual ~TestHighestPrioChild();
mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStartInner() override;
mozilla::ipc::IPCResult RecvStart();
mozilla::ipc::IPCResult RecvStartInner();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -32,12 +32,14 @@ class TestInterruptErrorCleanupParent
};
class TestInterruptErrorCleanupChild : public PTestInterruptErrorCleanupChild {
friend class PTestInterruptErrorCleanupChild;
public:
TestInterruptErrorCleanupChild();
virtual ~TestInterruptErrorCleanupChild();
protected:
virtual mozilla::ipc::IPCResult AnswerError() override;
mozilla::ipc::IPCResult AnswerError();
virtual void ActorDestroy(ActorDestroyReason why) override {
fail("should have 'crashed'!");

Просмотреть файл

@ -14,6 +14,8 @@ mozilla::ipc::RacyInterruptPolicy MediateRace(
const mozilla::ipc::MessageChannel::MessageInfo& child);
class TestInterruptRacesParent : public PTestInterruptRacesParent {
friend class PTestInterruptRacesParent;
public:
TestInterruptRacesParent()
: mHasReply(false), mChildHasReply(false), mAnsweredParent(false) {}
@ -25,20 +27,19 @@ class TestInterruptRacesParent : public PTestInterruptRacesParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvStartRace() override;
mozilla::ipc::IPCResult RecvStartRace();
virtual mozilla::ipc::IPCResult AnswerRace(bool* hasRace) override;
mozilla::ipc::IPCResult AnswerRace(bool* hasRace);
virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
mozilla::ipc::IPCResult AnswerStackFrame();
virtual mozilla::ipc::IPCResult AnswerStackFrame3() override;
mozilla::ipc::IPCResult AnswerStackFrame3();
virtual mozilla::ipc::IPCResult AnswerParent() override;
mozilla::ipc::IPCResult AnswerParent();
virtual mozilla::ipc::IPCResult RecvGetAnsweredParent(
bool* answeredParent) override;
mozilla::ipc::IPCResult RecvGetAnsweredParent(bool* answeredParent);
virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
const MessageInfo& parent, const MessageInfo& child) override {
return MediateRace(parent, child);
}
@ -62,24 +63,26 @@ class TestInterruptRacesParent : public PTestInterruptRacesParent {
};
class TestInterruptRacesChild : public PTestInterruptRacesChild {
friend class PTestInterruptRacesChild;
public:
TestInterruptRacesChild() : mHasReply(false) {}
virtual ~TestInterruptRacesChild() {}
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual mozilla::ipc::IPCResult AnswerRace(bool* hasRace) override;
mozilla::ipc::IPCResult AnswerRace(bool* hasRace);
virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
mozilla::ipc::IPCResult AnswerStackFrame();
virtual mozilla::ipc::IPCResult AnswerStackFrame3() override;
mozilla::ipc::IPCResult AnswerStackFrame3();
virtual mozilla::ipc::IPCResult RecvWakeup() override;
mozilla::ipc::IPCResult RecvWakeup();
virtual mozilla::ipc::IPCResult RecvWakeup3() override;
mozilla::ipc::IPCResult RecvWakeup3();
virtual mozilla::ipc::IPCResult AnswerChild() override;
mozilla::ipc::IPCResult AnswerChild();
virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
const MessageInfo& parent, const MessageInfo& child) override {

Просмотреть файл

@ -21,9 +21,9 @@ class TestInterruptShutdownRaceParent
void Main();
virtual mozilla::ipc::IPCResult RecvStartDeath() override;
mozilla::ipc::IPCResult RecvStartDeath();
virtual mozilla::ipc::IPCResult RecvOrphan() override;
mozilla::ipc::IPCResult RecvOrphan();
protected:
void StartShuttingDown();
@ -34,14 +34,16 @@ class TestInterruptShutdownRaceParent
};
class TestInterruptShutdownRaceChild : public PTestInterruptShutdownRaceChild {
friend class PTestInterruptShutdownRaceChild;
public:
TestInterruptShutdownRaceChild();
virtual ~TestInterruptShutdownRaceChild();
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual mozilla::ipc::IPCResult AnswerExit() override;
mozilla::ipc::IPCResult AnswerExit();
virtual void ActorDestroy(ActorDestroyReason why) override {
fail("should have 'crashed'!");

Просмотреть файл

@ -22,6 +22,8 @@ class TestHandleParent : public PTestHandleParent {
};
class TestJSONParent : public PTestJSONParent {
friend class PTestJSONParent;
public:
TestJSONParent() {}
virtual ~TestJSONParent() {}
@ -32,14 +34,13 @@ class TestJSONParent : public PTestJSONParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvTest(const JSONVariant& i,
JSONVariant* o) override;
mozilla::ipc::IPCResult RecvTest(const JSONVariant& i, JSONVariant* o);
virtual PTestHandleParent* AllocPTestHandleParent() override {
PTestHandleParent* AllocPTestHandleParent() {
return mKid = new TestHandleParent();
}
virtual bool DeallocPTestHandleParent(PTestHandleParent* actor) override {
bool DeallocPTestHandleParent(PTestHandleParent* actor) {
delete actor;
return true;
}
@ -60,18 +61,20 @@ class TestHandleChild : public PTestHandleChild {
};
class TestJSONChild : public PTestJSONChild {
friend class PTestJSONChild;
public:
TestJSONChild() {}
virtual ~TestJSONChild() {}
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual PTestHandleChild* AllocPTestHandleChild() override {
PTestHandleChild* AllocPTestHandleChild() {
return mKid = new TestHandleChild();
}
virtual bool DeallocPTestHandleChild(PTestHandleChild* actor) override {
bool DeallocPTestHandleChild(PTestHandleChild* actor) {
delete actor;
return true;
}

Просмотреть файл

@ -15,6 +15,8 @@ namespace mozilla {
namespace _ipdltest {
class TestLatencyParent : public PTestLatencyParent {
friend class PTestLatencyParent;
private:
typedef mozilla::TimeStamp TimeStamp;
typedef mozilla::TimeDuration TimeDuration;
@ -29,8 +31,8 @@ class TestLatencyParent : public PTestLatencyParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvPong() override;
virtual mozilla::ipc::IPCResult RecvPong5() override;
mozilla::ipc::IPCResult RecvPong();
mozilla::ipc::IPCResult RecvPong5();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -73,20 +75,21 @@ class TestLatencyParent : public PTestLatencyParent {
};
class TestLatencyChild : public PTestLatencyChild {
friend class PTestLatencyChild;
public:
TestLatencyChild();
virtual ~TestLatencyChild();
protected:
virtual mozilla::ipc::IPCResult RecvPing() override;
virtual mozilla::ipc::IPCResult RecvPing5() override;
virtual mozilla::ipc::IPCResult AnswerRpc() override;
virtual mozilla::ipc::IPCResult RecvSpam() override;
virtual mozilla::ipc::IPCResult AnswerSynchro() override;
virtual mozilla::ipc::IPCResult RecvCompressedSpam(
const uint32_t& seqno) override;
virtual mozilla::ipc::IPCResult AnswerSynchro2(
uint32_t* lastSeqno, uint32_t* numMessagesDispatched) override;
mozilla::ipc::IPCResult RecvPing();
mozilla::ipc::IPCResult RecvPing5();
mozilla::ipc::IPCResult AnswerRpc();
mozilla::ipc::IPCResult RecvSpam();
mozilla::ipc::IPCResult AnswerSynchro();
mozilla::ipc::IPCResult RecvCompressedSpam(const uint32_t& seqno);
mozilla::ipc::IPCResult AnswerSynchro2(uint32_t* lastSeqno,
uint32_t* numMessagesDispatched);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -15,6 +15,8 @@ namespace _ipdltest {
// top-level protocol
class TestManyChildAllocsParent : public PTestManyChildAllocsParent {
friend class PTestManyChildAllocsParent;
public:
TestManyChildAllocsParent();
virtual ~TestManyChildAllocsParent();
@ -25,11 +27,9 @@ class TestManyChildAllocsParent : public PTestManyChildAllocsParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvDone() override;
virtual bool DeallocPTestManyChildAllocsSubParent(
PTestManyChildAllocsSubParent* __a) override;
virtual PTestManyChildAllocsSubParent* AllocPTestManyChildAllocsSubParent()
override;
mozilla::ipc::IPCResult RecvDone();
bool DeallocPTestManyChildAllocsSubParent(PTestManyChildAllocsSubParent* __a);
PTestManyChildAllocsSubParent* AllocPTestManyChildAllocsSubParent();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -39,16 +39,16 @@ class TestManyChildAllocsParent : public PTestManyChildAllocsParent {
};
class TestManyChildAllocsChild : public PTestManyChildAllocsChild {
friend class PTestManyChildAllocsChild;
public:
TestManyChildAllocsChild();
virtual ~TestManyChildAllocsChild();
protected:
virtual mozilla::ipc::IPCResult RecvGo() override;
virtual bool DeallocPTestManyChildAllocsSubChild(
PTestManyChildAllocsSubChild* __a) override;
virtual PTestManyChildAllocsSubChild* AllocPTestManyChildAllocsSubChild()
override;
mozilla::ipc::IPCResult RecvGo();
bool DeallocPTestManyChildAllocsSubChild(PTestManyChildAllocsSubChild* __a);
PTestManyChildAllocsSubChild* AllocPTestManyChildAllocsSubChild();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -59,13 +59,15 @@ class TestManyChildAllocsChild : public PTestManyChildAllocsChild {
// do-nothing sub-protocol actors
class TestManyChildAllocsSubParent : public PTestManyChildAllocsSubParent {
friend class PTestManyChildAllocsSubParent;
public:
TestManyChildAllocsSubParent() {}
virtual ~TestManyChildAllocsSubParent() {}
protected:
virtual void ActorDestroy(ActorDestroyReason why) override {}
virtual mozilla::ipc::IPCResult RecvHello() override { return IPC_OK(); }
mozilla::ipc::IPCResult RecvHello() { return IPC_OK(); }
};
class TestManyChildAllocsSubChild : public PTestManyChildAllocsSubChild {

Просмотреть файл

@ -29,6 +29,8 @@ class TestMultiMgrsBottomParent : public PTestMultiMgrsBottomParent {
};
class TestMultiMgrsLeftParent : public PTestMultiMgrsLeftParent {
friend class PTestMultiMgrsLeftParent;
public:
TestMultiMgrsLeftParent() {}
virtual ~TestMultiMgrsLeftParent() {}
@ -40,19 +42,19 @@ class TestMultiMgrsLeftParent : public PTestMultiMgrsLeftParent {
protected:
virtual void ActorDestroy(ActorDestroyReason why) override {}
virtual PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottomParent()
override {
PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottomParent() {
return new TestMultiMgrsBottomParent();
}
virtual bool DeallocPTestMultiMgrsBottomParent(
PTestMultiMgrsBottomParent* actor) override {
bool DeallocPTestMultiMgrsBottomParent(PTestMultiMgrsBottomParent* actor) {
delete actor;
return true;
}
};
class TestMultiMgrsRightParent : public PTestMultiMgrsRightParent {
friend class PTestMultiMgrsRightParent;
public:
TestMultiMgrsRightParent() {}
virtual ~TestMultiMgrsRightParent() {}
@ -64,19 +66,19 @@ class TestMultiMgrsRightParent : public PTestMultiMgrsRightParent {
protected:
virtual void ActorDestroy(ActorDestroyReason why) override {}
virtual PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottomParent()
override {
PTestMultiMgrsBottomParent* AllocPTestMultiMgrsBottomParent() {
return new TestMultiMgrsBottomParent();
}
virtual bool DeallocPTestMultiMgrsBottomParent(
PTestMultiMgrsBottomParent* actor) override {
bool DeallocPTestMultiMgrsBottomParent(PTestMultiMgrsBottomParent* actor) {
delete actor;
return true;
}
};
class TestMultiMgrsParent : public PTestMultiMgrsParent {
friend class PTestMultiMgrsParent;
public:
TestMultiMgrsParent() {}
virtual ~TestMultiMgrsParent() {}
@ -87,24 +89,22 @@ class TestMultiMgrsParent : public PTestMultiMgrsParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvOK() override;
mozilla::ipc::IPCResult RecvOK();
virtual PTestMultiMgrsLeftParent* AllocPTestMultiMgrsLeftParent() override {
PTestMultiMgrsLeftParent* AllocPTestMultiMgrsLeftParent() {
return new TestMultiMgrsLeftParent();
}
virtual bool DeallocPTestMultiMgrsLeftParent(
PTestMultiMgrsLeftParent* actor) override {
bool DeallocPTestMultiMgrsLeftParent(PTestMultiMgrsLeftParent* actor) {
delete actor;
return true;
}
virtual PTestMultiMgrsRightParent* AllocPTestMultiMgrsRightParent() override {
PTestMultiMgrsRightParent* AllocPTestMultiMgrsRightParent() {
return new TestMultiMgrsRightParent();
}
virtual bool DeallocPTestMultiMgrsRightParent(
PTestMultiMgrsRightParent* actor) override {
bool DeallocPTestMultiMgrsRightParent(PTestMultiMgrsRightParent* actor) {
delete actor;
return true;
}
@ -127,6 +127,8 @@ class TestMultiMgrsBottomChild : public PTestMultiMgrsBottomChild {
};
class TestMultiMgrsLeftChild : public PTestMultiMgrsLeftChild {
friend class PTestMultiMgrsLeftChild;
public:
TestMultiMgrsLeftChild() {}
virtual ~TestMultiMgrsLeftChild() {}
@ -139,18 +141,19 @@ class TestMultiMgrsLeftChild : public PTestMultiMgrsLeftChild {
virtual mozilla::ipc::IPCResult RecvPTestMultiMgrsBottomConstructor(
PTestMultiMgrsBottomChild* actor) override;
virtual PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottomChild() override {
PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottomChild() {
return new TestMultiMgrsBottomChild();
}
virtual bool DeallocPTestMultiMgrsBottomChild(
PTestMultiMgrsBottomChild* actor) override {
bool DeallocPTestMultiMgrsBottomChild(PTestMultiMgrsBottomChild* actor) {
delete actor;
return true;
}
};
class TestMultiMgrsRightChild : public PTestMultiMgrsRightChild {
friend class PTestMultiMgrsRightChild;
public:
TestMultiMgrsRightChild() {}
virtual ~TestMultiMgrsRightChild() {}
@ -163,18 +166,19 @@ class TestMultiMgrsRightChild : public PTestMultiMgrsRightChild {
virtual mozilla::ipc::IPCResult RecvPTestMultiMgrsBottomConstructor(
PTestMultiMgrsBottomChild* actor) override;
virtual PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottomChild() override {
PTestMultiMgrsBottomChild* AllocPTestMultiMgrsBottomChild() {
return new TestMultiMgrsBottomChild();
}
virtual bool DeallocPTestMultiMgrsBottomChild(
PTestMultiMgrsBottomChild* actor) override {
bool DeallocPTestMultiMgrsBottomChild(PTestMultiMgrsBottomChild* actor) {
delete actor;
return true;
}
};
class TestMultiMgrsChild : public PTestMultiMgrsChild {
friend class PTestMultiMgrsChild;
public:
TestMultiMgrsChild() {}
virtual ~TestMultiMgrsChild() {}
@ -185,24 +189,22 @@ class TestMultiMgrsChild : public PTestMultiMgrsChild {
PTestMultiMgrsBottomChild* mBottomR;
protected:
virtual mozilla::ipc::IPCResult RecvCheck() override;
mozilla::ipc::IPCResult RecvCheck();
virtual PTestMultiMgrsLeftChild* AllocPTestMultiMgrsLeftChild() override {
PTestMultiMgrsLeftChild* AllocPTestMultiMgrsLeftChild() {
return new TestMultiMgrsLeftChild();
}
virtual bool DeallocPTestMultiMgrsLeftChild(
PTestMultiMgrsLeftChild* actor) override {
bool DeallocPTestMultiMgrsLeftChild(PTestMultiMgrsLeftChild* actor) {
delete actor;
return true;
}
virtual PTestMultiMgrsRightChild* AllocPTestMultiMgrsRightChild() override {
PTestMultiMgrsRightChild* AllocPTestMultiMgrsRightChild() {
return new TestMultiMgrsRightChild();
}
virtual bool DeallocPTestMultiMgrsRightChild(
PTestMultiMgrsRightChild* actor) override {
bool DeallocPTestMultiMgrsRightChild(PTestMultiMgrsRightChild* actor) {
delete actor;
return true;
}

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestNestedLoopsParent : public PTestNestedLoopsParent {
friend class PTestNestedLoopsParent;
public:
TestNestedLoopsParent();
virtual ~TestNestedLoopsParent();
@ -20,7 +22,7 @@ class TestNestedLoopsParent : public PTestNestedLoopsParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvNonce() override;
mozilla::ipc::IPCResult RecvNonce();
void BreakNestedLoop();
@ -34,14 +36,16 @@ class TestNestedLoopsParent : public PTestNestedLoopsParent {
};
class TestNestedLoopsChild : public PTestNestedLoopsChild {
friend class PTestNestedLoopsChild;
public:
TestNestedLoopsChild();
virtual ~TestNestedLoopsChild();
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual mozilla::ipc::IPCResult AnswerR() override;
mozilla::ipc::IPCResult AnswerR();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -26,10 +26,10 @@ class TestOffMainThreadPaintingParent final : public PTestLayoutThreadParent {
MOZ_IMPLICIT TestOffMainThreadPaintingParent();
~TestOffMainThreadPaintingParent() override;
ipc::IPCResult RecvFinishedLayout(const uint64_t& aTxnId) override;
ipc::IPCResult RecvAsyncMessage(const uint64_t& aTxnId) override;
ipc::IPCResult RecvSyncMessage(const uint64_t& aTxnId) override;
ipc::IPCResult RecvEndTest() override;
ipc::IPCResult RecvFinishedLayout(const uint64_t& aTxnId);
ipc::IPCResult RecvAsyncMessage(const uint64_t& aTxnId);
ipc::IPCResult RecvSyncMessage(const uint64_t& aTxnId);
ipc::IPCResult RecvEndTest();
void ActorDestroy(ActorDestroyReason aWhy) override;
void NotifyFinishedPaint(const uint64_t& aTxnId);
@ -49,7 +49,7 @@ class TestOffMainThreadPaintingChild final : public PTestLayoutThreadChild {
~TestOffMainThreadPaintingChild() override;
ipc::IPCResult RecvStartTest(
ipc::Endpoint<PTestPaintThreadChild>&& aEndpoint) override;
ipc::Endpoint<PTestPaintThreadChild>&& aEndpoint);
void ActorDestroy(ActorDestroyReason aWhy) override;
void ProcessingError(Result aCode, const char* aReason) override;
@ -73,7 +73,7 @@ class TestPaintThreadParent final : public PTestPaintThreadParent {
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(TestPaintThreadParent);
bool Bind(ipc::Endpoint<PTestPaintThreadParent>&& aEndpoint);
ipc::IPCResult RecvFinishedPaint(const uint64_t& aTxnId) override;
ipc::IPCResult RecvFinishedPaint(const uint64_t& aTxnId);
void ActorDestroy(ActorDestroyReason aWhy) override;
void DeallocPTestPaintThreadParent() override;

Просмотреть файл

@ -19,10 +19,10 @@ class TestRPCParent : public PTestRPCParent {
void Main();
mozilla::ipc::IPCResult RecvTest1_Start(uint32_t* aResult) override;
mozilla::ipc::IPCResult RecvTest1_InnerEvent(uint32_t* aResult) override;
mozilla::ipc::IPCResult RecvTest2_Start() override;
mozilla::ipc::IPCResult RecvTest2_OutOfOrder() override;
mozilla::ipc::IPCResult RecvTest1_Start(uint32_t* aResult);
mozilla::ipc::IPCResult RecvTest1_InnerEvent(uint32_t* aResult);
mozilla::ipc::IPCResult RecvTest2_Start();
mozilla::ipc::IPCResult RecvTest2_OutOfOrder();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -42,11 +42,11 @@ class TestRPCChild : public PTestRPCChild {
TestRPCChild();
virtual ~TestRPCChild();
mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvTest1_InnerQuery(uint32_t* aResult) override;
mozilla::ipc::IPCResult RecvTest1_NoReenter(uint32_t* aResult) override;
mozilla::ipc::IPCResult RecvTest2_FirstUrgent() override;
mozilla::ipc::IPCResult RecvTest2_SecondUrgent() override;
mozilla::ipc::IPCResult RecvStart();
mozilla::ipc::IPCResult RecvTest1_InnerQuery(uint32_t* aResult);
mozilla::ipc::IPCResult RecvTest1_NoReenter(uint32_t* aResult);
mozilla::ipc::IPCResult RecvTest2_FirstUrgent();
mozilla::ipc::IPCResult RecvTest2_SecondUrgent();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestRaceDeadlockParent : public PTestRaceDeadlockParent {
friend class PTestRaceDeadlockParent;
public:
TestRaceDeadlockParent();
virtual ~TestRaceDeadlockParent();
@ -24,8 +26,8 @@ class TestRaceDeadlockParent : public PTestRaceDeadlockParent {
void Test1();
virtual mozilla::ipc::IPCResult RecvStartRace() override;
virtual mozilla::ipc::IPCResult AnswerLose() override;
mozilla::ipc::IPCResult RecvStartRace();
mozilla::ipc::IPCResult AnswerLose();
virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
const MessageInfo& parent, const MessageInfo& child) override;
@ -38,16 +40,18 @@ class TestRaceDeadlockParent : public PTestRaceDeadlockParent {
};
class TestRaceDeadlockChild : public PTestRaceDeadlockChild {
friend class PTestRaceDeadlockChild;
public:
TestRaceDeadlockChild();
virtual ~TestRaceDeadlockChild();
protected:
virtual mozilla::ipc::IPCResult RecvStartRace() override;
mozilla::ipc::IPCResult RecvStartRace();
virtual mozilla::ipc::IPCResult AnswerWin() override;
mozilla::ipc::IPCResult AnswerWin();
virtual mozilla::ipc::IPCResult AnswerRpc() override;
mozilla::ipc::IPCResult AnswerRpc();
virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
const MessageInfo& parent, const MessageInfo& child) override;

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestRaceDeferralParent : public PTestRaceDeferralParent {
friend class PTestRaceDeferralParent;
public:
TestRaceDeferralParent();
virtual ~TestRaceDeferralParent();
@ -22,7 +24,7 @@ class TestRaceDeferralParent : public PTestRaceDeferralParent {
protected:
void Test1();
virtual mozilla::ipc::IPCResult AnswerLose() override;
mozilla::ipc::IPCResult AnswerLose();
virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
const MessageInfo& parent, const MessageInfo& child) override;
@ -37,16 +39,18 @@ class TestRaceDeferralParent : public PTestRaceDeferralParent {
};
class TestRaceDeferralChild : public PTestRaceDeferralChild {
friend class PTestRaceDeferralChild;
public:
TestRaceDeferralChild();
virtual ~TestRaceDeferralChild();
protected:
virtual mozilla::ipc::IPCResult RecvStartRace() override;
mozilla::ipc::IPCResult RecvStartRace();
virtual mozilla::ipc::IPCResult AnswerWin() override;
mozilla::ipc::IPCResult AnswerWin();
virtual mozilla::ipc::IPCResult AnswerRpc() override;
mozilla::ipc::IPCResult AnswerRpc();
virtual mozilla::ipc::RacyInterruptPolicy MediateInterruptRace(
const MessageInfo& parent, const MessageInfo& child) override;

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestRacyInterruptRepliesParent : public PTestRacyInterruptRepliesParent {
friend class PTestRacyInterruptRepliesParent;
public:
TestRacyInterruptRepliesParent();
virtual ~TestRacyInterruptRepliesParent();
@ -20,9 +22,9 @@ class TestRacyInterruptRepliesParent : public PTestRacyInterruptRepliesParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvA_() override;
mozilla::ipc::IPCResult RecvA_();
virtual mozilla::ipc::IPCResult Answer_R(int* replyNum) override;
mozilla::ipc::IPCResult Answer_R(int* replyNum);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -35,16 +37,18 @@ class TestRacyInterruptRepliesParent : public PTestRacyInterruptRepliesParent {
};
class TestRacyInterruptRepliesChild : public PTestRacyInterruptRepliesChild {
friend class PTestRacyInterruptRepliesChild;
public:
TestRacyInterruptRepliesChild();
virtual ~TestRacyInterruptRepliesChild();
protected:
virtual mozilla::ipc::IPCResult AnswerR_(int* replyNum) override;
mozilla::ipc::IPCResult AnswerR_(int* replyNum);
virtual mozilla::ipc::IPCResult RecvChildTest() override;
mozilla::ipc::IPCResult RecvChildTest();
virtual mozilla::ipc::IPCResult Recv_A() override;
mozilla::ipc::IPCResult Recv_A();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestRacyReentryParent : public PTestRacyReentryParent {
friend class PTestRacyReentryParent;
public:
TestRacyReentryParent();
virtual ~TestRacyReentryParent();
@ -20,7 +22,7 @@ class TestRacyReentryParent : public PTestRacyReentryParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult AnswerE() override;
mozilla::ipc::IPCResult AnswerE();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -32,16 +34,18 @@ class TestRacyReentryParent : public PTestRacyReentryParent {
};
class TestRacyReentryChild : public PTestRacyReentryChild {
friend class PTestRacyReentryChild;
public:
TestRacyReentryChild();
virtual ~TestRacyReentryChild();
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual mozilla::ipc::IPCResult RecvN() override;
mozilla::ipc::IPCResult RecvN();
virtual mozilla::ipc::IPCResult AnswerH() override;
mozilla::ipc::IPCResult AnswerH();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestRacyUndeferParent : public PTestRacyUndeferParent {
friend class PTestRacyUndeferParent;
public:
TestRacyUndeferParent();
virtual ~TestRacyUndeferParent();
@ -20,11 +22,11 @@ class TestRacyUndeferParent : public PTestRacyUndeferParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult AnswerSpam() override;
mozilla::ipc::IPCResult AnswerSpam();
virtual mozilla::ipc::IPCResult AnswerRaceWinTwice() override;
mozilla::ipc::IPCResult AnswerRaceWinTwice();
virtual mozilla::ipc::IPCResult RecvDone() override;
mozilla::ipc::IPCResult RecvDone();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -34,17 +36,19 @@ class TestRacyUndeferParent : public PTestRacyUndeferParent {
};
class TestRacyUndeferChild : public PTestRacyUndeferChild {
friend class PTestRacyUndeferChild;
public:
TestRacyUndeferChild();
virtual ~TestRacyUndeferChild();
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual mozilla::ipc::IPCResult RecvAwakenSpam() override;
virtual mozilla::ipc::IPCResult RecvAwakenRaceWinTwice() override;
mozilla::ipc::IPCResult RecvAwakenSpam();
mozilla::ipc::IPCResult RecvAwakenRaceWinTwice();
virtual mozilla::ipc::IPCResult AnswerRace() override;
mozilla::ipc::IPCResult AnswerRace();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestSanityParent : public PTestSanityParent {
friend class PTestSanityParent;
public:
TestSanityParent();
virtual ~TestSanityParent();
@ -20,9 +22,8 @@ class TestSanityParent : public PTestSanityParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvPong(const int& one,
const float& zeroPtTwoFive,
const uint8_t& dummy) override;
mozilla::ipc::IPCResult RecvPong(const int& one, const float& zeroPtTwoFive,
const uint8_t& dummy);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -32,14 +33,15 @@ class TestSanityParent : public PTestSanityParent {
};
class TestSanityChild : public PTestSanityChild {
friend class PTestSanityChild;
public:
TestSanityChild();
virtual ~TestSanityChild();
protected:
virtual mozilla::ipc::IPCResult RecvPing(const int& zero,
const float& zeroPtFive,
const int8_t& dummy) override;
mozilla::ipc::IPCResult RecvPing(const int& zero, const float& zeroPtFive,
const int8_t& dummy);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -15,6 +15,8 @@ namespace _ipdltest {
// Parent side
class TestSelfManageParent : public PTestSelfManageParent {
friend class PTestSelfManageParent;
public:
TestSelfManageParent() { MOZ_COUNT_CTOR(TestSelfManageParent); }
virtual ~TestSelfManageParent() { MOZ_COUNT_DTOR(TestSelfManageParent); }
@ -22,18 +24,18 @@ class TestSelfManageParent : public PTestSelfManageParent {
ActorDestroyReason mWhy;
protected:
virtual PTestSelfManageParent* AllocPTestSelfManageParent() override {
PTestSelfManageParent* AllocPTestSelfManageParent() {
return new TestSelfManageParent();
}
virtual bool DeallocPTestSelfManageParent(PTestSelfManageParent* a) override {
return true;
}
bool DeallocPTestSelfManageParent(PTestSelfManageParent* a) { return true; }
virtual void ActorDestroy(ActorDestroyReason why) override { mWhy = why; }
};
class TestSelfManageRootParent : public PTestSelfManageRootParent {
friend class PTestSelfManageRootParent;
public:
TestSelfManageRootParent() { MOZ_COUNT_CTOR(TestSelfManageRootParent); }
virtual ~TestSelfManageRootParent() {
@ -46,13 +48,11 @@ class TestSelfManageRootParent : public PTestSelfManageRootParent {
void Main();
protected:
virtual PTestSelfManageParent* AllocPTestSelfManageParent() override {
PTestSelfManageParent* AllocPTestSelfManageParent() {
return new TestSelfManageParent();
}
virtual bool DeallocPTestSelfManageParent(PTestSelfManageParent* a) override {
return true;
}
bool DeallocPTestSelfManageParent(PTestSelfManageParent* a) { return true; }
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -65,16 +65,18 @@ class TestSelfManageRootParent : public PTestSelfManageRootParent {
// Child side
class TestSelfManageChild : public PTestSelfManageChild {
friend class PTestSelfManageChild;
public:
TestSelfManageChild() { MOZ_COUNT_CTOR(TestSelfManageChild); }
virtual ~TestSelfManageChild() { MOZ_COUNT_DTOR(TestSelfManageChild); }
protected:
virtual PTestSelfManageChild* AllocPTestSelfManageChild() override {
PTestSelfManageChild* AllocPTestSelfManageChild() {
return new TestSelfManageChild();
}
virtual bool DeallocPTestSelfManageChild(PTestSelfManageChild* a) override {
bool DeallocPTestSelfManageChild(PTestSelfManageChild* a) {
delete a;
return true;
}
@ -83,6 +85,8 @@ class TestSelfManageChild : public PTestSelfManageChild {
};
class TestSelfManageRootChild : public PTestSelfManageRootChild {
friend class PTestSelfManageRootChild;
public:
TestSelfManageRootChild() { MOZ_COUNT_CTOR(TestSelfManageRootChild); }
virtual ~TestSelfManageRootChild() {
@ -92,11 +96,11 @@ class TestSelfManageRootChild : public PTestSelfManageRootChild {
void Main();
protected:
virtual PTestSelfManageChild* AllocPTestSelfManageChild() override {
PTestSelfManageChild* AllocPTestSelfManageChild() {
return new TestSelfManageChild();
}
virtual bool DeallocPTestSelfManageChild(PTestSelfManageChild* a) override {
bool DeallocPTestSelfManageChild(PTestSelfManageChild* a) {
delete a;
return true;
}

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestShmemParent : public PTestShmemParent {
friend class PTestShmemParent;
public:
TestShmemParent() {}
virtual ~TestShmemParent() {}
@ -20,8 +22,8 @@ class TestShmemParent : public PTestShmemParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvTake(Shmem&& mem, Shmem&& unsafe,
const size_t& expectedSize) override;
mozilla::ipc::IPCResult RecvTake(Shmem&& mem, Shmem&& unsafe,
const size_t& expectedSize);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -31,13 +33,15 @@ class TestShmemParent : public PTestShmemParent {
};
class TestShmemChild : public PTestShmemChild {
friend class PTestShmemChild;
public:
TestShmemChild() {}
virtual ~TestShmemChild() {}
protected:
virtual mozilla::ipc::IPCResult RecvGive(Shmem&& mem, Shmem&& unsafe,
const size_t& expectedSize) override;
mozilla::ipc::IPCResult RecvGive(Shmem&& mem, Shmem&& unsafe,
const size_t& expectedSize);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -33,6 +33,8 @@ class TestShutdownSubsubParent : public PTestShutdownSubsubParent {
};
class TestShutdownSubParent : public PTestShutdownSubParent {
friend class PTestShutdownSubParent;
public:
explicit TestShutdownSubParent(bool expectCrash)
: mExpectCrash(expectCrash), mDeletedCount(0) {}
@ -42,20 +44,19 @@ class TestShutdownSubParent : public PTestShutdownSubParent {
}
protected:
virtual mozilla::ipc::IPCResult AnswerStackFrame() override {
mozilla::ipc::IPCResult AnswerStackFrame() {
if (!CallStackFrame()) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
virtual PTestShutdownSubsubParent* AllocPTestShutdownSubsubParent(
const bool& expectParentDelete) override {
PTestShutdownSubsubParent* AllocPTestShutdownSubsubParent(
const bool& expectParentDelete) {
return new TestShutdownSubsubParent(expectParentDelete);
}
virtual bool DeallocPTestShutdownSubsubParent(
PTestShutdownSubsubParent* actor) override {
bool DeallocPTestShutdownSubsubParent(PTestShutdownSubsubParent* actor) {
delete actor;
++mDeletedCount;
return true;
@ -69,6 +70,8 @@ class TestShutdownSubParent : public PTestShutdownSubParent {
};
class TestShutdownParent : public PTestShutdownParent {
friend class PTestShutdownParent;
public:
TestShutdownParent() {}
virtual ~TestShutdownParent() {}
@ -80,15 +83,13 @@ class TestShutdownParent : public PTestShutdownParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvSync() override { return IPC_OK(); }
mozilla::ipc::IPCResult RecvSync() { return IPC_OK(); }
virtual PTestShutdownSubParent* AllocPTestShutdownSubParent(
const bool& expectCrash) override {
PTestShutdownSubParent* AllocPTestShutdownSubParent(const bool& expectCrash) {
return new TestShutdownSubParent(expectCrash);
}
virtual bool DeallocPTestShutdownSubParent(
PTestShutdownSubParent* actor) override {
bool DeallocPTestShutdownSubParent(PTestShutdownSubParent* actor) {
delete actor;
return true;
}
@ -113,21 +114,22 @@ class TestShutdownSubsubChild : public PTestShutdownSubsubChild {
};
class TestShutdownSubChild : public PTestShutdownSubChild {
friend class PTestShutdownSubChild;
public:
explicit TestShutdownSubChild(bool expectCrash) : mExpectCrash(expectCrash) {}
virtual ~TestShutdownSubChild() {}
protected:
virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
mozilla::ipc::IPCResult AnswerStackFrame();
virtual PTestShutdownSubsubChild* AllocPTestShutdownSubsubChild(
const bool& expectParentDelete) override {
PTestShutdownSubsubChild* AllocPTestShutdownSubsubChild(
const bool& expectParentDelete) {
return new TestShutdownSubsubChild(expectParentDelete);
}
virtual bool DeallocPTestShutdownSubsubChild(
PTestShutdownSubsubChild* actor) override {
bool DeallocPTestShutdownSubsubChild(PTestShutdownSubsubChild* actor) {
delete actor;
return true;
}
@ -139,20 +141,20 @@ class TestShutdownSubChild : public PTestShutdownSubChild {
};
class TestShutdownChild : public PTestShutdownChild {
friend class PTestShutdownChild;
public:
TestShutdownChild() {}
virtual ~TestShutdownChild() {}
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual PTestShutdownSubChild* AllocPTestShutdownSubChild(
const bool& expectCrash) override {
PTestShutdownSubChild* AllocPTestShutdownSubChild(const bool& expectCrash) {
return new TestShutdownSubChild(expectCrash);
}
virtual bool DeallocPTestShutdownSubChild(
PTestShutdownSubChild* actor) override {
bool DeallocPTestShutdownSubChild(PTestShutdownSubChild* actor) {
delete actor;
return true;
}

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestStackHooksParent : public PTestStackHooksParent {
friend class PTestStackHooksParent;
public:
TestStackHooksParent();
virtual ~TestStackHooksParent();
@ -20,22 +22,22 @@ class TestStackHooksParent : public PTestStackHooksParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvAsync() override {
mozilla::ipc::IPCResult RecvAsync() {
if (!mOnStack) fail("not on C++ stack?!");
return IPC_OK();
}
virtual mozilla::ipc::IPCResult RecvSync() override {
mozilla::ipc::IPCResult RecvSync() {
if (!mOnStack) fail("not on C++ stack?!");
return IPC_OK();
}
virtual mozilla::ipc::IPCResult AnswerRpc() override {
mozilla::ipc::IPCResult AnswerRpc() {
if (!mOnStack) fail("not on C++ stack?!");
return IPC_OK();
}
virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
mozilla::ipc::IPCResult AnswerStackFrame();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -55,6 +57,8 @@ class TestStackHooksParent : public PTestStackHooksParent {
};
class TestStackHooksChild : public PTestStackHooksChild {
friend class PTestStackHooksChild;
public:
TestStackHooksChild();
virtual ~TestStackHooksChild();
@ -62,9 +66,9 @@ class TestStackHooksChild : public PTestStackHooksChild {
void RunTests();
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
mozilla::ipc::IPCResult AnswerStackFrame();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestSyncErrorParent : public PTestSyncErrorParent {
friend class PTestSyncErrorParent;
public:
TestSyncErrorParent();
virtual ~TestSyncErrorParent();
@ -20,7 +22,7 @@ class TestSyncErrorParent : public PTestSyncErrorParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult RecvError() override;
mozilla::ipc::IPCResult RecvError();
virtual void ProcessingError(Result aCode, const char* aReason) override {
// Ignore errors
@ -34,12 +36,14 @@ class TestSyncErrorParent : public PTestSyncErrorParent {
};
class TestSyncErrorChild : public PTestSyncErrorChild {
friend class PTestSyncErrorChild;
public:
TestSyncErrorChild();
virtual ~TestSyncErrorChild();
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual void ProcessingError(Result aCode, const char* aReason) override {
// Ignore errors

Просмотреть файл

@ -29,12 +29,14 @@ class TestSyncHangParent : public PTestSyncHangParent {
};
class TestSyncHangChild : public PTestSyncHangChild {
friend class PTestSyncHangChild;
public:
TestSyncHangChild();
virtual ~TestSyncHangChild();
protected:
virtual mozilla::ipc::IPCResult RecvUnusedMessage() override;
mozilla::ipc::IPCResult RecvUnusedMessage();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -10,6 +10,8 @@ namespace mozilla {
namespace _ipdltest {
class TestSyncWakeupParent : public PTestSyncWakeupParent {
friend class PTestSyncWakeupParent;
public:
TestSyncWakeupParent();
virtual ~TestSyncWakeupParent();
@ -20,11 +22,11 @@ class TestSyncWakeupParent : public PTestSyncWakeupParent {
void Main();
protected:
virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
mozilla::ipc::IPCResult AnswerStackFrame();
virtual mozilla::ipc::IPCResult RecvSync1() override;
mozilla::ipc::IPCResult RecvSync1();
virtual mozilla::ipc::IPCResult RecvSync2() override;
mozilla::ipc::IPCResult RecvSync2();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");
@ -34,18 +36,20 @@ class TestSyncWakeupParent : public PTestSyncWakeupParent {
};
class TestSyncWakeupChild : public PTestSyncWakeupChild {
friend class PTestSyncWakeupChild;
public:
TestSyncWakeupChild();
virtual ~TestSyncWakeupChild();
protected:
virtual mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvStart();
virtual mozilla::ipc::IPCResult RecvNote1() override;
mozilla::ipc::IPCResult RecvNote1();
virtual mozilla::ipc::IPCResult AnswerStackFrame() override;
mozilla::ipc::IPCResult AnswerStackFrame();
virtual mozilla::ipc::IPCResult RecvNote2() override;
mozilla::ipc::IPCResult RecvNote2();
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) fail("unexpected destruction!");

Просмотреть файл

@ -43,10 +43,9 @@ class TestUniquePtrIPCChild : public PTestUniquePtrIPCChild {
mozilla::ipc::IPCResult RecvTestMessage(UniquePtr<int>&& aA1,
UniquePtr<DummyStruct>&& aA2,
const DummyStruct& aA3,
UniquePtr<int>&& aA4) override;
UniquePtr<int>&& aA4);
mozilla::ipc::IPCResult RecvTestSendReference(
UniquePtr<DummyStruct>&& aA) override;
mozilla::ipc::IPCResult RecvTestSendReference(UniquePtr<DummyStruct>&& aA);
virtual void ActorDestroy(ActorDestroyReason why) override {
if (NormalShutdown != why) {

Просмотреть файл

@ -19,12 +19,12 @@ class TestUrgencyParent : public PTestUrgencyParent {
void Main();
mozilla::ipc::IPCResult RecvTest1(uint32_t *value) override;
mozilla::ipc::IPCResult RecvTest2() override;
mozilla::ipc::IPCResult RecvTest3(uint32_t *value) override;
mozilla::ipc::IPCResult RecvTest1(uint32_t *value);
mozilla::ipc::IPCResult RecvTest2();
mozilla::ipc::IPCResult RecvTest3(uint32_t *value);
mozilla::ipc::IPCResult RecvTest4_Begin();
mozilla::ipc::IPCResult RecvTest4_NestedSync();
mozilla::ipc::IPCResult RecvFinalTest_Begin() override;
mozilla::ipc::IPCResult RecvFinalTest_Begin();
bool ShouldContinueFromReplyTimeout() override { return false; }
virtual void ActorDestroy(ActorDestroyReason why) override {
@ -41,9 +41,9 @@ class TestUrgencyChild : public PTestUrgencyChild {
TestUrgencyChild();
virtual ~TestUrgencyChild();
mozilla::ipc::IPCResult RecvStart() override;
mozilla::ipc::IPCResult RecvReply1(uint32_t *reply) override;
mozilla::ipc::IPCResult RecvReply2(uint32_t *reply) override;
mozilla::ipc::IPCResult RecvStart();
mozilla::ipc::IPCResult RecvReply1(uint32_t *reply);
mozilla::ipc::IPCResult RecvReply2(uint32_t *reply);
virtual void ActorDestroy(ActorDestroyReason why) override { QuitChild(); }

Просмотреть файл

@ -21,9 +21,9 @@ class TestUrgentHangsParent : public PTestUrgentHangsParent {
void SecondStage();
void ThirdStage();
mozilla::ipc::IPCResult RecvTest1_2() override;
mozilla::ipc::IPCResult RecvTestInner() override;
mozilla::ipc::IPCResult RecvTestInnerUrgent() override;
mozilla::ipc::IPCResult RecvTest1_2();
mozilla::ipc::IPCResult RecvTestInner();
mozilla::ipc::IPCResult RecvTestInnerUrgent();
bool ShouldContinueFromReplyTimeout() override { return false; }
virtual void ActorDestroy(ActorDestroyReason why) override {
@ -46,14 +46,14 @@ class TestUrgentHangsChild : public PTestUrgentHangsChild {
TestUrgentHangsChild();
virtual ~TestUrgentHangsChild();
mozilla::ipc::IPCResult RecvTest1_1() override;
mozilla::ipc::IPCResult RecvTest1_3() override;
mozilla::ipc::IPCResult RecvTest2() override;
mozilla::ipc::IPCResult RecvTest3() override;
mozilla::ipc::IPCResult RecvTest4() override;
mozilla::ipc::IPCResult RecvTest4_1() override;
mozilla::ipc::IPCResult RecvTest5() override;
mozilla::ipc::IPCResult RecvTest5_1() override;
mozilla::ipc::IPCResult RecvTest1_1();
mozilla::ipc::IPCResult RecvTest1_3();
mozilla::ipc::IPCResult RecvTest2();
mozilla::ipc::IPCResult RecvTest3();
mozilla::ipc::IPCResult RecvTest4();
mozilla::ipc::IPCResult RecvTest4_1();
mozilla::ipc::IPCResult RecvTest5();
mozilla::ipc::IPCResult RecvTest5_1();
virtual void ActorDestroy(ActorDestroyReason why) override { QuitChild(); }
};

Просмотреть файл

@ -11,6 +11,45 @@ EXPORTS.mozilla._ipdltest += [
'IPDLUnitTests.h',
'IPDLUnitTestTypes.h',
'IPDLUnitTestUtils.h',
'TestActorPunning.h',
'TestAsyncReturns.h',
'TestBadActor.h',
'TestCancel.h',
'TestCrashCleanup.h',
'TestDataStructures.h',
'TestDemon.h',
'TestDesc.h',
'TestEndpointBridgeMain.h',
'TestEndpointOpens.h',
'TestFailedCtor.h',
'TestHangs.h',
'TestHighestPrio.h',
'TestInterruptErrorCleanup.h',
'TestInterruptRaces.h',
'TestInterruptShutdownRace.h',
'TestJSON.h',
'TestLatency.h',
'TestManyChildAllocs.h',
'TestMultiMgrs.h',
'TestNestedLoops.h',
'TestOffMainThreadPainting.h',
'TestRaceDeadlock.h',
'TestRaceDeferral.h',
'TestRacyInterruptReplies.h',
'TestRacyReentry.h',
'TestRacyUndefer.h',
'TestRPC.h',
'TestSanity.h',
'TestSelfManageRoot.h',
'TestShmem.h',
'TestShutdown.h',
'TestStackHooks.h',
'TestSyncError.h',
'TestSyncHang.h',
'TestSyncWakeup.h',
'TestUniquePtrIPC.h',
'TestUrgency.h',
'TestUrgentHangs.h',
]
SOURCES += [

Просмотреть файл

@ -1,6 +1,6 @@
//error: `nullable' qualifier for type `int' makes no sense
protocol Nullable {
protocol PNullable {
child:
async Msg(nullable int i);
};

Просмотреть файл

@ -0,0 +1,6 @@
//error: IPC message PasyncMessageListed::Msg is async, can be delisted
protocol PasyncMessageListed {
parent:
async Msg();
};

Просмотреть файл

@ -1,6 +0,0 @@
//error: IPC message asyncMessageListed::Msg is async, can be delisted
protocol asyncMessageListed {
parent:
async Msg();
};

Просмотреть файл

@ -1,8 +0,0 @@
include protocol DeleteSub;
sync protocol Delete {
manages DeleteSub;
child:
async DeleteSub();
};

Просмотреть файл

@ -1,10 +0,0 @@
include protocol Delete;
sync protocol DeleteSub {
manager Delete;
parent:
sync __delete__(int x) returns (double d);
};

Просмотреть файл

@ -1,18 +0,0 @@
// Basic test that Endpoint types are declared for protocols, within
// that protocol.
struct Whatever {
Endpoint<EndpointDeclParent> par;
Endpoint<EndpointDeclChild> chi;
};
namespace mozilla {
protocol EndpointDecl {
child:
async Message(Endpoint<EndpointDeclParent> aEndpointParent,
Endpoint<EndpointDeclChild> aEndpointChild);
};
}

Просмотреть файл

@ -1,9 +0,0 @@
include protocol EndpointDecl;
// Basic test that Endpoint types are declared for included protocols.
protocol EndpointUse {
child:
async Message(Endpoint<EndpointDeclParent> aEndpointParent,
Endpoint<EndpointDeclChild> aEndpointChild);
};

Просмотреть файл

@ -1,11 +0,0 @@
union Union {
nullable Nullable;
nullable Nullable[];
};
protocol Nullable {
child:
async Msg(nullable Nullable n);
async Msg2(nullable Nullable[] N);
async Msg3(Union u);
};

Просмотреть файл

@ -2,7 +2,7 @@
//error: asynchronous message `Msg' declares return values
protocol AsyncReturn {
protocol PAsyncReturn {
child:
async Msg() returns(int32_t aNumber);
};

Просмотреть файл

@ -0,0 +1,8 @@
include protocol PDeleteSub;
sync protocol PDelete {
manages PDeleteSub;
child:
async PDeleteSub();
};

Просмотреть файл

@ -0,0 +1,10 @@
include protocol PDelete;
sync protocol PDeleteSub {
manager PDelete;
parent:
sync __delete__(int x) returns (double d);
};

Просмотреть файл

@ -0,0 +1,18 @@
// Basic test that Endpoint types are declared for protocols, within
// that protocol.
struct Whatever {
Endpoint<PEndpointDeclParent> par;
Endpoint<PEndpointDeclChild> chi;
};
namespace mozilla {
protocol PEndpointDecl {
child:
async Message(Endpoint<PEndpointDeclParent> aEndpointParent,
Endpoint<PEndpointDeclChild> aEndpointChild);
};
}

Просмотреть файл

@ -0,0 +1,9 @@
include protocol PEndpointDecl;
// Basic test that Endpoint types are declared for included protocols.
protocol PEndpointUse {
child:
async Message(Endpoint<PEndpointDeclParent> aEndpointParent,
Endpoint<PEndpointDeclChild> aEndpointChild);
};

Просмотреть файл

@ -0,0 +1,11 @@
union Union {
nullable PNullable;
nullable PNullable[];
};
protocol PNullable {
child:
async Msg(nullable PNullable n);
async Msg2(nullable PNullable[] N);
async Msg3(Union u);
};

Просмотреть файл

@ -3,7 +3,7 @@ struct S {
double d;
};
sync protocol Struct {
sync protocol PStruct {
parent:
sync test(S s) returns (S ss);
async __delete__();

Просмотреть файл

@ -0,0 +1,7 @@
include protocol PSyncSyncManager;
sync protocol PSyncSyncManagee {
manager PSyncSyncManager;
child:
async __delete__();
};

Просмотреть файл

@ -1,11 +1,11 @@
include protocol SyncSyncManagee;
include protocol PSyncSyncManagee;
/* The main reason for this test is that it would have caught a bug
* in the Rust IPDL parser that was treating "sync" like "async" in the
* nested case.
*/
nested(upto not) sync protocol SyncSyncManager {
manages SyncSyncManagee;
nested(upto not) sync protocol PSyncSyncManager {
manages PSyncSyncManagee;
parent:
async SyncSyncManagee();
async PSyncSyncManagee();
};

Просмотреть файл

@ -0,0 +1,5 @@
protocol Pactorparam {
child: async Msg(Pactorparam p);
};

Просмотреть файл

@ -0,0 +1,6 @@
sync protocol Pactorreturn {
parent:
sync Msg(Pactorreturn p) returns (Pactorreturn r);
};

Просмотреть файл

@ -1,4 +1,4 @@
protocol array_Basic {
protocol Parray_Basic {
child:
async Msg(int[] array);
};

Просмотреть файл

@ -0,0 +1,10 @@
include protocol Parray_OfActorsSub;
protocol Parray_OfActors {
manages Parray_OfActorsSub;
child:
async Msg(Parray_OfActorsSub[] p);
async Parray_OfActorsSub();
};

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше