Bug 1306708 - Rename prio to nested in IPDL (r=dvander)

This commit is contained in:
Bill McCloskey 2016-09-30 16:20:50 -07:00
parent a2cfb52087
commit eddd80027c
28 changed files with 495 additions and 492 deletions

View File

@ -43,7 +43,7 @@ struct RelationTargets
uint64_t[] Targets;
};
prio(normal upto high) sync protocol PDocAccessible
nested(upto inside_sync) sync protocol PDocAccessible
{
manager PBrowser;
@ -74,20 +74,20 @@ child:
async __delete__();
// Accessible
prio(high) sync State(uint64_t aID) returns(uint64_t states);
prio(high) sync NativeState(uint64_t aID) returns(uint64_t states);
prio(high) sync Name(uint64_t aID) returns(nsString name);
prio(high) sync Value(uint64_t aID) returns(nsString value);
prio(high) sync Help(uint64_t aID) returns(nsString help);
prio(high) sync Description(uint64_t aID) returns(nsString desc);
prio(high) sync Attributes(uint64_t aID) returns(Attribute[] attributes);
prio(high) sync RelationByType(uint64_t aID, uint32_t aRelationType)
nested(inside_sync) sync State(uint64_t aID) returns(uint64_t states);
nested(inside_sync) sync NativeState(uint64_t aID) returns(uint64_t states);
nested(inside_sync) sync Name(uint64_t aID) returns(nsString name);
nested(inside_sync) sync Value(uint64_t aID) returns(nsString value);
nested(inside_sync) sync Help(uint64_t aID) returns(nsString help);
nested(inside_sync) sync Description(uint64_t aID) returns(nsString desc);
nested(inside_sync) sync Attributes(uint64_t aID) returns(Attribute[] attributes);
nested(inside_sync) sync RelationByType(uint64_t aID, uint32_t aRelationType)
returns(uint64_t[] targets);
prio(high) sync Relations(uint64_t aID) returns(RelationTargets[] relations);
prio(high) sync IsSearchbox(uint64_t aID) returns(bool retval);
prio(high) sync LandmarkRole(uint64_t aID) returns(nsString landmark);
prio(high) sync ARIARoleAtom(uint64_t aID) returns(nsString role);
prio(high) sync GetLevelInternal(uint64_t aID) returns(int32_t aLevel);
nested(inside_sync) sync Relations(uint64_t aID) returns(RelationTargets[] relations);
nested(inside_sync) sync IsSearchbox(uint64_t aID) returns(bool retval);
nested(inside_sync) sync LandmarkRole(uint64_t aID) returns(nsString landmark);
nested(inside_sync) sync ARIARoleAtom(uint64_t aID) returns(nsString role);
nested(inside_sync) sync GetLevelInternal(uint64_t aID) returns(int32_t aLevel);
async ScrollTo(uint64_t aID, uint32_t aScrollType);
async ScrollToPoint(uint64_t aID, uint32_t aScrollType, int32_t aX,
int32_t aY);
@ -95,43 +95,43 @@ child:
// AccessibleText
// TextSubstring is getText in IDL.
prio(high) sync CaretLineNumber(uint64_t aID) returns(int32_t aLineNumber);
prio(high) sync CaretOffset(uint64_t aID) returns(int32_t aOffset);
nested(inside_sync) sync CaretLineNumber(uint64_t aID) returns(int32_t aLineNumber);
nested(inside_sync) sync CaretOffset(uint64_t aID) returns(int32_t aOffset);
async SetCaretOffset(uint64_t aID, int32_t aOffset);
prio(high) sync CharacterCount(uint64_t aID) returns(int32_t aCount);
prio(high) sync SelectionCount(uint64_t aID) returns(int32_t aCount);
prio(high) sync TextSubstring(uint64_t aID, int32_t aStartOffset, int32_t
aEndOffset) returns(nsString aText, bool aValid);
prio(high) sync GetTextAfterOffset(uint64_t aID, int32_t aOffset, int32_t aBoundaryType)
nested(inside_sync) sync CharacterCount(uint64_t aID) returns(int32_t aCount);
nested(inside_sync) sync SelectionCount(uint64_t aID) returns(int32_t aCount);
nested(inside_sync) sync TextSubstring(uint64_t aID, int32_t aStartOffset, int32_t
aEndOffset) returns(nsString aText, bool aValid);
nested(inside_sync) sync GetTextAfterOffset(uint64_t aID, int32_t aOffset, int32_t aBoundaryType)
returns(nsString aText, int32_t aStartOffset, int32_t aEndOffset);
prio(high) sync GetTextAtOffset(uint64_t aID, int32_t aOffset, int32_t aBoundaryType)
nested(inside_sync) sync GetTextAtOffset(uint64_t aID, int32_t aOffset, int32_t aBoundaryType)
returns(nsString aText, int32_t aStartOffset, int32_t aEndOffset);
prio(high) sync GetTextBeforeOffset(uint64_t aID, int32_t aOffset, int32_t aBoundaryType)
nested(inside_sync) sync GetTextBeforeOffset(uint64_t aID, int32_t aOffset, int32_t aBoundaryType)
returns(nsString aText, int32_t aStartOffset, int32_t aEndOffset);
prio(high) sync CharAt(uint64_t aID, int32_t aOffset) returns(uint16_t aChar);
nested(inside_sync) sync CharAt(uint64_t aID, int32_t aOffset) returns(uint16_t aChar);
prio(high) sync TextAttributes(uint64_t aID, bool aIncludeDefAttrs, int32_t aOffset)
nested(inside_sync) sync TextAttributes(uint64_t aID, bool aIncludeDefAttrs, int32_t aOffset)
returns(Attribute[] aAttributes, int32_t aStartOffset, int32_t aEndOffset);
prio(high) sync DefaultTextAttributes(uint64_t aID) returns(Attribute[] aAttributes);
nested(inside_sync) sync DefaultTextAttributes(uint64_t aID) returns(Attribute[] aAttributes);
prio(high) sync TextBounds(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset,
nested(inside_sync) sync TextBounds(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset,
uint32_t aCoordType)
returns(nsIntRect aRetVal);
prio(high) sync CharBounds(uint64_t aID, int32_t aOffset, uint32_t aCoordType)
nested(inside_sync) sync CharBounds(uint64_t aID, int32_t aOffset, uint32_t aCoordType)
returns(nsIntRect aRetVal);
prio(high) sync OffsetAtPoint(uint64_t aID, int32_t aX, int32_t aY, uint32_t aCoordType)
nested(inside_sync) sync OffsetAtPoint(uint64_t aID, int32_t aX, int32_t aY, uint32_t aCoordType)
returns(int32_t aRetVal);
prio(high) sync SelectionBoundsAt(uint64_t aID, int32_t aSelectionNum)
nested(inside_sync) sync SelectionBoundsAt(uint64_t aID, int32_t aSelectionNum)
returns(bool aSucceeded, nsString aData, int32_t aStartOffset, int32_t aEndOffset);
prio(high) sync SetSelectionBoundsAt(uint64_t aID, int32_t aSelectionNum,
nested(inside_sync) sync SetSelectionBoundsAt(uint64_t aID, int32_t aSelectionNum,
int32_t aStartOffset, int32_t aEndOffset)
returns(bool aSucceeded);
prio(high) sync AddToSelection(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset)
nested(inside_sync) sync AddToSelection(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset)
returns(bool aSucceeded);
prio(high) sync RemoveFromSelection(uint64_t aID, int32_t aSelectionNum)
nested(inside_sync) sync RemoveFromSelection(uint64_t aID, int32_t aSelectionNum)
returns(bool aSucceeded);
async ScrollSubstringTo(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset,
@ -142,119 +142,119 @@ child:
uint32_t aCoordinateType,
int32_t aX, int32_t aY);
prio(high) sync Text(uint64_t aID) returns(nsString aText);
prio(high) sync ReplaceText(uint64_t aID, nsString aText);
prio(high) sync InsertText(uint64_t aID, nsString aText, int32_t aPosition)
nested(inside_sync) sync Text(uint64_t aID) returns(nsString aText);
nested(inside_sync) sync ReplaceText(uint64_t aID, nsString aText);
nested(inside_sync) sync InsertText(uint64_t aID, nsString aText, int32_t aPosition)
returns(bool aValid);
prio(high) sync CopyText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
nested(inside_sync) sync CopyText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
returns(bool aValid);
prio(high) sync CutText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
nested(inside_sync) sync CutText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
returns(bool aValid);
prio(high) sync DeleteText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
nested(inside_sync) sync DeleteText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
returns(bool aValid);
prio(high) sync PasteText(uint64_t aID, int32_t aPosition)
nested(inside_sync) sync PasteText(uint64_t aID, int32_t aPosition)
returns(bool aValid);
prio(high) sync ImagePosition(uint64_t aID, uint32_t aCoordType) returns(IntPoint aRetVal);
prio(high) sync ImageSize(uint64_t aID) returns(IntSize aRetVal);
nested(inside_sync) sync ImagePosition(uint64_t aID, uint32_t aCoordType) returns(IntPoint aRetVal);
nested(inside_sync) sync ImageSize(uint64_t aID) returns(IntSize aRetVal);
prio(high) sync StartOffset(uint64_t aID) returns(uint32_t aRetVal, bool aOk);
prio(high) sync EndOffset(uint64_t aID) returns(uint32_t aRetVal, bool aOk);
prio(high) sync IsLinkValid(uint64_t aID) returns(bool aRetVal);
prio(high) sync AnchorCount(uint64_t aID) returns(uint32_t aRetVal, bool aOk);
prio(high) sync AnchorURIAt(uint64_t aID, uint32_t aIndex) returns(nsCString aURI, bool aOk);
prio(high) sync AnchorAt(uint64_t aID, uint32_t aIndex) returns(uint64_t aIDOfAnchor, bool aOk);
nested(inside_sync) sync StartOffset(uint64_t aID) returns(uint32_t aRetVal, bool aOk);
nested(inside_sync) sync EndOffset(uint64_t aID) returns(uint32_t aRetVal, bool aOk);
nested(inside_sync) sync IsLinkValid(uint64_t aID) returns(bool aRetVal);
nested(inside_sync) sync AnchorCount(uint64_t aID) returns(uint32_t aRetVal, bool aOk);
nested(inside_sync) sync AnchorURIAt(uint64_t aID, uint32_t aIndex) returns(nsCString aURI, bool aOk);
nested(inside_sync) sync AnchorAt(uint64_t aID, uint32_t aIndex) returns(uint64_t aIDOfAnchor, bool aOk);
prio(high) sync LinkCount(uint64_t aID) returns(uint32_t aCount);
prio(high) sync LinkAt(uint64_t aID, uint32_t aIndex) returns(uint64_t aIDOfLink, bool aOk);
prio(high) sync LinkIndexOf(uint64_t aID, uint64_t aLinkID) returns(int32_t aIndex);
prio(high) sync LinkIndexAtOffset(uint64_t aID, uint32_t aOffset) returns(int32_t aIndex);
nested(inside_sync) sync LinkCount(uint64_t aID) returns(uint32_t aCount);
nested(inside_sync) sync LinkAt(uint64_t aID, uint32_t aIndex) returns(uint64_t aIDOfLink, bool aOk);
nested(inside_sync) sync LinkIndexOf(uint64_t aID, uint64_t aLinkID) returns(int32_t aIndex);
nested(inside_sync) sync LinkIndexAtOffset(uint64_t aID, uint32_t aOffset) returns(int32_t aIndex);
prio(high) sync TableOfACell(uint64_t aID) returns(uint64_t aTableID, bool aOk);
prio(high) sync ColIdx(uint64_t aID) returns(uint32_t aIndex);
prio(high) sync RowIdx(uint64_t aID) returns(uint32_t aIndex);
prio(high) sync ColExtent(uint64_t aID) returns(uint32_t aExtent);
prio(high) sync RowExtent(uint64_t aID) returns(uint32_t aExtent);
prio(high) sync ColHeaderCells(uint64_t aID) returns(uint64_t[] aCells);
prio(high) sync RowHeaderCells(uint64_t aID) returns(uint64_t[] aCells);
prio(high) sync IsCellSelected(uint64_t aID) returns(bool aSelected);
nested(inside_sync) sync TableOfACell(uint64_t aID) returns(uint64_t aTableID, bool aOk);
nested(inside_sync) sync ColIdx(uint64_t aID) returns(uint32_t aIndex);
nested(inside_sync) sync RowIdx(uint64_t aID) returns(uint32_t aIndex);
nested(inside_sync) sync ColExtent(uint64_t aID) returns(uint32_t aExtent);
nested(inside_sync) sync RowExtent(uint64_t aID) returns(uint32_t aExtent);
nested(inside_sync) sync ColHeaderCells(uint64_t aID) returns(uint64_t[] aCells);
nested(inside_sync) sync RowHeaderCells(uint64_t aID) returns(uint64_t[] aCells);
nested(inside_sync) sync IsCellSelected(uint64_t aID) returns(bool aSelected);
prio(high) sync TableCaption(uint64_t aID) returns(uint64_t aCaptionID, bool aOk);
prio(high) sync TableSummary(uint64_t aID) returns(nsString aSummary);
prio(high) sync TableColumnCount(uint64_t aID) returns(uint32_t aColCount);
prio(high) sync TableRowCount(uint64_t aID) returns(uint32_t aRowCount);
prio(high) sync TableCellAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(uint64_t aCellID, bool aOk);
prio(high) sync TableCellIndexAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(int32_t aIndex);
prio(high) sync TableColumnIndexAt(uint64_t aID, uint32_t aCellIndex) returns(int32_t aCol);
prio(high) sync TableRowIndexAt(uint64_t aID, uint32_t aCellIndex) returns(int32_t aRow);
prio(high) sync TableRowAndColumnIndicesAt(uint64_t aID, uint32_t aCellIndex) returns(int32_t aRow, int32_t aCol);
prio(high) sync TableColumnExtentAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(uint32_t aExtent);
prio(high) sync TableRowExtentAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(uint32_t aExtent);
prio(high) sync TableColumnDescription(uint64_t aID, uint32_t aCol) returns(nsString aDescription);
prio(high) sync TableRowDescription(uint64_t aID, uint32_t aRow) returns(nsString aDescription);
prio(high) sync TableColumnSelected(uint64_t aID, uint32_t aCol) returns(bool aSelected);
prio(high) sync TableRowSelected(uint64_t aID, uint32_t aRow) returns(bool aSelected);
prio(high) sync TableCellSelected(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(bool aSelected);
prio(high) sync TableSelectedCellCount(uint64_t aID) returns(uint32_t aSelectedCells);
prio(high) sync TableSelectedColumnCount(uint64_t aID) returns(uint32_t aSelectedColumns);
prio(high) sync TableSelectedRowCount(uint64_t aID) returns(uint32_t aSelectedRows);
prio(high) sync TableSelectedCells(uint64_t aID) returns(uint64_t[] aCellIDs);
prio(high) sync TableSelectedCellIndices(uint64_t aID) returns(uint32_t[] aCellIndeces);
prio(high) sync TableSelectedColumnIndices(uint64_t aID) returns(uint32_t[] aColumnIndeces);
prio(high) sync TableSelectedRowIndices(uint64_t aID) returns(uint32_t[] aRowIndeces);
prio(high) sync TableSelectColumn(uint64_t aID, uint32_t aCol);
prio(high) sync TableSelectRow(uint64_t aID, uint32_t aRow);
prio(high) sync TableUnselectColumn(uint64_t aID, uint32_t aCol);
prio(high) sync TableUnselectRow(uint64_t aID, uint32_t aRow);
prio(high) sync TableIsProbablyForLayout(uint64_t aID) returns(bool aForLayout);
prio(high) sync AtkTableColumnHeader(uint64_t aID, int32_t aCol)
nested(inside_sync) sync TableCaption(uint64_t aID) returns(uint64_t aCaptionID, bool aOk);
nested(inside_sync) sync TableSummary(uint64_t aID) returns(nsString aSummary);
nested(inside_sync) sync TableColumnCount(uint64_t aID) returns(uint32_t aColCount);
nested(inside_sync) sync TableRowCount(uint64_t aID) returns(uint32_t aRowCount);
nested(inside_sync) sync TableCellAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(uint64_t aCellID, bool aOk);
nested(inside_sync) sync TableCellIndexAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(int32_t aIndex);
nested(inside_sync) sync TableColumnIndexAt(uint64_t aID, uint32_t aCellIndex) returns(int32_t aCol);
nested(inside_sync) sync TableRowIndexAt(uint64_t aID, uint32_t aCellIndex) returns(int32_t aRow);
nested(inside_sync) sync TableRowAndColumnIndicesAt(uint64_t aID, uint32_t aCellIndex) returns(int32_t aRow, int32_t aCol);
nested(inside_sync) sync TableColumnExtentAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(uint32_t aExtent);
nested(inside_sync) sync TableRowExtentAt(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(uint32_t aExtent);
nested(inside_sync) sync TableColumnDescription(uint64_t aID, uint32_t aCol) returns(nsString aDescription);
nested(inside_sync) sync TableRowDescription(uint64_t aID, uint32_t aRow) returns(nsString aDescription);
nested(inside_sync) sync TableColumnSelected(uint64_t aID, uint32_t aCol) returns(bool aSelected);
nested(inside_sync) sync TableRowSelected(uint64_t aID, uint32_t aRow) returns(bool aSelected);
nested(inside_sync) sync TableCellSelected(uint64_t aID, uint32_t aRow, uint32_t aCol) returns(bool aSelected);
nested(inside_sync) sync TableSelectedCellCount(uint64_t aID) returns(uint32_t aSelectedCells);
nested(inside_sync) sync TableSelectedColumnCount(uint64_t aID) returns(uint32_t aSelectedColumns);
nested(inside_sync) sync TableSelectedRowCount(uint64_t aID) returns(uint32_t aSelectedRows);
nested(inside_sync) sync TableSelectedCells(uint64_t aID) returns(uint64_t[] aCellIDs);
nested(inside_sync) sync TableSelectedCellIndices(uint64_t aID) returns(uint32_t[] aCellIndeces);
nested(inside_sync) sync TableSelectedColumnIndices(uint64_t aID) returns(uint32_t[] aColumnIndeces);
nested(inside_sync) sync TableSelectedRowIndices(uint64_t aID) returns(uint32_t[] aRowIndeces);
nested(inside_sync) sync TableSelectColumn(uint64_t aID, uint32_t aCol);
nested(inside_sync) sync TableSelectRow(uint64_t aID, uint32_t aRow);
nested(inside_sync) sync TableUnselectColumn(uint64_t aID, uint32_t aCol);
nested(inside_sync) sync TableUnselectRow(uint64_t aID, uint32_t aRow);
nested(inside_sync) sync TableIsProbablyForLayout(uint64_t aID) returns(bool aForLayout);
nested(inside_sync) sync AtkTableColumnHeader(uint64_t aID, int32_t aCol)
returns(uint64_t aHeaderID, bool aOk);
prio(high) sync AtkTableRowHeader(uint64_t aID, int32_t aRow)
nested(inside_sync) sync AtkTableRowHeader(uint64_t aID, int32_t aRow)
returns(uint64_t aHeaderID, bool aOk);
prio(high) sync SelectedItems(uint64_t aID) returns(uint64_t[] aSelectedItemIDs);
prio(high) sync SelectedItemCount(uint64_t aID) returns(uint32_t aCount);
prio(high) sync GetSelectedItem(uint64_t aID, uint32_t aIndex) returns(uint64_t aSelected, bool aOk);
prio(high) sync IsItemSelected(uint64_t aID, uint32_t aIndex) returns(bool aSelected);
prio(high) sync AddItemToSelection(uint64_t aID, uint32_t aIndex) returns(bool aSuccess);
prio(high) sync RemoveItemFromSelection(uint64_t aID, uint32_t aIndex) returns(bool aSuccess);
prio(high) sync SelectAll(uint64_t aID) returns(bool aSuccess);
prio(high) sync UnselectAll(uint64_t aID) returns(bool aSuccess);
nested(inside_sync) sync SelectedItems(uint64_t aID) returns(uint64_t[] aSelectedItemIDs);
nested(inside_sync) sync SelectedItemCount(uint64_t aID) returns(uint32_t aCount);
nested(inside_sync) sync GetSelectedItem(uint64_t aID, uint32_t aIndex) returns(uint64_t aSelected, bool aOk);
nested(inside_sync) sync IsItemSelected(uint64_t aID, uint32_t aIndex) returns(bool aSelected);
nested(inside_sync) sync AddItemToSelection(uint64_t aID, uint32_t aIndex) returns(bool aSuccess);
nested(inside_sync) sync RemoveItemFromSelection(uint64_t aID, uint32_t aIndex) returns(bool aSuccess);
nested(inside_sync) sync SelectAll(uint64_t aID) returns(bool aSuccess);
nested(inside_sync) sync UnselectAll(uint64_t aID) returns(bool aSuccess);
async TakeSelection(uint64_t aID);
async SetSelected(uint64_t aID, bool aSelected);
prio(high) sync DoAction(uint64_t aID, uint8_t aIndex) returns(bool aSuccess);
prio(high) sync ActionCount(uint64_t aID) returns(uint8_t aCount);
prio(high) sync ActionDescriptionAt(uint64_t aID, uint8_t aIndex) returns(nsString aDescription);
prio(high) sync ActionNameAt(uint64_t aID, uint8_t aIndex) returns(nsString aName);
prio(high) sync AccessKey(uint64_t aID) returns(uint32_t aKey, uint32_t aModifierMask);
prio(high) sync KeyboardShortcut(uint64_t aID) returns(uint32_t aKey, uint32_t aModifierMask);
prio(high) sync AtkKeyBinding(uint64_t aID) returns(nsString aResult);
nested(inside_sync) sync DoAction(uint64_t aID, uint8_t aIndex) returns(bool aSuccess);
nested(inside_sync) sync ActionCount(uint64_t aID) returns(uint8_t aCount);
nested(inside_sync) sync ActionDescriptionAt(uint64_t aID, uint8_t aIndex) returns(nsString aDescription);
nested(inside_sync) sync ActionNameAt(uint64_t aID, uint8_t aIndex) returns(nsString aName);
nested(inside_sync) sync AccessKey(uint64_t aID) returns(uint32_t aKey, uint32_t aModifierMask);
nested(inside_sync) sync KeyboardShortcut(uint64_t aID) returns(uint32_t aKey, uint32_t aModifierMask);
nested(inside_sync) sync AtkKeyBinding(uint64_t aID) returns(nsString aResult);
prio(high) sync CurValue(uint64_t aID) returns(double aValue);
prio(high) sync SetCurValue(uint64_t aID, double aValue) returns(bool aRetVal);
prio(high) sync MinValue(uint64_t aID) returns(double aValue);
prio(high) sync MaxValue(uint64_t aID) returns(double aValue);
prio(high) sync Step(uint64_t aID) returns(double aStep);
nested(inside_sync) sync CurValue(uint64_t aID) returns(double aValue);
nested(inside_sync) sync SetCurValue(uint64_t aID, double aValue) returns(bool aRetVal);
nested(inside_sync) sync MinValue(uint64_t aID) returns(double aValue);
nested(inside_sync) sync MaxValue(uint64_t aID) returns(double aValue);
nested(inside_sync) sync Step(uint64_t aID) returns(double aStep);
async TakeFocus(uint64_t aID);
prio(high) sync FocusedChild(uint64_t aID)
nested(inside_sync) sync FocusedChild(uint64_t aID)
returns(uint64_t aChild, bool aOk);
prio(high) sync Language(uint64_t aID) returns(nsString aLocale);
prio(high) sync DocType(uint64_t aID) returns(nsString aType);
prio(high) sync Title(uint64_t aID) returns(nsString aTitle);
prio(high) sync URL(uint64_t aID) returns(nsString aURL);
prio(high) sync MimeType(uint64_t aID) returns(nsString aMime);
prio(high) sync URLDocTypeMimeType(uint64_t aID) returns(nsString aURL, nsString aDocType, nsString aMimeType);
nested(inside_sync) sync Language(uint64_t aID) returns(nsString aLocale);
nested(inside_sync) sync DocType(uint64_t aID) returns(nsString aType);
nested(inside_sync) sync Title(uint64_t aID) returns(nsString aTitle);
nested(inside_sync) sync URL(uint64_t aID) returns(nsString aURL);
nested(inside_sync) sync MimeType(uint64_t aID) returns(nsString aMime);
nested(inside_sync) sync URLDocTypeMimeType(uint64_t aID) returns(nsString aURL, nsString aDocType, nsString aMimeType);
prio(high) sync AccessibleAtPoint(uint64_t aID, int32_t aX, int32_t aY, bool aNeedsScreenCoords, uint32_t aWhich)
nested(inside_sync) sync AccessibleAtPoint(uint64_t aID, int32_t aX, int32_t aY, bool aNeedsScreenCoords, uint32_t aWhich)
returns(uint64_t aResult, bool aOk);
prio(high) sync Extents(uint64_t aID, bool aNeedsScreenCoords)
nested(inside_sync) sync Extents(uint64_t aID, bool aNeedsScreenCoords)
returns(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight);
prio(high) sync DOMNodeID(uint64_t aID) returns(nsString aDOMNodeID);
nested(inside_sync) sync DOMNodeID(uint64_t aID) returns(nsString aDOMNodeID);
};
}

View File

@ -111,7 +111,7 @@ union OptionalShmem
Shmem;
};
prio(normal upto urgent) sync protocol PBrowser
nested(upto inside_cpow) sync protocol PBrowser
{
manager PContent or PContentBridge;
@ -204,8 +204,8 @@ parent:
CpowEntry[] aCpows, Principal aPrincipal)
returns (StructuredCloneData[] retval);
prio(high) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal)
nested(inside_sync) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal)
returns (StructuredCloneData[] retval);
/**
@ -216,8 +216,8 @@ parent:
* notification Whole data of the notification
* preference Native widget preference for IME updates
*/
prio(urgent) sync NotifyIMEFocus(ContentCache contentCache,
IMENotification notification)
nested(inside_cpow) sync NotifyIMEFocus(ContentCache contentCache,
IMENotification notification)
returns (nsIMEUpdatePreference preference);
/**
@ -228,16 +228,16 @@ parent:
* contentCache Cache of content
* notification Whole data of the notification
*/
prio(urgent) async NotifyIMETextChange(ContentCache contentCache,
IMENotification notification);
nested(inside_cpow) async NotifyIMETextChange(ContentCache contentCache,
IMENotification notification);
/**
* Notifies chrome that there is a IME compostion rect updated
*
* contentCache Cache of content
*/
prio(urgent) async NotifyIMECompositionUpdate(ContentCache contentCache,
IMENotification notification);
nested(inside_cpow) async NotifyIMECompositionUpdate(ContentCache contentCache,
IMENotification notification);
/**
* Notifies chrome that there has been a change in selection
@ -246,8 +246,8 @@ parent:
* contentCache Cache of content
* notification Whole data of the notification
*/
prio(urgent) async NotifyIMESelection(ContentCache contentCache,
IMENotification notification);
nested(inside_cpow) async NotifyIMESelection(ContentCache contentCache,
IMENotification notification);
/**
* Notifies chrome of updating its content cache.
@ -255,14 +255,14 @@ parent:
*
* contentCache Cache of content
*/
prio(urgent) async UpdateContentCache(ContentCache contentCache);
nested(inside_cpow) async UpdateContentCache(ContentCache contentCache);
/**
* Notifies IME of mouse button event on a character in focused editor.
*
* Returns true if the mouse button event is consumd by IME.
*/
prio(urgent) sync NotifyIMEMouseButtonEvent(IMENotification notification)
nested(inside_cpow) sync NotifyIMEMouseButtonEvent(IMENotification notification)
returns (bool consumedByIME);
/**
@ -270,8 +270,8 @@ parent:
*
* contentCache Cache of content
*/
prio(urgent) async NotifyIMEPositionChange(ContentCache contentCache,
IMENotification notification);
nested(inside_cpow) async NotifyIMEPositionChange(ContentCache contentCache,
IMENotification notification);
/**
* Requests chrome to commit or cancel composition of IME.
@ -285,7 +285,7 @@ parent:
* try to restore selected string which was
* replaced with the composition.
*/
prio(urgent) sync RequestIMEToCommitComposition(bool cancel)
nested(inside_cpow) sync RequestIMEToCommitComposition(bool cancel)
returns (bool isCommitted, nsString committedString);
/**
@ -295,7 +295,7 @@ parent:
*
* message The message value of the handled event.
*/
prio(urgent) async OnEventNeedingAckHandled(EventMessage message);
nested(inside_cpow) async OnEventNeedingAckHandled(EventMessage message);
/**
* Tells chrome to start plugin IME. If this results in a string getting
@ -306,9 +306,9 @@ parent:
* (should be just under the plugin)
* aCommitted The string committed during IME -- otherwise empty
*/
prio(urgent) sync StartPluginIME(WidgetKeyboardEvent aKeyboardEvent,
int32_t panelX, int32_t panelY)
returns (nsString aCommitted);
nested(inside_cpow) sync StartPluginIME(WidgetKeyboardEvent aKeyboardEvent,
int32_t panelX, int32_t panelY)
returns (nsString aCommitted);
/**
* Tells chrome (and specifically the appropriate widget) whether or not
@ -317,7 +317,7 @@ parent:
*
* aFocused Whether or not a plugin is focused
*/
prio(urgent) async SetPluginFocused(bool aFocused);
nested(inside_cpow) async SetPluginFocused(bool aFocused);
/**
* Set IME candidate window by windowless plugin if plugin has focus.
@ -332,7 +332,7 @@ parent:
* NativeEventData depending on the caller. Please check
* PluginInstanceChild.
*/
prio(urgent) async OnWindowedPluginKeyEvent(NativeEventData aKeyEventData);
nested(inside_cpow) async OnWindowedPluginKeyEvent(NativeEventData aKeyEventData);
/**
* When plugin event isn't consumed, call this
@ -353,16 +353,16 @@ parent:
nsCString[] enabledCommands,
nsCString[] disabledCommands);
prio(urgent) sync GetInputContext() returns (int32_t IMEEnabled,
int32_t IMEOpen);
nested(inside_cpow) sync GetInputContext() returns (int32_t IMEEnabled,
int32_t IMEOpen);
prio(urgent) async SetInputContext(int32_t IMEEnabled,
int32_t IMEOpen,
nsString type,
nsString inputmode,
nsString actionHint,
int32_t cause,
int32_t focusChange);
nested(inside_cpow) async SetInputContext(int32_t IMEEnabled,
int32_t IMEOpen,
nsString type,
nsString inputmode,
nsString actionHint,
int32_t cause,
int32_t focusChange);
sync IsParentWindowMainWidgetVisible() returns (bool visible);
@ -579,9 +579,9 @@ parent:
*/
async SetDimensions(uint32_t aFlags, int32_t aX, int32_t aY, int32_t aCx, int32_t aCy);
prio(high) sync DispatchWheelEvent(WidgetWheelEvent event);
prio(high) sync DispatchMouseEvent(WidgetMouseEvent event);
prio(high) sync DispatchKeyboardEvent(WidgetKeyboardEvent event);
nested(inside_sync) sync DispatchWheelEvent(WidgetWheelEvent event);
nested(inside_sync) sync DispatchMouseEvent(WidgetMouseEvent event);
nested(inside_sync) sync DispatchKeyboardEvent(WidgetKeyboardEvent event);
async InvokeDragSession(IPCDataTransfer[] transfers, uint32_t action,
OptionalShmem visualData,

View File

@ -377,7 +377,7 @@ struct BlobURLRegistrationData
Principal principal;
};
prio(normal upto urgent) sync protocol PContent
nested(upto inside_cpow) sync protocol PContent
{
parent spawns PPluginModule;
@ -843,7 +843,7 @@ parent:
sync GetLookAndFeelCache()
returns (LookAndFeelInt[] lookAndFeelIntCache);
prio(urgent) async PHal();
nested(inside_cpow) async PHal();
async PHeapSnapshotTempFileHelper();
@ -857,7 +857,7 @@ parent:
async PSendStream();
prio(high) sync PScreenManager()
nested(inside_sync) sync PScreenManager()
returns (uint32_t numberOfScreens,
float systemDefaultScale,
bool success);
@ -868,7 +868,7 @@ parent:
async PSpeechSynthesis();
prio(urgent) async PStorage();
nested(inside_cpow) async PStorage();
async PTelephony();
@ -908,8 +908,8 @@ parent:
CpowEntry[] aCpows, Principal aPrincipal)
returns (StructuredCloneData[] retval);
prio(high) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal)
nested(inside_sync) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal)
returns (StructuredCloneData[] retval);
async ShowAlert(AlertNotificationType alert);
@ -1057,10 +1057,10 @@ parent:
* before one is submitted. This is urgent because an extension might use
* a CPOW to synchronously submit a keygen element.
*/
prio(urgent) sync KeygenProcessValue(nsString oldValue,
nsString challenge,
nsString keytype,
nsString keyparams)
nested(inside_cpow) sync KeygenProcessValue(nsString oldValue,
nsString challenge,
nsString keytype,
nsString keyparams)
returns (nsString newValue);
/**

View File

@ -32,7 +32,7 @@ namespace dom {
* allocate the PContentBridgeChild. This protocol allows these processes to
* share PBrowsers and send messages to each other.
*/
prio(normal upto urgent) sync protocol PContentBridge
nested(upto inside_cpow) sync protocol PContentBridge
{
bridges PContent, PContent;

View File

@ -25,32 +25,32 @@ struct ScreenDetails {
double contentsScaleFactor;
};
prio(normal upto high) sync protocol PScreenManager
nested(upto inside_sync) sync protocol PScreenManager
{
manager PContent;
parent:
prio(high) sync Refresh()
nested(inside_sync) sync Refresh()
returns (uint32_t numberOfScreens,
float systemDefaultScale,
bool success);
prio(high) sync ScreenRefresh(uint32_t aId)
nested(inside_sync) sync ScreenRefresh(uint32_t aId)
returns (ScreenDetails screen,
bool success);
prio(high) sync GetPrimaryScreen()
nested(inside_sync) sync GetPrimaryScreen()
returns (ScreenDetails screen,
bool success);
prio(high) sync ScreenForRect(int32_t aLeft,
int32_t aTop,
int32_t aWidth,
int32_t aHeight)
nested(inside_sync) sync ScreenForRect(int32_t aLeft,
int32_t aTop,
int32_t aWidth,
int32_t aHeight)
returns (ScreenDetails screen,
bool success);
prio(high) sync ScreenForBrowser(TabId aTabId)
nested(inside_sync) sync ScreenForBrowser(TabId aTabId)
returns (ScreenDetails screen,
bool success);

View File

@ -12,14 +12,14 @@ namespace dom {
/* This protocol bridges async access to the database thread running on the parent process
* and caches running on the child process.
*/
prio(normal upto urgent) sync protocol PStorage
nested(upto inside_cpow) sync protocol PStorage
{
manager PContent;
parent:
async __delete__();
prio(urgent) sync Preload(nsCString originSuffix, nsCString originNoSuffix, uint32_t alreadyLoadedCount)
nested(inside_cpow) sync Preload(nsCString originSuffix, nsCString originNoSuffix, uint32_t alreadyLoadedCount)
returns (nsString[] keys, nsString[] values, nsresult rv);
async AsyncPreload(nsCString originSuffix, nsCString originNoSuffix, bool priority);

View File

@ -96,7 +96,7 @@ struct SystemTimezoneChangeInformation {
namespace hal_sandbox {
prio(normal upto urgent) sync protocol PHal {
nested(upto inside_cpow) sync protocol PHal {
manager PContent;
child:
@ -156,7 +156,7 @@ parent:
async EnableScreenConfigurationNotifications();
async DisableScreenConfigurationNotifications();
prio(urgent) sync GetCurrentScreenConfiguration()
nested(inside_cpow) sync GetCurrentScreenConfiguration()
returns (ScreenConfiguration aScreenConfiguration);
sync LockScreenOrientation(ScreenOrientationInternal aOrientation)
returns (bool allowed);

View File

@ -263,8 +263,7 @@ void Channel::ChannelImpl::ResetFileDescriptor(int fd) {
bool Channel::ChannelImpl::EnqueueHelloMessage() {
mozilla::UniquePtr<Message> msg(new Message(MSG_ROUTING_NONE,
HELLO_MESSAGE_TYPE,
IPC::Message::PRIORITY_NORMAL));
HELLO_MESSAGE_TYPE));
if (!msg->WriteInt(base::GetCurrentProcId())) {
Close();
return false;

View File

@ -228,8 +228,7 @@ bool Channel::ChannelImpl::CreatePipe(const std::wstring& channel_id,
bool Channel::ChannelImpl::EnqueueHelloMessage() {
mozilla::UniquePtr<Message> m = mozilla::MakeUnique<Message>(MSG_ROUTING_NONE,
HELLO_MESSAGE_TYPE,
IPC::Message::PRIORITY_NORMAL);
HELLO_MESSAGE_TYPE);
// If we're waiting for our shared secret from the other end's hello message
// then don't give the game away by sending it in ours.

View File

@ -45,13 +45,15 @@ Message::Message()
InitLoggingVariables();
}
Message::Message(int32_t routing_id, msgid_t type, PriorityValue priority,
Message::Message(int32_t routing_id, msgid_t type, NestedLevel nestedLevel, PriorityValue priority,
MessageCompression compression, const char* const aName)
: Pickle(sizeof(Header)) {
MOZ_COUNT_CTOR(IPC::Message);
header()->routing = routing_id;
header()->type = type;
header()->flags = priority;
header()->flags = nestedLevel;
if (priority == HIGH_PRIORITY)
header()->flags |= PRIORITY_BIT;
if (compression == COMPRESSION_ENABLED)
header()->flags |= COMPRESS_BIT;
else if (compression == COMPRESSION_ALL)

View File

@ -38,10 +38,15 @@ class Message : public Pickle {
public:
typedef uint32_t msgid_t;
enum NestedLevel {
NOT_NESTED = 1,
NESTED_INSIDE_SYNC = 2,
NESTED_INSIDE_CPOW = 3
};
enum PriorityValue {
PRIORITY_NORMAL = 1,
PRIORITY_HIGH = 2,
PRIORITY_URGENT = 3
NORMAL_PRIORITY,
HIGH_PRIORITY,
};
enum MessageCompression {
@ -56,7 +61,10 @@ class Message : public Pickle {
// Initialize a message with a user-defined type, priority value, and
// destination WebView ID.
Message(int32_t routing_id, msgid_t type, PriorityValue priority,
Message(int32_t routing_id,
msgid_t type,
NestedLevel nestedLevel = NOT_NESTED,
PriorityValue priority = NORMAL_PRIORITY,
MessageCompression compression = COMPRESSION_NONE,
const char* const name="???");
@ -67,13 +75,27 @@ class Message : public Pickle {
Message& operator=(const Message& other) = delete;
Message& operator=(Message&& other);
PriorityValue priority() const {
return static_cast<PriorityValue>(header()->flags & PRIORITY_MASK);
NestedLevel nested_level() const {
return static_cast<NestedLevel>(header()->flags & NESTED_MASK);
}
void set_priority(int prio) {
DCHECK((prio & ~PRIORITY_MASK) == 0);
header()->flags = (header()->flags & ~PRIORITY_MASK) | prio;
void set_nested_level(NestedLevel nestedLevel) {
DCHECK((nestedLevel & ~NESTED_MASK) == 0);
header()->flags = (header()->flags & ~NESTED_MASK) | nestedLevel;
}
PriorityValue priority() const {
if (header()->flags & PRIORITY_BIT) {
return HIGH_PRIORITY;
}
return NORMAL_PRIORITY;
}
void set_priority(PriorityValue prio) {
header()->flags &= ~PRIORITY_BIT;
if (prio == HIGH_PRIORITY) {
header()->flags |= PRIORITY_BIT;
}
}
// True if this is a synchronous message.
@ -114,27 +136,6 @@ class Message : public Pickle {
return (header()->flags & REPLY_ERROR_BIT) != 0;
}
// Normally when a receiver gets a message and they're blocked on a
// synchronous message Send, they buffer a message. Setting this flag causes
// the receiver to be unblocked and the message to be dispatched immediately.
void set_unblock(bool unblock) {
if (unblock) {
header()->flags |= UNBLOCK_BIT;
} else {
header()->flags &= ~UNBLOCK_BIT;
}
}
bool should_unblock() const {
return (header()->flags & UNBLOCK_BIT) != 0;
}
// Tells the receiver that the caller is pumping messages while waiting
// for the result.
bool is_caller_pumping_messages() const {
return (header()->flags & PUMPING_MSGS_BIT) != 0;
}
msgid_t type() const {
return header()->type;
}
@ -269,16 +270,14 @@ class Message : public Pickle {
// flags
enum {
PRIORITY_MASK = 0x0003,
SYNC_BIT = 0x0004,
REPLY_BIT = 0x0008,
REPLY_ERROR_BIT = 0x0010,
UNBLOCK_BIT = 0x0020,
PUMPING_MSGS_BIT= 0x0040,
HAS_SENT_TIME_BIT = 0x0080,
INTERRUPT_BIT = 0x0100,
COMPRESS_BIT = 0x0200,
COMPRESSALL_BIT = 0x0400,
NESTED_MASK = 0x0003,
PRIORITY_BIT = 0x0004,
SYNC_BIT = 0x0008,
REPLY_BIT = 0x0010,
REPLY_ERROR_BIT = 0x0020,
INTERRUPT_BIT = 0x0040,
COMPRESS_BIT = 0x0080,
COMPRESSALL_BIT = 0x0100,
};
struct Header : Pickle::Header {

View File

@ -39,36 +39,41 @@ static mozilla::LazyLogModule sLogModule("ipc");
* IPC design:
*
* There are three kinds of messages: async, sync, and intr. Sync and intr
* messages are blocking. Only intr and high-priority sync messages can nest.
* messages are blocking.
*
* Terminology: To dispatch a message Foo is to run the RecvFoo code for
* it. This is also called "handling" the message.
*
* Sync and async messages have priorities while intr messages always have
* normal priority. The three possible priorities are normal, high, and urgent.
* The intended uses of these priorities are:
* NORMAL - most messages.
* HIGH - CPOW-related messages, which can go in either direction.
* URGENT - messages where we don't want to dispatch
* incoming CPOWs while waiting for the response.
* Async messages cannot have HIGH priority.
* Sync and async messages can sometimes "nest" inside other sync messages
* (i.e., while waiting for the sync reply, we can dispatch the inner
* message). Intr messages cannot nest. The three possible nesting levels are
* NOT_NESTED, NESTED_INSIDE_SYNC, and NESTED_INSIDE_CPOW. The intended uses
* are:
* NOT_NESTED - most messages.
* NESTED_INSIDE_SYNC - CPOW-related messages, which are always sync
* and can go in either direction.
* NESTED_INSIDE_CPOW - messages where we don't want to dispatch
* incoming CPOWs while waiting for the response.
* These nesting levels are ordered: NOT_NESTED, NESTED_INSIDE_SYNC,
* NESTED_INSIDE_CPOW. Async messages cannot be NESTED_INSIDE_SYNC but they can
* be NESTED_INSIDE_CPOW.
*
* To avoid jank, the parent process is not allowed to send sync messages of
* normal priority. When a process is waiting for a response to a sync message
* To avoid jank, the parent process is not allowed to send NOT_NESTED sync messages.
* When a process is waiting for a response to a sync message
* M0, it will dispatch an incoming message M if:
* 1. M has a higher priority than M0, or
* 2. if M has the same priority as M0 and we're in the child, or
* 3. if M has the same priority as M0 and it was sent by the other side
* while dispatching M0 (nesting).
* The idea is that higher priority messages should take precendence, and we
* also want to allow nesting. The purpose of rule 2 is to handle a race where
* both processes send to each other simultaneously. In this case, we resolve
* the race in favor of the parent (so the child dispatches first).
* 1. M has a higher nesting level than M0, or
* 2. if M has the same nesting level as M0 and we're in the child, or
* 3. if M has the same nesting level as M0 and it was sent by the other side
* while dispatching M0.
* The idea is that messages with higher nesting should take precendence. The
* purpose of rule 2 is to handle a race where both processes send to each other
* simultaneously. In this case, we resolve the race in favor of the parent (so
* the child dispatches first).
*
* Messages satisfy the following properties:
* A. When waiting for a response to a sync message, we won't dispatch any
* messages of lower priority.
* B. Messages of the same priority will be dispatched roughly in the
* messages of nesting level.
* B. Messages of the same nesting level will be dispatched roughly in the
* order they were sent. The exception is when the parent and child send
* sync messages to each other simulataneously. In this case, the parent's
* message is dispatched first. While it is dispatched, the child may send
@ -78,13 +83,13 @@ static mozilla::LazyLogModule sLogModule("ipc");
* after the parent's message is finished being dispatched.
*
* When waiting for a sync message reply, we dispatch an async message only if
* it has URGENT priority. Normally URGENT async messages are sent only from the
* child. However, the parent can send URGENT async messages when it is creating
* a bridged protocol.
* it is NESTED_INSIDE_CPOW. Normally NESTED_INSIDE_CPOW async
* messages are sent only from the child. However, the parent can send
* NESTED_INSIDE_CPOW async messages when it is creating a bridged protocol.
*
* Intr messages are blocking but not prioritized. While waiting for an intr
* response, all incoming messages are dispatched until a response is
* received. Intr messages also can be nested. When two intr messages race with
* Intr messages are blocking and can nest, but they don't participate in the
* nesting levels. While waiting for an intr response, all incoming messages are
* dispatched until a response is received. When two intr messages race with
* each other, a similar scheme is used to ensure that one side wins. The
* winning side is chosen based on the message type.
*
@ -287,11 +292,11 @@ public:
explicit AutoEnterTransaction(MessageChannel *aChan,
int32_t aMsgSeqno,
int32_t aTransactionID,
int aPriority)
int aNestedLevel)
: mChan(aChan),
mActive(true),
mOutgoing(true),
mPriority(aPriority),
mNestedLevel(aNestedLevel),
mSeqno(aMsgSeqno),
mTransaction(aTransactionID),
mNext(mChan->mTransactionStack)
@ -304,7 +309,7 @@ public:
: mChan(aChan),
mActive(true),
mOutgoing(false),
mPriority(aMessage.priority()),
mNestedLevel(aMessage.nested_level()),
mSeqno(aMessage.seqno()),
mTransaction(aMessage.transaction_id()),
mNext(mChan->mTransactionStack)
@ -329,11 +334,11 @@ public:
void Cancel() {
AutoEnterTransaction *cur = mChan->mTransactionStack;
MOZ_RELEASE_ASSERT(cur == this);
while (cur && cur->mPriority != IPC::Message::PRIORITY_NORMAL) {
while (cur && cur->mNestedLevel != IPC::Message::NOT_NESTED) {
// Note that, in the following situation, we will cancel multiple
// transactions:
// 1. Parent sends high prio message P1 to child.
// 2. Child sends high prio message C1 to child.
// 1. Parent sends NESTED_INSIDE_SYNC message P1 to child.
// 2. Child sends NESTED_INSIDE_SYNC message C1 to child.
// 3. Child dispatches P1, parent blocks.
// 4. Child cancels.
// In this case, both P1 and C1 are cancelled. The parent will
@ -356,12 +361,12 @@ public:
return mNext ? mNext->AwaitingSyncReply() : false;
}
int AwaitingSyncReplyPriority() const {
int AwaitingSyncReplyNestedLevel() const {
MOZ_RELEASE_ASSERT(mActive);
if (mOutgoing) {
return mPriority;
return mNestedLevel;
}
return mNext ? mNext->AwaitingSyncReplyPriority() : 0;
return mNext ? mNext->AwaitingSyncReplyNestedLevel() : 0;
}
bool DispatchingSyncMessage() const {
@ -372,17 +377,17 @@ public:
return mNext ? mNext->DispatchingSyncMessage() : false;
}
int DispatchingSyncMessagePriority() const {
int DispatchingSyncMessageNestedLevel() const {
MOZ_RELEASE_ASSERT(mActive);
if (!mOutgoing) {
return mPriority;
return mNestedLevel;
}
return mNext ? mNext->DispatchingSyncMessagePriority() : 0;
return mNext ? mNext->DispatchingSyncMessageNestedLevel() : 0;
}
int Priority() const {
int NestedLevel() const {
MOZ_RELEASE_ASSERT(mActive);
return mPriority;
return mNestedLevel;
}
int32_t SequenceNumber() const {
@ -456,7 +461,7 @@ private:
bool mOutgoing;
// Properties of the message being sent/received.
int mPriority;
int mNestedLevel;
int32_t mSeqno;
int32_t mTransaction;
@ -480,10 +485,10 @@ MessageChannel::MessageChannel(MessageListener *aListener)
mNextSeqno(0),
mLastSendError(SyncSendError::SendSuccess),
mDispatchingAsyncMessage(false),
mDispatchingAsyncMessagePriority(0),
mDispatchingAsyncMessageNestedLevel(0),
mTransactionStack(nullptr),
mTimedOutMessageSeqno(0),
mTimedOutMessagePriority(0),
mTimedOutMessageNestedLevel(0),
#if defined(MOZ_CRASHREPORTER) && defined(OS_WIN)
mPending(AnnotateAllocator<Message>(*this)),
#endif
@ -543,16 +548,16 @@ MessageChannel::~MessageChannel()
// "current transaction" can be hard to define when messages race with each
// other and one gets canceled and the other doesn't, we require that this
// function is only called when the current transaction is known to be for a
// high priority message. In that case, we know for sure what the caller is
// NESTED_INSIDE_SYNC message. In that case, we know for sure what the caller is
// looking for.
int32_t
MessageChannel::CurrentHighPriorityTransaction() const
MessageChannel::CurrentNestedInsideSyncTransaction() const
{
mMonitor->AssertCurrentThreadOwns();
if (!mTransactionStack) {
return 0;
}
MOZ_RELEASE_ASSERT(mTransactionStack->Priority() == IPC::Message::PRIORITY_HIGH);
MOZ_RELEASE_ASSERT(mTransactionStack->NestedLevel() == IPC::Message::NESTED_INSIDE_SYNC);
return mTransactionStack->TransactionID();
}
@ -564,10 +569,10 @@ MessageChannel::AwaitingSyncReply() const
}
int
MessageChannel::AwaitingSyncReplyPriority() const
MessageChannel::AwaitingSyncReplyNestedLevel() const
{
mMonitor->AssertCurrentThreadOwns();
return mTransactionStack ? mTransactionStack->AwaitingSyncReplyPriority() : 0;
return mTransactionStack ? mTransactionStack->AwaitingSyncReplyNestedLevel() : 0;
}
bool
@ -578,10 +583,10 @@ MessageChannel::DispatchingSyncMessage() const
}
int
MessageChannel::DispatchingSyncMessagePriority() const
MessageChannel::DispatchingSyncMessageNestedLevel() const
{
mMonitor->AssertCurrentThreadOwns();
return mTransactionStack ? mTransactionStack->DispatchingSyncMessagePriority() : 0;
return mTransactionStack ? mTransactionStack->DispatchingSyncMessageNestedLevel() : 0;
}
static void
@ -797,7 +802,7 @@ class CancelMessage : public IPC::Message
{
public:
explicit CancelMessage(int transaction) :
IPC::Message(MSG_ROUTING_NONE, CANCEL_MESSAGE_TYPE, PRIORITY_NORMAL)
IPC::Message(MSG_ROUTING_NONE, CANCEL_MESSAGE_TYPE)
{
set_transaction_id(transaction);
}
@ -838,32 +843,32 @@ MessageChannel::MaybeInterceptSpecialIOMessage(const Message& aMsg)
bool
MessageChannel::ShouldDeferMessage(const Message& aMsg)
{
// Never defer messages that have the highest priority, even async
// Never defer messages that have the highest nested level, even async
// ones. This is safe because only the child can send these messages, so
// they can never nest.
if (aMsg.priority() == IPC::Message::PRIORITY_URGENT)
if (aMsg.nested_level() == IPC::Message::NESTED_INSIDE_CPOW)
return false;
// Unless they're urgent, we always defer async messages.
// Note that we never send an async high priority message.
// Unless they're NESTED_INSIDE_CPOW, we always defer async messages.
// Note that we never send an async NESTED_INSIDE_SYNC message.
if (!aMsg.is_sync()) {
MOZ_RELEASE_ASSERT(aMsg.priority() == IPC::Message::PRIORITY_NORMAL);
MOZ_RELEASE_ASSERT(aMsg.nested_level() == IPC::Message::NOT_NESTED);
return true;
}
int msgPrio = aMsg.priority();
int waitingPrio = AwaitingSyncReplyPriority();
int msgNestedLevel = aMsg.nested_level();
int waitingNestedLevel = AwaitingSyncReplyNestedLevel();
// Always defer if the priority of the incoming message is less than the
// priority of the message we're awaiting.
if (msgPrio < waitingPrio)
// Always defer if the nested level of the incoming message is less than the
// nested level of the message we're awaiting.
if (msgNestedLevel < waitingNestedLevel)
return true;
// Never defer if the message has strictly greater priority.
if (msgPrio > waitingPrio)
// Never defer if the message has strictly greater nested level.
if (msgNestedLevel > waitingNestedLevel)
return false;
// When both sides send sync messages of the same priority, we resolve the
// When both sides send sync messages of the same nested level, we resolve the
// race by dispatching in the child and deferring the incoming message in
// the parent. However, the parent still needs to dispatch nested sync
// messages.
@ -872,7 +877,7 @@ MessageChannel::ShouldDeferMessage(const Message& aMsg)
// child's message comes in, we can pretend the child hasn't quite
// finished sending it yet. Since the message is sync, we know that the
// child hasn't moved on yet.
return mSide == ParentSide && aMsg.transaction_id() != CurrentHighPriorityTransaction();
return mSide == ParentSide && aMsg.transaction_id() != CurrentNestedInsideSyncTransaction();
}
// Predicate that is true for messages that should be consolidated if 'compress' is set.
@ -917,9 +922,9 @@ MessageChannel::OnMessageReceivedFromLink(Message&& aMsg)
return;
}
// Prioritized messages cannot be compressed.
// Nested messages cannot be compressed.
MOZ_RELEASE_ASSERT(aMsg.compress_type() == IPC::Message::COMPRESSION_NONE ||
aMsg.priority() == IPC::Message::PRIORITY_NORMAL);
aMsg.nested_level() == IPC::Message::NOT_NESTED);
bool compress = false;
if (aMsg.compress_type() == IPC::Message::COMPRESSION_ENABLED) {
@ -969,7 +974,7 @@ MessageChannel::OnMessageReceivedFromLink(Message&& aMsg)
//
// (1) We are waiting on a sync reply - main thread is blocked on the
// IPC monitor.
// - If the message is high priority, we wake up the main thread to
// - If the message is NESTED_INSIDE_SYNC, we wake up the main thread to
// deliver the message depending on ShouldDeferMessage. Otherwise, we
// leave it in the mPending queue, posting a task to the main event
// loop, where it will be processed once the synchronous reply has been
@ -1021,13 +1026,13 @@ MessageChannel::ProcessPendingRequests(AutoEnterTransaction& aTransaction)
IPC_LOG("ProcessPendingRequests for seqno=%d, xid=%d",
aTransaction.SequenceNumber(), aTransaction.TransactionID());
// Loop until there aren't any more priority messages to process.
// Loop until there aren't any more nested messages to process.
for (;;) {
// If we canceled during ProcessPendingRequest, then we need to leave
// immediately because the results of ShouldDeferMessage will be
// operating with weird state (as if no Send is in progress). That could
// cause even normal priority sync messages to be processed (but not
// normal priority async messages), which would break message ordering.
// cause even NOT_NESTED sync messages to be processed (but not
// NOT_NESTED async messages), which would break message ordering.
if (aTransaction.IsCanceled()) {
return;
}
@ -1042,7 +1047,7 @@ MessageChannel::ProcessPendingRequests(AutoEnterTransaction& aTransaction)
bool defer = ShouldDeferMessage(msg);
// Only log the interesting messages.
if (msg.is_sync() || msg.priority() == IPC::Message::PRIORITY_URGENT) {
if (msg.is_sync() || msg.nested_level() == IPC::Message::NESTED_INSIDE_CPOW) {
IPC_LOG("ShouldDeferMessage(seqno=%d) = %d", msg.seqno(), defer);
}
@ -1101,48 +1106,48 @@ MessageChannel::Send(Message* aMsg, Message* aReply)
return false;
}
if (DispatchingSyncMessagePriority() == IPC::Message::PRIORITY_NORMAL &&
msg->priority() > IPC::Message::PRIORITY_NORMAL)
if (DispatchingSyncMessageNestedLevel() == IPC::Message::NOT_NESTED &&
msg->nested_level() > IPC::Message::NOT_NESTED)
{
// Don't allow sending CPOWs while we're dispatching a sync message.
// If you want to do that, use sendRpcMessage instead.
IPC_LOG("Prio forbids send");
IPC_LOG("Nested level forbids send");
mLastSendError = SyncSendError::SendingCPOWWhileDispatchingSync;
return false;
}
if (DispatchingSyncMessagePriority() == IPC::Message::PRIORITY_URGENT ||
DispatchingAsyncMessagePriority() == IPC::Message::PRIORITY_URGENT)
if (DispatchingSyncMessageNestedLevel() == IPC::Message::NESTED_INSIDE_CPOW ||
DispatchingAsyncMessageNestedLevel() == IPC::Message::NESTED_INSIDE_CPOW)
{
// Generally only the parent dispatches urgent messages. And the only
// sync messages it can send are high-priority. Mainly we want to ensure
// sync messages it can send are NESTED_INSIDE_SYNC. Mainly we want to ensure
// here that we don't return false for non-CPOW messages.
MOZ_RELEASE_ASSERT(msg->priority() == IPC::Message::PRIORITY_HIGH);
MOZ_RELEASE_ASSERT(msg->nested_level() == IPC::Message::NESTED_INSIDE_SYNC);
IPC_LOG("Sending while dispatching urgent message");
mLastSendError = SyncSendError::SendingCPOWWhileDispatchingUrgent;
return false;
}
if (msg->priority() < DispatchingSyncMessagePriority() ||
msg->priority() < AwaitingSyncReplyPriority())
if (msg->nested_level() < DispatchingSyncMessageNestedLevel() ||
msg->nested_level() < AwaitingSyncReplyNestedLevel())
{
MOZ_RELEASE_ASSERT(DispatchingSyncMessage() || DispatchingAsyncMessage());
IPC_LOG("Cancel from Send");
CancelMessage *cancel = new CancelMessage(CurrentHighPriorityTransaction());
CancelTransaction(CurrentHighPriorityTransaction());
CancelMessage *cancel = new CancelMessage(CurrentNestedInsideSyncTransaction());
CancelTransaction(CurrentNestedInsideSyncTransaction());
mLink->SendMessage(cancel);
}
IPC_ASSERT(msg->is_sync(), "can only Send() sync messages here");
IPC_ASSERT(msg->priority() >= DispatchingSyncMessagePriority(),
"can't send sync message of a lesser priority than what's being dispatched");
IPC_ASSERT(AwaitingSyncReplyPriority() <= msg->priority(),
"nested sync message sends must be of increasing priority");
IPC_ASSERT(DispatchingSyncMessagePriority() != IPC::Message::PRIORITY_URGENT,
IPC_ASSERT(msg->nested_level() >= DispatchingSyncMessageNestedLevel(),
"can't send sync message of a lesser nested level than what's being dispatched");
IPC_ASSERT(AwaitingSyncReplyNestedLevel() <= msg->nested_level(),
"nested sync message sends must be of increasing nested level");
IPC_ASSERT(DispatchingSyncMessageNestedLevel() != IPC::Message::NESTED_INSIDE_CPOW,
"not allowed to send messages while dispatching urgent messages");
IPC_ASSERT(DispatchingAsyncMessagePriority() != IPC::Message::PRIORITY_URGENT,
IPC_ASSERT(DispatchingAsyncMessageNestedLevel() != IPC::Message::NESTED_INSIDE_CPOW,
"not allowed to send messages while dispatching urgent messages");
if (!Connected()) {
@ -1154,21 +1159,21 @@ MessageChannel::Send(Message* aMsg, Message* aReply)
msg->set_seqno(NextSeqno());
int32_t seqno = msg->seqno();
int prio = msg->priority();
int nestedLevel = msg->nested_level();
msgid_t replyType = msg->type() + 1;
AutoEnterTransaction *stackTop = mTransactionStack;
// If the most recent message on the stack is high priority, then our
// If the most recent message on the stack is NESTED_INSIDE_SYNC, then our
// message should nest inside that and we use the same transaction
// ID. Otherwise we need a new transaction ID (so we use the seqno of the
// message we're sending).
bool nest = stackTop && stackTop->Priority() == IPC::Message::PRIORITY_HIGH;
bool nest = stackTop && stackTop->NestedLevel() == IPC::Message::NESTED_INSIDE_SYNC;
int32_t transaction = nest ? stackTop->TransactionID() : seqno;
msg->set_transaction_id(transaction);
bool handleWindowsMessages = mListener->HandleWindowsMessages(*aMsg);
AutoEnterTransaction transact(this, seqno, transaction, prio);
AutoEnterTransaction transact(this, seqno, transaction, nestedLevel);
IPC_LOG("Send seqno=%d, xid=%d", seqno, transaction);
@ -1227,7 +1232,7 @@ MessageChannel::Send(Message* aMsg, Message* aReply)
IPC_LOG("Timing out Send: xid=%d", transaction);
mTimedOutMessageSeqno = seqno;
mTimedOutMessagePriority = prio;
mTimedOutMessageNestedLevel = nestedLevel;
mLastSendError = SyncSendError::TimedOut;
return false;
}
@ -1515,10 +1520,10 @@ MessageChannel::DequeueOne(Message *recvd)
// If we've timed out a message and we're awaiting the reply to the timed
// out message, we have to be careful what messages we process. Here's what
// can go wrong:
// 1. child sends a normal priority sync message S
// 2. parent sends a high priority sync message H at the same time
// 1. child sends a NOT_NESTED sync message S
// 2. parent sends a NESTED_INSIDE_SYNC sync message H at the same time
// 3. parent times out H
// 4. child starts processing H and sends a high priority message H' nested
// 4. child starts processing H and sends a NESTED_INSIDE_SYNC message H' nested
// within the same transaction
// 5. parent dispatches S and sends reply
// 6. child asserts because it instead expected a reply to H'.
@ -1526,13 +1531,13 @@ MessageChannel::DequeueOne(Message *recvd)
// To solve this, we refuse to process S in the parent until we get a reply
// to H. More generally, let the timed out message be M. We don't process a
// message unless the child would need the response to that message in order
// to process M. Those messages are the ones that have a higher priority
// to process M. Those messages are the ones that have a higher nested level
// than M or that are part of the same transaction as M.
if (mTimedOutMessageSeqno) {
for (MessageQueue::iterator it = mPending.begin(); it != mPending.end(); it++) {
Message &msg = *it;
if (msg.priority() > mTimedOutMessagePriority ||
(msg.priority() == mTimedOutMessagePriority
if (msg.nested_level() > mTimedOutMessageNestedLevel ||
(msg.nested_level() == mTimedOutMessageNestedLevel
&& msg.transaction_id() == mTimedOutMessageSeqno))
{
*recvd = Move(msg);
@ -1626,9 +1631,9 @@ MessageChannel::DispatchSyncMessage(const Message& aMsg, Message*& aReply)
{
AssertWorkerThread();
int prio = aMsg.priority();
int nestedLevel = aMsg.nested_level();
MOZ_RELEASE_ASSERT(prio == IPC::Message::PRIORITY_NORMAL || NS_IsMainThread());
MOZ_RELEASE_ASSERT(nestedLevel == IPC::Message::NOT_NESTED || NS_IsMainThread());
MessageChannel* dummy;
MessageChannel*& blockingVar = mSide == ChildSide && NS_IsMainThread() ? gParentProcessBlocker : dummy;
@ -1642,7 +1647,7 @@ MessageChannel::DispatchSyncMessage(const Message& aMsg, Message*& aReply)
if (!MaybeHandleError(rv, aMsg, "DispatchSyncMessage")) {
aReply = new Message();
aReply->set_sync();
aReply->set_priority(aMsg.priority());
aReply->set_nested_level(aMsg.nested_level());
aReply->set_reply();
aReply->set_reply_error();
}
@ -1662,9 +1667,9 @@ MessageChannel::DispatchAsyncMessage(const Message& aMsg)
Result rv;
{
int prio = aMsg.priority();
int nestedLevel = aMsg.nested_level();
AutoSetValue<bool> async(mDispatchingAsyncMessage, true);
AutoSetValue<int> prioSet(mDispatchingAsyncMessagePriority, prio);
AutoSetValue<int> nestedLevelSet(mDispatchingAsyncMessageNestedLevel, nestedLevel);
rv = mListener->OnMessageReceived(aMsg);
}
MaybeHandleError(rv, aMsg, "DispatchAsyncMessage");
@ -1775,7 +1780,7 @@ MessageChannel::MaybeUndeferIncall()
IPC_ASSERT(0 < mRemoteStackDepthGuess, "fatal logic error");
--mRemoteStackDepthGuess;
MOZ_RELEASE_ASSERT(call.priority() == IPC::Message::PRIORITY_NORMAL);
MOZ_RELEASE_ASSERT(call.nested_level() == IPC::Message::NOT_NESTED);
mPending.push_back(Move(call));
}
@ -2149,7 +2154,7 @@ class GoodbyeMessage : public IPC::Message
{
public:
GoodbyeMessage() :
IPC::Message(MSG_ROUTING_NONE, GOODBYE_MESSAGE_TYPE, PRIORITY_NORMAL)
IPC::Message(MSG_ROUTING_NONE, GOODBYE_MESSAGE_TYPE)
{
}
static bool Read(const Message* msg) {
@ -2338,7 +2343,7 @@ MessageChannel::EndTimeout()
IPC_LOG("Ending timeout of seqno=%d", mTimedOutMessageSeqno);
mTimedOutMessageSeqno = 0;
mTimedOutMessagePriority = 0;
mTimedOutMessageNestedLevel = 0;
for (size_t i = 0; i < mPending.size(); i++) {
// There may be messages in the queue that we expected to process from
@ -2375,7 +2380,7 @@ MessageChannel::CancelTransaction(int transaction)
EndTimeout();
// Normally mCurrentTransaction == 0 here. But it can be non-zero if:
// 1. Parent sends hi prio message H.
// 1. Parent sends NESTED_INSIDE_SYNC message H.
// 2. Parent times out H.
// 3. Child dispatches H and sends nested message H' (same transaction).
// 4. Parent dispatches H' and cancels.
@ -2395,8 +2400,8 @@ MessageChannel::CancelTransaction(int transaction)
// If there was a race between the parent and the child, then we may
// have a queued sync message. We want to drop this message from the
// queue since if will get cancelled along with the transaction being
// cancelled. This happens if the message in the queue is high priority.
if (msg.is_sync() && msg.priority() != IPC::Message::PRIORITY_NORMAL) {
// cancelled. This happens if the message in the queue is NESTED_INSIDE_SYNC.
if (msg.is_sync() && msg.nested_level() != IPC::Message::NOT_NESTED) {
MOZ_RELEASE_ASSERT(!foundSync);
MOZ_RELEASE_ASSERT(msg.transaction_id() != transaction);
IPC_LOG("Removing msg from queue seqno=%d xid=%d", msg.seqno(), msg.transaction_id());
@ -2420,17 +2425,17 @@ void
MessageChannel::CancelCurrentTransaction()
{
MonitorAutoLock lock(*mMonitor);
if (DispatchingSyncMessagePriority() >= IPC::Message::PRIORITY_HIGH) {
if (DispatchingSyncMessagePriority() == IPC::Message::PRIORITY_URGENT ||
DispatchingAsyncMessagePriority() == IPC::Message::PRIORITY_URGENT)
if (DispatchingSyncMessageNestedLevel() >= IPC::Message::NESTED_INSIDE_SYNC) {
if (DispatchingSyncMessageNestedLevel() == IPC::Message::NESTED_INSIDE_CPOW ||
DispatchingAsyncMessageNestedLevel() == IPC::Message::NESTED_INSIDE_CPOW)
{
mListener->IntentionalCrash();
}
IPC_LOG("Cancel requested: current xid=%d", CurrentHighPriorityTransaction());
IPC_LOG("Cancel requested: current xid=%d", CurrentNestedInsideSyncTransaction());
MOZ_RELEASE_ASSERT(DispatchingSyncMessage());
CancelMessage *cancel = new CancelMessage(CurrentHighPriorityTransaction());
CancelTransaction(CurrentHighPriorityTransaction());
CancelMessage *cancel = new CancelMessage(CurrentNestedInsideSyncTransaction());
CancelTransaction(CurrentNestedInsideSyncTransaction());
mLink->SendMessage(cancel);
}
}

View File

@ -408,9 +408,9 @@ class MessageChannel : HasResultCodes
return mDispatchingAsyncMessage;
}
int DispatchingAsyncMessagePriority() const {
int DispatchingAsyncMessageNestedLevel() const {
AssertWorkerThread();
return mDispatchingAsyncMessagePriority;
return mDispatchingAsyncMessageNestedLevel;
}
bool Connected() const;
@ -626,7 +626,7 @@ class MessageChannel : HasResultCodes
};
bool mDispatchingAsyncMessage;
int mDispatchingAsyncMessagePriority;
int mDispatchingAsyncMessageNestedLevel;
// When we send an urgent request from the parent process, we could race
// with an RPC message that was issued by the child beforehand. In this
@ -649,13 +649,13 @@ class MessageChannel : HasResultCodes
friend class AutoEnterTransaction;
AutoEnterTransaction *mTransactionStack;
int32_t CurrentHighPriorityTransaction() const;
int32_t CurrentNestedInsideSyncTransaction() const;
bool AwaitingSyncReply() const;
int AwaitingSyncReplyPriority() const;
int AwaitingSyncReplyNestedLevel() const;
bool DispatchingSyncMessage() const;
int DispatchingSyncMessagePriority() const;
int DispatchingSyncMessageNestedLevel() const;
// If a sync message times out, we store its sequence number here. Any
// future sync messages will fail immediately. Once the reply for original
@ -671,7 +671,7 @@ class MessageChannel : HasResultCodes
// hitting a lot of corner cases with message nesting that we don't really
// care about.
int32_t mTimedOutMessageSeqno;
int mTimedOutMessagePriority;
int mTimedOutMessageNestedLevel;
// Queue of all incoming messages, except for replies to sync and urgent
// messages, which are delivered directly to mRecvd, and any pending urgent

View File

@ -83,10 +83,10 @@ public:
ChannelOpened(TransportDescriptor aDescriptor,
ProcessId aOtherProcess,
ProtocolId aProtocol,
PriorityValue aPriority = PRIORITY_NORMAL)
NestedLevel aNestedLevel = NOT_NESTED)
: IPC::Message(MSG_ROUTING_CONTROL, // these only go to top-level actors
CHANNEL_OPENED_MESSAGE_TYPE,
aPriority)
aNestedLevel)
{
IPC::WriteParam(this, aDescriptor);
IPC::WriteParam(this, aOtherProcess);
@ -128,7 +128,7 @@ Bridge(const PrivateIPDLInterface&,
if (!aParentChannel->Send(new ChannelOpened(parentSide,
aChildPid,
aProtocol,
IPC::Message::PRIORITY_URGENT))) {
IPC::Message::NESTED_INSIDE_CPOW))) {
CloseDescriptor(parentSide);
CloseDescriptor(childSide);
return NS_ERROR_BRIDGE_OPEN_PARENT;
@ -137,7 +137,7 @@ Bridge(const PrivateIPDLInterface&,
if (!aChildChannel->Send(new ChannelOpened(childSide,
aParentPid,
aChildProtocol,
IPC::Message::PRIORITY_URGENT))) {
IPC::Message::NESTED_INSIDE_CPOW))) {
CloseDescriptor(parentSide);
CloseDescriptor(childSide);
return NS_ERROR_BRIDGE_OPEN_CHILD;

View File

@ -25,7 +25,7 @@ public:
id_t aIPDLId,
size_t aSize,
SharedMemory::SharedMemoryType aType) :
IPC::Message(routingId, SHMEM_CREATED_MESSAGE_TYPE, PRIORITY_URGENT)
IPC::Message(routingId, SHMEM_CREATED_MESSAGE_TYPE, NESTED_INSIDE_CPOW)
{
IPC::WriteParam(this, aIPDLId);
IPC::WriteParam(this, aSize);
@ -60,7 +60,7 @@ private:
public:
ShmemDestroyed(int32_t routingId,
id_t aIPDLId) :
IPC::Message(routingId, SHMEM_DESTROYED_MESSAGE_TYPE, PRIORITY_NORMAL)
IPC::Message(routingId, SHMEM_DESTROYED_MESSAGE_TYPE)
{
IPC::WriteParam(this, aIPDLId);
}

View File

@ -4,9 +4,9 @@
import sys
NORMAL_PRIORITY = 1
HIGH_PRIORITY = 2
URGENT_PRIORITY = 3
NOT_NESTED = 1
INSIDE_SYNC_NESTED = 2
INSIDE_CPOW_NESTED = 3
class Visitor:
def defaultVisit(self, node):
@ -236,7 +236,7 @@ class Protocol(NamespacedNode):
def __init__(self, loc):
NamespacedNode.__init__(self, loc)
self.sendSemantics = ASYNC
self.priority = NORMAL_PRIORITY
self.nested = NOT_NESTED
self.spawnsStmts = [ ]
self.bridgesStmts = [ ]
self.opensStmts = [ ]
@ -296,7 +296,7 @@ class MessageDecl(Node):
Node.__init__(self, loc)
self.name = None
self.sendSemantics = ASYNC
self.priority = NORMAL_PRIORITY
self.nested = NOT_NESTED
self.direction = None
self.inParams = [ ]
self.outParams = [ ]

View File

@ -1685,7 +1685,7 @@ class _GenerateProtocolCode(ipdl.ast.Visitor):
mfDecl, mfDefn = _splitFuncDeclDefn(
_generateMessageConstructor(md.msgCtorFunc(), md.msgId(),
md.decl.type.priority,
md.decl.type.nested,
md.prettyMsgName(p.name+'::'),
md.decl.type.compress))
decls.append(mfDecl)
@ -1695,7 +1695,7 @@ class _GenerateProtocolCode(ipdl.ast.Visitor):
rfDecl, rfDefn = _splitFuncDeclDefn(
_generateMessageConstructor(
md.replyCtorFunc(), md.replyId(),
md.decl.type.priority,
md.decl.type.nested,
md.prettyReplyName(p.name+'::'),
md.decl.type.compress))
decls.append(rfDecl)
@ -1926,7 +1926,7 @@ class _GenerateProtocolCode(ipdl.ast.Visitor):
##--------------------------------------------------
def _generateMessageConstructor(clsname, msgid, priority, prettyName, compress):
def _generateMessageConstructor(clsname, msgid, nested, prettyName, compress):
routingId = ExprVar('routingId')
func = FunctionDefn(FunctionDecl(
@ -1941,19 +1941,21 @@ def _generateMessageConstructor(clsname, msgid, priority, prettyName, compress):
compression = ExprVar('IPC::Message::COMPRESSION_ALL')
else:
compression = ExprVar('IPC::Message::COMPRESSION_NONE')
if priority == ipdl.ast.NORMAL_PRIORITY:
priorityEnum = 'IPC::Message::PRIORITY_NORMAL'
elif priority == ipdl.ast.HIGH_PRIORITY:
priorityEnum = 'IPC::Message::PRIORITY_HIGH'
if nested == ipdl.ast.NOT_NESTED:
nestedEnum = 'IPC::Message::NOT_NESTED'
elif nested == ipdl.ast.INSIDE_SYNC_NESTED:
nestedEnum = 'IPC::Message::NESTED_INSIDE_SYNC'
else:
assert priority == ipdl.ast.URGENT_PRIORITY
priorityEnum = 'IPC::Message::PRIORITY_URGENT'
assert nested == ipdl.ast.INSIDE_CPOW_NESTED
nestedEnum = 'IPC::Message::NESTED_INSIDE_CPOW'
func.addstmt(
StmtReturn(ExprNew(Type('IPC::Message'),
args=[ routingId,
ExprVar(msgid),
ExprVar(priorityEnum),
ExprVar(nestedEnum),
ExprVar('IPC::Message::NORMAL_PRIORITY'),
compression,
ExprLiteral.String(prettyName) ])))

View File

@ -128,18 +128,16 @@ reserved = set((
'delete', # reserve 'delete' to prevent its use
'from',
'goto',
'high',
'include',
'intr',
'manager',
'manages',
'namespace',
'normal',
'nested',
'nullable',
'opens',
'or',
'parent',
'prio',
'protocol',
'recv',
'returns',
@ -151,7 +149,6 @@ reserved = set((
'sync',
'union',
'upto',
'urgent',
'using',
'verify'))
tokens = [
@ -359,7 +356,7 @@ def p_ProtocolDefn(p):
protocol = p[5]
protocol.loc = locFromTok(p, 2)
protocol.name = p[3]
protocol.priorityRange = p[1][0]
protocol.nestedRange = p[1][0]
protocol.sendSemantics = p[1][1]
p[0] = protocol
@ -502,7 +499,7 @@ def p_MessageDirectionLabel(p):
def p_MessageDecl(p):
"""MessageDecl : SendSemanticsQual MessageBody"""
msg = p[2]
msg.priority = p[1][0]
msg.nested = p[1][0]
msg.sendSemantics = p[1][1]
if Parser.current.direction is None:
@ -641,61 +638,61 @@ def p_State(p):
##--------------------
## Minor stuff
def p_Priority(p):
"""Priority : NORMAL
| HIGH
| URGENT"""
prios = {'normal': 1,
'high': 2,
'urgent': 3}
p[0] = prios[p[1]]
def p_Nested(p):
"""Nested : ID"""
kinds = {'not': 1,
'inside_sync': 2,
'inside_cpow': 3}
if p[1] not in kinds:
_error(locFromTok(p, 1), "Expected not, inside_sync, or inside_cpow for nested()")
p[0] = kinds[p[1]]
def p_SendSemanticsQual(p):
"""SendSemanticsQual : ASYNC
| SYNC
| PRIO '(' Priority ')' ASYNC
| PRIO '(' Priority ')' SYNC
| NESTED '(' Nested ')' ASYNC
| NESTED '(' Nested ')' SYNC
| INTR"""
if p[1] == 'prio':
if p[1] == 'nested':
mtype = p[5]
prio = p[3]
nested = p[3]
else:
mtype = p[1]
prio = NORMAL_PRIORITY
nested = NOT_NESTED
if mtype == 'async': mtype = ASYNC
elif mtype == 'sync': mtype = SYNC
elif mtype == 'intr': mtype = INTR
else: assert 0
p[0] = [ prio, mtype ]
p[0] = [ nested, mtype ]
def p_OptionalProtocolSendSemanticsQual(p):
"""OptionalProtocolSendSemanticsQual : ProtocolSendSemanticsQual
| """
if 2 == len(p): p[0] = p[1]
else: p[0] = [ (NORMAL_PRIORITY, NORMAL_PRIORITY), ASYNC ]
else: p[0] = [ (NOT_NESTED, NOT_NESTED), ASYNC ]
def p_ProtocolSendSemanticsQual(p):
"""ProtocolSendSemanticsQual : ASYNC
| SYNC
| PRIO '(' Priority UPTO Priority ')' ASYNC
| PRIO '(' Priority UPTO Priority ')' SYNC
| PRIO '(' Priority UPTO Priority ')' INTR
| NESTED '(' UPTO Nested ')' ASYNC
| NESTED '(' UPTO Nested ')' SYNC
| INTR"""
if p[1] == 'prio':
mtype = p[7]
prio = (p[3], p[5])
if p[1] == 'nested':
mtype = p[6]
nested = (NOT_NESTED, p[4])
else:
mtype = p[1]
prio = (NORMAL_PRIORITY, NORMAL_PRIORITY)
nested = (NOT_NESTED, NOT_NESTED)
if mtype == 'async': mtype = ASYNC
elif mtype == 'sync': mtype = SYNC
elif mtype == 'intr': mtype = INTR
else: assert 0
p[0] = [ prio, mtype ]
p[0] = [ nested, mtype ]
def p_ParamList(p):
"""ParamList : ParamList ',' Param

View File

@ -9,7 +9,7 @@ from ipdl.ast import CxxInclude, Decl, Loc, QualifiedId, State, StructDecl, Tran
from ipdl.ast import TypeSpec, UnionDecl, UsingStmt, Visitor
from ipdl.ast import ASYNC, SYNC, INTR
from ipdl.ast import IN, OUT, INOUT, ANSWER, CALL, RECV, SEND
from ipdl.ast import NORMAL_PRIORITY, HIGH_PRIORITY, URGENT_PRIORITY
from ipdl.ast import NOT_NESTED, INSIDE_SYNC_NESTED, INSIDE_CPOW_NESTED
import ipdl.builtin as builtin
_DELETE_MSG = '__delete__'
@ -217,14 +217,14 @@ class IPDLType(Type):
@classmethod
def convertsTo(cls, lesser, greater):
if (lesser.priorityRange[0] < greater.priorityRange[0] or
lesser.priorityRange[1] > greater.priorityRange[1]):
if (lesser.nestedRange[0] < greater.nestedRange[0] or
lesser.nestedRange[1] > greater.nestedRange[1]):
return False
# Protocols that use intr semantics are not allowed to use
# message priorities.
# message nesting.
if (greater.isInterrupt() and
lesser.priorityRange != (NORMAL_PRIORITY, NORMAL_PRIORITY)):
lesser.nestedRange != (NOT_NESTED, NOT_NESTED)):
return False
if lesser.isAsync():
@ -251,14 +251,14 @@ class StateType(IPDLType):
return self.name()
class MessageType(IPDLType):
def __init__(self, priority, sendSemantics, direction,
def __init__(self, nested, sendSemantics, direction,
ctor=False, dtor=False, cdtype=None, compress=False,
verify=False):
assert not (ctor and dtor)
assert not (ctor or dtor) or type is not None
self.priority = priority
self.priorityRange = (priority, priority)
self.nested = nested
self.nestedRange = (nested, nested)
self.sendSemantics = sendSemantics
self.direction = direction
self.params = [ ]
@ -295,9 +295,9 @@ class Bridge:
return hash(self.parent) + hash(self.child)
class ProtocolType(IPDLType):
def __init__(self, qname, priorityRange, sendSemantics, stateless=False):
def __init__(self, qname, nestedRange, sendSemantics, stateless=False):
self.qname = qname
self.priorityRange = priorityRange
self.nestedRange = nestedRange
self.sendSemantics = sendSemantics
self.spawns = set() # ProtocolType
self.opens = set() # ProtocolType
@ -715,7 +715,7 @@ class GatherDecls(TcheckVisitor):
fullname = str(qname)
p.decl = self.declare(
loc=p.loc,
type=ProtocolType(qname, p.priorityRange, p.sendSemantics,
type=ProtocolType(qname, p.nestedRange, p.sendSemantics,
stateless=(0 == len(p.transitionStmts))),
shortname=p.name,
fullname=fullname)
@ -1125,7 +1125,7 @@ class GatherDecls(TcheckVisitor):
# enter message scope
self.symtab.enterScope(md)
msgtype = MessageType(md.priority, md.sendSemantics, md.direction,
msgtype = MessageType(md.nested, md.sendSemantics, md.direction,
ctor=isctor, dtor=isdtor, cdtype=cdtype,
compress=md.compress, verify=md.verify)
@ -1499,22 +1499,22 @@ class CheckTypes(TcheckVisitor):
loc = md.decl.loc
if mtype.priority == HIGH_PRIORITY and not mtype.isSync():
if mtype.nested == INSIDE_SYNC_NESTED and not mtype.isSync():
self.error(
loc,
"high priority messages must be sync (here, message `%s' in protocol `%s')",
"inside_sync nested messages must be sync (here, message `%s' in protocol `%s')",
mname, pname)
if mtype.priority == URGENT_PRIORITY and (mtype.isOut() or mtype.isInout()):
if mtype.nested == INSIDE_CPOW_NESTED and (mtype.isOut() or mtype.isInout()):
self.error(
loc,
"urgent parent-to-child messages are verboten (here, message `%s' in protocol `%s')",
"inside_cpow nested parent-to-child messages are verboten (here, message `%s' in protocol `%s')",
mname, pname)
# We allow high priority sync messages to be sent from the
# parent. Normal and urgent sync messages can only come from
# We allow inside_sync messages that are themselves sync to be sent from the
# parent. Normal and inside_cpow nested messages that are sync can only come from
# the child.
if mtype.isSync() and mtype.priority == NORMAL_PRIORITY and (mtype.isOut() or mtype.isInout()):
if mtype.isSync() and mtype.nested == NOT_NESTED and (mtype.isOut() or mtype.isInout()):
self.error(
loc,
"sync parent-to-child messages are verboten (here, message `%s' in protocol `%s')",

View File

@ -1,35 +1,35 @@
namespace mozilla {
namespace _ipdltest {
prio(normal upto high) sync protocol PTestCancel
nested(upto inside_sync) sync protocol PTestCancel
{
// Test1
child:
prio(high) sync Test1_1();
nested(inside_sync) sync Test1_1();
parent:
async Done1();
// Test2
child:
async Start2();
prio(high) sync Test2_2();
nested(inside_sync) sync Test2_2();
parent:
sync Test2_1();
// Test3
child:
prio(high) sync Test3_1();
nested(inside_sync) sync Test3_1();
parent:
async Start3();
prio(high) sync Test3_2();
nested(inside_sync) sync Test3_2();
parent:
async Done();
child:
prio(high) sync CheckChild() returns (uint32_t reply);
nested(inside_sync) sync CheckChild() returns (uint32_t reply);
parent:
prio(high) sync CheckParent() returns (uint32_t reply);
nested(inside_sync) sync CheckParent() returns (uint32_t reply);
};
} // namespace _ipdltest

View File

@ -1,20 +1,20 @@
namespace mozilla {
namespace _ipdltest {
prio(normal upto urgent) sync protocol PTestDemon
nested(upto inside_cpow) sync protocol PTestDemon
{
child:
async Start();
both:
async AsyncMessage(int n);
prio(high) sync HiPrioSyncMessage();
nested(inside_sync) sync HiPrioSyncMessage();
parent:
sync SyncMessage(int n);
prio(urgent) async UrgentAsyncMessage(int n);
prio(urgent) sync UrgentSyncMessage(int n);
nested(inside_cpow) async UrgentAsyncMessage(int n);
nested(inside_cpow) sync UrgentSyncMessage(int n);
};
} // namespace _ipdltest

View File

@ -1,17 +1,17 @@
namespace mozilla {
namespace _ipdltest {
prio(normal upto urgent) sync protocol PTestHighestPrio
nested(upto inside_cpow) sync protocol PTestHighestPrio
{
parent:
prio(urgent) async Msg1();
prio(high) sync Msg2();
prio(urgent) async Msg3();
prio(urgent) sync Msg4();
nested(inside_cpow) async Msg1();
nested(inside_sync) sync Msg2();
nested(inside_cpow) async Msg3();
nested(inside_cpow) sync Msg4();
child:
async Start();
prio(high) sync StartInner();
nested(inside_sync) sync StartInner();
};
}

View File

@ -1,20 +1,20 @@
namespace mozilla {
namespace _ipdltest {
prio(normal upto high) sync protocol PTestRPC
nested(upto inside_sync) sync protocol PTestRPC
{
parent:
prio(high) sync Test1_Start() returns (uint32_t result);
prio(high) sync Test1_InnerEvent() returns (uint32_t result);
nested(inside_sync) sync Test1_Start() returns (uint32_t result);
nested(inside_sync) sync Test1_InnerEvent() returns (uint32_t result);
async Test2_Start();
prio(high) sync Test2_OutOfOrder();
nested(inside_sync) sync Test2_OutOfOrder();
child:
async Start();
prio(high) sync Test1_InnerQuery() returns (uint32_t result);
prio(high) sync Test1_NoReenter() returns (uint32_t result);
prio(high) sync Test2_FirstUrgent();
prio(high) sync Test2_SecondUrgent();
nested(inside_sync) sync Test1_InnerQuery() returns (uint32_t result);
nested(inside_sync) sync Test1_NoReenter() returns (uint32_t result);
nested(inside_sync) sync Test2_FirstUrgent();
nested(inside_sync) sync Test2_SecondUrgent();
};
} // namespace _ipdltest

View File

@ -1,18 +1,18 @@
namespace mozilla {
namespace _ipdltest {
prio(normal upto high) sync protocol PTestUrgency
nested(upto inside_cpow) sync protocol PTestUrgency
{
parent:
prio(high) sync Test1() returns (uint32_t result);
nested(inside_sync) sync Test1() returns (uint32_t result);
async Test2();
sync Test3() returns (uint32_t result);
sync FinalTest_Begin();
child:
async Start();
prio(high) sync Reply1() returns (uint32_t result);
prio(high) sync Reply2() returns (uint32_t result);
nested(inside_sync) sync Reply1() returns (uint32_t result);
nested(inside_sync) sync Reply2() returns (uint32_t result);
};
} // namespace _ipdltest

View File

@ -1,27 +1,27 @@
namespace mozilla {
namespace _ipdltest {
prio(normal upto urgent) sync protocol PTestUrgentHangs
nested(upto inside_cpow) sync protocol PTestUrgentHangs
{
parent:
prio(high) sync Test1_2();
nested(inside_sync) sync Test1_2();
prio(high) sync TestInner();
prio(urgent) sync TestInnerUrgent();
nested(inside_sync) sync TestInner();
nested(inside_cpow) sync TestInnerUrgent();
child:
prio(high) sync Test1_1();
prio(high) sync Test1_3();
nested(inside_sync) sync Test1_1();
nested(inside_sync) sync Test1_3();
prio(high) sync Test2();
nested(inside_sync) sync Test2();
prio(high) sync Test3();
nested(inside_sync) sync Test3();
async Test4();
prio(high) sync Test4_1();
nested(inside_sync) sync Test4_1();
async Test5();
prio(high) sync Test5_1();
nested(inside_sync) sync Test5_1();
};
} // namespace _ipdltest

View File

@ -15,7 +15,7 @@ using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
namespace mozilla {
namespace jsipc {
prio(normal upto high) sync protocol PJavaScript
nested(upto inside_sync) sync protocol PJavaScript
{
manager PContent or PContentBridge;
@ -24,30 +24,30 @@ both:
async DropObject(uint64_t objId);
// These roughly map to the ProxyHandler hooks that CPOWs need.
prio(high) sync PreventExtensions(uint64_t objId) returns (ReturnStatus rs);
prio(high) sync GetPropertyDescriptor(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, PPropertyDescriptor result);
prio(high) sync GetOwnPropertyDescriptor(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, PPropertyDescriptor result);
prio(high) sync DefineProperty(uint64_t objId, JSIDVariant id, PPropertyDescriptor descriptor) returns (ReturnStatus rs);
prio(high) sync Delete(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs);
nested(inside_sync) sync PreventExtensions(uint64_t objId) returns (ReturnStatus rs);
nested(inside_sync) sync GetPropertyDescriptor(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, PPropertyDescriptor result);
nested(inside_sync) sync GetOwnPropertyDescriptor(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, PPropertyDescriptor result);
nested(inside_sync) sync DefineProperty(uint64_t objId, JSIDVariant id, PPropertyDescriptor descriptor) returns (ReturnStatus rs);
nested(inside_sync) sync Delete(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs);
prio(high) sync Has(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, bool has);
prio(high) sync HasOwn(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, bool has);
prio(high) sync Get(uint64_t objId, JSVariant receiver, JSIDVariant id) returns (ReturnStatus rs, JSVariant result);
prio(high) sync Set(uint64_t objId, JSIDVariant id, JSVariant value, JSVariant receiver) returns (ReturnStatus rs);
nested(inside_sync) sync Has(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, bool has);
nested(inside_sync) sync HasOwn(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, bool has);
nested(inside_sync) sync Get(uint64_t objId, JSVariant receiver, JSIDVariant id) returns (ReturnStatus rs, JSVariant result);
nested(inside_sync) sync Set(uint64_t objId, JSIDVariant id, JSVariant value, JSVariant receiver) returns (ReturnStatus rs);
prio(high) sync IsExtensible(uint64_t objId) returns (ReturnStatus rs, bool result);
prio(high) sync CallOrConstruct(uint64_t objId, JSParam[] argv, bool construct) returns (ReturnStatus rs, JSVariant result, JSParam[] outparams);
prio(high) sync HasInstance(uint64_t objId, JSVariant v) returns (ReturnStatus rs, bool has);
prio(high) sync GetBuiltinClass(uint64_t objId) returns (ReturnStatus rs, uint32_t classValue);
prio(high) sync IsArray(uint64_t objId) returns (ReturnStatus rs, uint32_t ans);
prio(high) sync ClassName(uint64_t objId) returns (nsCString name);
prio(high) sync GetPrototype(uint64_t objId) returns (ReturnStatus rs, ObjectOrNullVariant result);
prio(high) sync GetPrototypeIfOrdinary(uint64_t objId) returns (ReturnStatus rs, bool isOrdinary, ObjectOrNullVariant result);
prio(high) sync RegExpToShared(uint64_t objId) returns (ReturnStatus rs, nsString source, uint32_t flags);
nested(inside_sync) sync IsExtensible(uint64_t objId) returns (ReturnStatus rs, bool result);
nested(inside_sync) sync CallOrConstruct(uint64_t objId, JSParam[] argv, bool construct) returns (ReturnStatus rs, JSVariant result, JSParam[] outparams);
nested(inside_sync) sync HasInstance(uint64_t objId, JSVariant v) returns (ReturnStatus rs, bool has);
nested(inside_sync) sync GetBuiltinClass(uint64_t objId) returns (ReturnStatus rs, uint32_t classValue);
nested(inside_sync) sync IsArray(uint64_t objId) returns (ReturnStatus rs, uint32_t ans);
nested(inside_sync) sync ClassName(uint64_t objId) returns (nsCString name);
nested(inside_sync) sync GetPrototype(uint64_t objId) returns (ReturnStatus rs, ObjectOrNullVariant result);
nested(inside_sync) sync GetPrototypeIfOrdinary(uint64_t objId) returns (ReturnStatus rs, bool isOrdinary, ObjectOrNullVariant result);
nested(inside_sync) sync RegExpToShared(uint64_t objId) returns (ReturnStatus rs, nsString source, uint32_t flags);
prio(high) sync GetPropertyKeys(uint64_t objId, uint32_t flags) returns (ReturnStatus rs, JSIDVariant[] ids);
prio(high) sync InstanceOf(uint64_t objId, JSIID iid) returns (ReturnStatus rs, bool instanceof);
prio(high) sync DOMInstanceOf(uint64_t objId, int prototypeID, int depth) returns (ReturnStatus rs, bool instanceof);
nested(inside_sync) sync GetPropertyKeys(uint64_t objId, uint32_t flags) returns (ReturnStatus rs, JSIDVariant[] ids);
nested(inside_sync) sync InstanceOf(uint64_t objId, JSIID iid) returns (ReturnStatus rs, bool instanceof);
nested(inside_sync) sync DOMInstanceOf(uint64_t objId, int prototypeID, int depth) returns (ReturnStatus rs, bool instanceof);
parent:
async __delete__();

View File

@ -26,7 +26,7 @@ namespace net {
* @see nsICookiePermission
*/
prio(normal upto urgent) sync protocol PCookieService
nested(upto inside_cpow) sync protocol PCookieService
{
manager PNecko;
@ -59,10 +59,10 @@ parent:
*
* @return the resulting cookie string.
*/
prio(urgent) sync GetCookieString(URIParams host,
bool isForeign,
bool fromHttp,
NeckoOriginAttributes attrs)
nested(inside_cpow) sync GetCookieString(URIParams host,
bool isForeign,
bool fromHttp,
NeckoOriginAttributes attrs)
returns (nsCString result);
/*
@ -94,12 +94,12 @@ parent:
* @see nsICookieService.setCookieStringFromHttp
* @see mozIThirdPartyUtil.isThirdPartyChannel
*/
prio(urgent) async SetCookieString(URIParams host,
bool isForeign,
nsCString cookieString,
nsCString serverTime,
bool fromHttp,
NeckoOriginAttributes attrs);
nested(inside_cpow) async SetCookieString(URIParams host,
bool isForeign,
nsCString cookieString,
nsCString serverTime,
bool fromHttp,
NeckoOriginAttributes attrs);
async __delete__();
};

View File

@ -40,7 +40,7 @@ namespace mozilla {
namespace net {
//-------------------------------------------------------------------
prio(normal upto urgent) sync protocol PNecko
nested(upto inside_cpow) sync protocol PNecko
{
manager PContent;
manages PHttpChannel;
@ -64,7 +64,7 @@ prio(normal upto urgent) sync protocol PNecko
parent:
async __delete__();
prio(urgent) async PCookieService();
nested(inside_cpow) async PCookieService();
async PHttpChannel(PBrowserOrId browser,
SerializedLoadContext loadContext,
HttpChannelCreationArgs args);