Revert "Bug 1306708 - Rename prio to nested in IPDL (r=dvander)" on a CLOSED TREE

This reverts commit b1460c626078afbb9290e7d9ecaf3af605d5e893.
This commit is contained in:
Bill McCloskey 2016-10-04 15:55:12 -07:00
Родитель f2da85c062
Коммит b83db28a45
28 изменённых файлов: 491 добавлений и 494 удалений

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

@ -43,7 +43,7 @@ struct RelationTargets
uint64_t[] Targets;
};
nested(upto inside_sync) sync protocol PDocAccessible
prio(normal upto high) sync protocol PDocAccessible
{
manager PBrowser;
@ -74,20 +74,20 @@ child:
async __delete__();
// Accessible
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)
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)
returns(uint64_t[] targets);
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);
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);
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.
nested(inside_sync) sync CaretLineNumber(uint64_t aID) returns(int32_t aLineNumber);
nested(inside_sync) sync CaretOffset(uint64_t aID) returns(int32_t aOffset);
prio(high) sync CaretLineNumber(uint64_t aID) returns(int32_t aLineNumber);
prio(high) sync CaretOffset(uint64_t aID) returns(int32_t aOffset);
async SetCaretOffset(uint64_t aID, int32_t aOffset);
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)
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)
returns(nsString aText, int32_t aStartOffset, int32_t aEndOffset);
nested(inside_sync) sync GetTextAtOffset(uint64_t aID, int32_t aOffset, int32_t aBoundaryType)
prio(high) sync GetTextAtOffset(uint64_t aID, int32_t aOffset, int32_t aBoundaryType)
returns(nsString aText, int32_t aStartOffset, int32_t aEndOffset);
nested(inside_sync) sync GetTextBeforeOffset(uint64_t aID, int32_t aOffset, int32_t aBoundaryType)
prio(high) sync GetTextBeforeOffset(uint64_t aID, int32_t aOffset, int32_t aBoundaryType)
returns(nsString aText, int32_t aStartOffset, int32_t aEndOffset);
nested(inside_sync) sync CharAt(uint64_t aID, int32_t aOffset) returns(uint16_t aChar);
prio(high) sync CharAt(uint64_t aID, int32_t aOffset) returns(uint16_t aChar);
nested(inside_sync) sync TextAttributes(uint64_t aID, bool aIncludeDefAttrs, int32_t aOffset)
prio(high) sync TextAttributes(uint64_t aID, bool aIncludeDefAttrs, int32_t aOffset)
returns(Attribute[] aAttributes, int32_t aStartOffset, int32_t aEndOffset);
nested(inside_sync) sync DefaultTextAttributes(uint64_t aID) returns(Attribute[] aAttributes);
prio(high) sync DefaultTextAttributes(uint64_t aID) returns(Attribute[] aAttributes);
nested(inside_sync) sync TextBounds(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset,
prio(high) sync TextBounds(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset,
uint32_t aCoordType)
returns(nsIntRect aRetVal);
nested(inside_sync) sync CharBounds(uint64_t aID, int32_t aOffset, uint32_t aCoordType)
prio(high) sync CharBounds(uint64_t aID, int32_t aOffset, uint32_t aCoordType)
returns(nsIntRect aRetVal);
nested(inside_sync) sync OffsetAtPoint(uint64_t aID, int32_t aX, int32_t aY, uint32_t aCoordType)
prio(high) sync OffsetAtPoint(uint64_t aID, int32_t aX, int32_t aY, uint32_t aCoordType)
returns(int32_t aRetVal);
nested(inside_sync) sync SelectionBoundsAt(uint64_t aID, int32_t aSelectionNum)
prio(high) sync SelectionBoundsAt(uint64_t aID, int32_t aSelectionNum)
returns(bool aSucceeded, nsString aData, int32_t aStartOffset, int32_t aEndOffset);
nested(inside_sync) sync SetSelectionBoundsAt(uint64_t aID, int32_t aSelectionNum,
prio(high) sync SetSelectionBoundsAt(uint64_t aID, int32_t aSelectionNum,
int32_t aStartOffset, int32_t aEndOffset)
returns(bool aSucceeded);
nested(inside_sync) sync AddToSelection(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset)
prio(high) sync AddToSelection(uint64_t aID, int32_t aStartOffset, int32_t aEndOffset)
returns(bool aSucceeded);
nested(inside_sync) sync RemoveFromSelection(uint64_t aID, int32_t aSelectionNum)
prio(high) 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);
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)
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)
returns(bool aValid);
nested(inside_sync) sync CopyText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
prio(high) sync CopyText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
returns(bool aValid);
nested(inside_sync) sync CutText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
prio(high) sync CutText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
returns(bool aValid);
nested(inside_sync) sync DeleteText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
prio(high) sync DeleteText(uint64_t aID, int32_t aStartPos, int32_t aEndPos)
returns(bool aValid);
nested(inside_sync) sync PasteText(uint64_t aID, int32_t aPosition)
prio(high) sync PasteText(uint64_t aID, int32_t aPosition)
returns(bool aValid);
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 ImagePosition(uint64_t aID, uint32_t aCoordType) returns(IntPoint aRetVal);
prio(high) sync ImageSize(uint64_t aID) returns(IntSize aRetVal);
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 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 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 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 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 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 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)
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)
returns(uint64_t aHeaderID, bool aOk);
nested(inside_sync) sync AtkTableRowHeader(uint64_t aID, int32_t aRow)
prio(high) sync AtkTableRowHeader(uint64_t aID, int32_t aRow)
returns(uint64_t aHeaderID, bool aOk);
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);
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);
async TakeSelection(uint64_t aID);
async SetSelected(uint64_t aID, bool aSelected);
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 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 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);
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);
async TakeFocus(uint64_t aID);
nested(inside_sync) sync FocusedChild(uint64_t aID)
prio(high) sync FocusedChild(uint64_t aID)
returns(uint64_t aChild, bool aOk);
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 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 AccessibleAtPoint(uint64_t aID, int32_t aX, int32_t aY, bool aNeedsScreenCoords, uint32_t aWhich)
prio(high) sync AccessibleAtPoint(uint64_t aID, int32_t aX, int32_t aY, bool aNeedsScreenCoords, uint32_t aWhich)
returns(uint64_t aResult, bool aOk);
nested(inside_sync) sync Extents(uint64_t aID, bool aNeedsScreenCoords)
prio(high) sync Extents(uint64_t aID, bool aNeedsScreenCoords)
returns(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight);
nested(inside_sync) sync DOMNodeID(uint64_t aID) returns(nsString aDOMNodeID);
prio(high) sync DOMNodeID(uint64_t aID) returns(nsString aDOMNodeID);
};
}

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

@ -111,7 +111,7 @@ union OptionalShmem
Shmem;
};
nested(upto inside_cpow) sync protocol PBrowser
prio(normal upto urgent) sync protocol PBrowser
{
manager PContent or PContentBridge;
@ -204,8 +204,8 @@ parent:
CpowEntry[] aCpows, Principal aPrincipal)
returns (StructuredCloneData[] retval);
nested(inside_sync) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal)
prio(high) 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
*/
nested(inside_cpow) sync NotifyIMEFocus(ContentCache contentCache,
IMENotification notification)
prio(urgent) sync NotifyIMEFocus(ContentCache contentCache,
IMENotification notification)
returns (nsIMEUpdatePreference preference);
/**
@ -228,16 +228,16 @@ parent:
* contentCache Cache of content
* notification Whole data of the notification
*/
nested(inside_cpow) async NotifyIMETextChange(ContentCache contentCache,
IMENotification notification);
prio(urgent) async NotifyIMETextChange(ContentCache contentCache,
IMENotification notification);
/**
* Notifies chrome that there is a IME compostion rect updated
*
* contentCache Cache of content
*/
nested(inside_cpow) async NotifyIMECompositionUpdate(ContentCache contentCache,
IMENotification notification);
prio(urgent) 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
*/
nested(inside_cpow) async NotifyIMESelection(ContentCache contentCache,
IMENotification notification);
prio(urgent) async NotifyIMESelection(ContentCache contentCache,
IMENotification notification);
/**
* Notifies chrome of updating its content cache.
@ -255,14 +255,14 @@ parent:
*
* contentCache Cache of content
*/
nested(inside_cpow) async UpdateContentCache(ContentCache contentCache);
prio(urgent) 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.
*/
nested(inside_cpow) sync NotifyIMEMouseButtonEvent(IMENotification notification)
prio(urgent) sync NotifyIMEMouseButtonEvent(IMENotification notification)
returns (bool consumedByIME);
/**
@ -270,8 +270,8 @@ parent:
*
* contentCache Cache of content
*/
nested(inside_cpow) async NotifyIMEPositionChange(ContentCache contentCache,
IMENotification notification);
prio(urgent) 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.
*/
nested(inside_cpow) sync RequestIMEToCommitComposition(bool cancel)
prio(urgent) sync RequestIMEToCommitComposition(bool cancel)
returns (bool isCommitted, nsString committedString);
/**
@ -295,7 +295,7 @@ parent:
*
* message The message value of the handled event.
*/
nested(inside_cpow) async OnEventNeedingAckHandled(EventMessage message);
prio(urgent) 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
*/
nested(inside_cpow) sync StartPluginIME(WidgetKeyboardEvent aKeyboardEvent,
int32_t panelX, int32_t panelY)
returns (nsString aCommitted);
prio(urgent) 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
*/
nested(inside_cpow) async SetPluginFocused(bool aFocused);
prio(urgent) 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.
*/
nested(inside_cpow) async OnWindowedPluginKeyEvent(NativeEventData aKeyEventData);
prio(urgent) async OnWindowedPluginKeyEvent(NativeEventData aKeyEventData);
/**
* When plugin event isn't consumed, call this
@ -353,16 +353,16 @@ parent:
nsCString[] enabledCommands,
nsCString[] disabledCommands);
nested(inside_cpow) sync GetInputContext() returns (int32_t IMEEnabled,
int32_t IMEOpen);
prio(urgent) sync GetInputContext() returns (int32_t IMEEnabled,
int32_t IMEOpen);
nested(inside_cpow) async SetInputContext(int32_t IMEEnabled,
int32_t IMEOpen,
nsString type,
nsString inputmode,
nsString actionHint,
int32_t cause,
int32_t focusChange);
prio(urgent) 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);
nested(inside_sync) sync DispatchWheelEvent(WidgetWheelEvent event);
nested(inside_sync) sync DispatchMouseEvent(WidgetMouseEvent event);
nested(inside_sync) sync DispatchKeyboardEvent(WidgetKeyboardEvent event);
prio(high) sync DispatchWheelEvent(WidgetWheelEvent event);
prio(high) sync DispatchMouseEvent(WidgetMouseEvent event);
prio(high) sync DispatchKeyboardEvent(WidgetKeyboardEvent event);
async InvokeDragSession(IPCDataTransfer[] transfers, uint32_t action,
OptionalShmem visualData,

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

@ -377,7 +377,7 @@ struct BlobURLRegistrationData
Principal principal;
};
nested(upto inside_cpow) sync protocol PContent
prio(normal upto urgent) sync protocol PContent
{
parent spawns PPluginModule;
@ -843,7 +843,7 @@ parent:
sync GetLookAndFeelCache()
returns (LookAndFeelInt[] lookAndFeelIntCache);
nested(inside_cpow) async PHal();
prio(urgent) async PHal();
async PHeapSnapshotTempFileHelper();
@ -857,7 +857,7 @@ parent:
async PSendStream();
nested(inside_sync) sync PScreenManager()
prio(high) sync PScreenManager()
returns (uint32_t numberOfScreens,
float systemDefaultScale,
bool success);
@ -868,7 +868,7 @@ parent:
async PSpeechSynthesis();
nested(inside_cpow) async PStorage();
prio(urgent) async PStorage();
async PTelephony();
@ -908,8 +908,8 @@ parent:
CpowEntry[] aCpows, Principal aPrincipal)
returns (StructuredCloneData[] retval);
nested(inside_sync) sync RpcMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal)
prio(high) 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.
*/
nested(inside_cpow) sync KeygenProcessValue(nsString oldValue,
nsString challenge,
nsString keytype,
nsString keyparams)
prio(urgent) sync KeygenProcessValue(nsString oldValue,
nsString challenge,
nsString keytype,
nsString keyparams)
returns (nsString newValue);
/**

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

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

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

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

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

@ -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.
*/
nested(upto inside_cpow) sync protocol PStorage
prio(normal upto urgent) sync protocol PStorage
{
manager PContent;
parent:
async __delete__();
nested(inside_cpow) sync Preload(nsCString originSuffix, nsCString originNoSuffix, uint32_t alreadyLoadedCount)
prio(urgent) sync Preload(nsCString originSuffix, nsCString originNoSuffix, uint32_t alreadyLoadedCount)
returns (nsString[] keys, nsString[] values, nsresult rv);
async AsyncPreload(nsCString originSuffix, nsCString originNoSuffix, bool priority);

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

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

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

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

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

@ -228,7 +228,8 @@ 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);
HELLO_MESSAGE_TYPE,
IPC::Message::PRIORITY_NORMAL);
// 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.

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

@ -45,15 +45,13 @@ Message::Message()
InitLoggingVariables();
}
Message::Message(int32_t routing_id, msgid_t type, NestedLevel nestedLevel, PriorityValue priority,
Message::Message(int32_t routing_id, msgid_t type, 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 = nestedLevel;
if (priority == HIGH_PRIORITY)
header()->flags |= PRIORITY_BIT;
header()->flags = priority;
if (compression == COMPRESSION_ENABLED)
header()->flags |= COMPRESS_BIT;
else if (compression == COMPRESSION_ALL)

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

@ -38,15 +38,10 @@ 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 {
NORMAL_PRIORITY,
HIGH_PRIORITY,
PRIORITY_NORMAL = 1,
PRIORITY_HIGH = 2,
PRIORITY_URGENT = 3
};
enum MessageCompression {
@ -61,10 +56,7 @@ 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,
NestedLevel nestedLevel = NOT_NESTED,
PriorityValue priority = NORMAL_PRIORITY,
Message(int32_t routing_id, msgid_t type, PriorityValue priority,
MessageCompression compression = COMPRESSION_NONE,
const char* const name="???");
@ -75,27 +67,13 @@ class Message : public Pickle {
Message& operator=(const Message& other) = delete;
Message& operator=(Message&& other);
NestedLevel nested_level() const {
return static_cast<NestedLevel>(header()->flags & NESTED_MASK);
}
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;
return static_cast<PriorityValue>(header()->flags & PRIORITY_MASK);
}
void set_priority(PriorityValue prio) {
header()->flags &= ~PRIORITY_BIT;
if (prio == HIGH_PRIORITY) {
header()->flags |= PRIORITY_BIT;
}
void set_priority(int prio) {
DCHECK((prio & ~PRIORITY_MASK) == 0);
header()->flags = (header()->flags & ~PRIORITY_MASK) | prio;
}
// True if this is a synchronous message.
@ -136,6 +114,27 @@ 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;
}
@ -270,14 +269,16 @@ class Message : public Pickle {
// flags
enum {
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,
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,
};
struct Header : Pickle::Header {

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

@ -39,41 +39,36 @@ static mozilla::LazyLogModule sLogModule("ipc");
* IPC design:
*
* There are three kinds of messages: async, sync, and intr. Sync and intr
* messages are blocking.
* messages are blocking. Only intr and high-priority sync messages can nest.
*
* 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 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.
* 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.
*
* 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
* 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
* M0, it will dispatch an incoming message M if:
* 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).
* 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).
*
* Messages satisfy the following properties:
* A. When waiting for a response to a sync message, we won't dispatch any
* messages of nesting level.
* B. Messages of the same nesting level will be dispatched roughly in the
* messages of lower priority.
* B. Messages of the same priority 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
@ -83,13 +78,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 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.
* 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.
*
* 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
* 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
* each other, a similar scheme is used to ensure that one side wins. The
* winning side is chosen based on the message type.
*
@ -292,11 +287,11 @@ public:
explicit AutoEnterTransaction(MessageChannel *aChan,
int32_t aMsgSeqno,
int32_t aTransactionID,
int aNestedLevel)
int aPriority)
: mChan(aChan),
mActive(true),
mOutgoing(true),
mNestedLevel(aNestedLevel),
mPriority(aPriority),
mSeqno(aMsgSeqno),
mTransaction(aTransactionID),
mNext(mChan->mTransactionStack)
@ -309,7 +304,7 @@ public:
: mChan(aChan),
mActive(true),
mOutgoing(false),
mNestedLevel(aMessage.nested_level()),
mPriority(aMessage.priority()),
mSeqno(aMessage.seqno()),
mTransaction(aMessage.transaction_id()),
mNext(mChan->mTransactionStack)
@ -334,11 +329,11 @@ public:
void Cancel() {
AutoEnterTransaction *cur = mChan->mTransactionStack;
MOZ_RELEASE_ASSERT(cur == this);
while (cur && cur->mNestedLevel != IPC::Message::NOT_NESTED) {
while (cur && cur->mPriority != IPC::Message::PRIORITY_NORMAL) {
// Note that, in the following situation, we will cancel multiple
// transactions:
// 1. Parent sends NESTED_INSIDE_SYNC message P1 to child.
// 2. Child sends NESTED_INSIDE_SYNC message C1 to child.
// 1. Parent sends high prio message P1 to child.
// 2. Child sends high prio 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
@ -361,12 +356,12 @@ public:
return mNext ? mNext->AwaitingSyncReply() : false;
}
int AwaitingSyncReplyNestedLevel() const {
int AwaitingSyncReplyPriority() const {
MOZ_RELEASE_ASSERT(mActive);
if (mOutgoing) {
return mNestedLevel;
return mPriority;
}
return mNext ? mNext->AwaitingSyncReplyNestedLevel() : 0;
return mNext ? mNext->AwaitingSyncReplyPriority() : 0;
}
bool DispatchingSyncMessage() const {
@ -377,17 +372,17 @@ public:
return mNext ? mNext->DispatchingSyncMessage() : false;
}
int DispatchingSyncMessageNestedLevel() const {
int DispatchingSyncMessagePriority() const {
MOZ_RELEASE_ASSERT(mActive);
if (!mOutgoing) {
return mNestedLevel;
return mPriority;
}
return mNext ? mNext->DispatchingSyncMessageNestedLevel() : 0;
return mNext ? mNext->DispatchingSyncMessagePriority() : 0;
}
int NestedLevel() const {
int Priority() const {
MOZ_RELEASE_ASSERT(mActive);
return mNestedLevel;
return mPriority;
}
int32_t SequenceNumber() const {
@ -461,7 +456,7 @@ private:
bool mOutgoing;
// Properties of the message being sent/received.
int mNestedLevel;
int mPriority;
int32_t mSeqno;
int32_t mTransaction;
@ -485,10 +480,10 @@ MessageChannel::MessageChannel(MessageListener *aListener)
mNextSeqno(0),
mLastSendError(SyncSendError::SendSuccess),
mDispatchingAsyncMessage(false),
mDispatchingAsyncMessageNestedLevel(0),
mDispatchingAsyncMessagePriority(0),
mTransactionStack(nullptr),
mTimedOutMessageSeqno(0),
mTimedOutMessageNestedLevel(0),
mTimedOutMessagePriority(0),
#if defined(MOZ_CRASHREPORTER) && defined(OS_WIN)
mPending(AnnotateAllocator<Message>(*this)),
#endif
@ -548,16 +543,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
// NESTED_INSIDE_SYNC message. In that case, we know for sure what the caller is
// high priority message. In that case, we know for sure what the caller is
// looking for.
int32_t
MessageChannel::CurrentNestedInsideSyncTransaction() const
MessageChannel::CurrentHighPriorityTransaction() const
{
mMonitor->AssertCurrentThreadOwns();
if (!mTransactionStack) {
return 0;
}
MOZ_RELEASE_ASSERT(mTransactionStack->NestedLevel() == IPC::Message::NESTED_INSIDE_SYNC);
MOZ_RELEASE_ASSERT(mTransactionStack->Priority() == IPC::Message::PRIORITY_HIGH);
return mTransactionStack->TransactionID();
}
@ -569,10 +564,10 @@ MessageChannel::AwaitingSyncReply() const
}
int
MessageChannel::AwaitingSyncReplyNestedLevel() const
MessageChannel::AwaitingSyncReplyPriority() const
{
mMonitor->AssertCurrentThreadOwns();
return mTransactionStack ? mTransactionStack->AwaitingSyncReplyNestedLevel() : 0;
return mTransactionStack ? mTransactionStack->AwaitingSyncReplyPriority() : 0;
}
bool
@ -583,10 +578,10 @@ MessageChannel::DispatchingSyncMessage() const
}
int
MessageChannel::DispatchingSyncMessageNestedLevel() const
MessageChannel::DispatchingSyncMessagePriority() const
{
mMonitor->AssertCurrentThreadOwns();
return mTransactionStack ? mTransactionStack->DispatchingSyncMessageNestedLevel() : 0;
return mTransactionStack ? mTransactionStack->DispatchingSyncMessagePriority() : 0;
}
static void
@ -802,7 +797,7 @@ class CancelMessage : public IPC::Message
{
public:
explicit CancelMessage(int transaction) :
IPC::Message(MSG_ROUTING_NONE, CANCEL_MESSAGE_TYPE)
IPC::Message(MSG_ROUTING_NONE, CANCEL_MESSAGE_TYPE, PRIORITY_NORMAL)
{
set_transaction_id(transaction);
}
@ -843,32 +838,32 @@ MessageChannel::MaybeInterceptSpecialIOMessage(const Message& aMsg)
bool
MessageChannel::ShouldDeferMessage(const Message& aMsg)
{
// Never defer messages that have the highest nested level, even async
// Never defer messages that have the highest priority, even async
// ones. This is safe because only the child can send these messages, so
// they can never nest.
if (aMsg.nested_level() == IPC::Message::NESTED_INSIDE_CPOW)
if (aMsg.priority() == IPC::Message::PRIORITY_URGENT)
return false;
// Unless they're NESTED_INSIDE_CPOW, we always defer async messages.
// Note that we never send an async NESTED_INSIDE_SYNC message.
// Unless they're urgent, we always defer async messages.
// Note that we never send an async high priority message.
if (!aMsg.is_sync()) {
MOZ_RELEASE_ASSERT(aMsg.nested_level() == IPC::Message::NOT_NESTED);
MOZ_RELEASE_ASSERT(aMsg.priority() == IPC::Message::PRIORITY_NORMAL);
return true;
}
int msgNestedLevel = aMsg.nested_level();
int waitingNestedLevel = AwaitingSyncReplyNestedLevel();
int msgPrio = aMsg.priority();
int waitingPrio = AwaitingSyncReplyPriority();
// 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)
// Always defer if the priority of the incoming message is less than the
// priority of the message we're awaiting.
if (msgPrio < waitingPrio)
return true;
// Never defer if the message has strictly greater nested level.
if (msgNestedLevel > waitingNestedLevel)
// Never defer if the message has strictly greater priority.
if (msgPrio > waitingPrio)
return false;
// When both sides send sync messages of the same nested level, we resolve the
// When both sides send sync messages of the same priority, 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.
@ -877,7 +872,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() != CurrentNestedInsideSyncTransaction();
return mSide == ParentSide && aMsg.transaction_id() != CurrentHighPriorityTransaction();
}
// Predicate that is true for messages that should be consolidated if 'compress' is set.
@ -922,9 +917,9 @@ MessageChannel::OnMessageReceivedFromLink(Message&& aMsg)
return;
}
// Nested messages cannot be compressed.
// Prioritized messages cannot be compressed.
MOZ_RELEASE_ASSERT(aMsg.compress_type() == IPC::Message::COMPRESSION_NONE ||
aMsg.nested_level() == IPC::Message::NOT_NESTED);
aMsg.priority() == IPC::Message::PRIORITY_NORMAL);
bool compress = false;
if (aMsg.compress_type() == IPC::Message::COMPRESSION_ENABLED) {
@ -974,7 +969,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 NESTED_INSIDE_SYNC, we wake up the main thread to
// - If the message is high priority, 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
@ -1026,13 +1021,13 @@ MessageChannel::ProcessPendingRequests(AutoEnterTransaction& aTransaction)
IPC_LOG("ProcessPendingRequests for seqno=%d, xid=%d",
aTransaction.SequenceNumber(), aTransaction.TransactionID());
// Loop until there aren't any more nested messages to process.
// Loop until there aren't any more priority 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 NOT_NESTED sync messages to be processed (but not
// NOT_NESTED async messages), which would break message ordering.
// cause even normal priority sync messages to be processed (but not
// normal priority async messages), which would break message ordering.
if (aTransaction.IsCanceled()) {
return;
}
@ -1047,7 +1042,7 @@ MessageChannel::ProcessPendingRequests(AutoEnterTransaction& aTransaction)
bool defer = ShouldDeferMessage(msg);
// Only log the interesting messages.
if (msg.is_sync() || msg.nested_level() == IPC::Message::NESTED_INSIDE_CPOW) {
if (msg.is_sync() || msg.priority() == IPC::Message::PRIORITY_URGENT) {
IPC_LOG("ShouldDeferMessage(seqno=%d) = %d", msg.seqno(), defer);
}
@ -1106,48 +1101,48 @@ MessageChannel::Send(Message* aMsg, Message* aReply)
return false;
}
if (DispatchingSyncMessageNestedLevel() == IPC::Message::NOT_NESTED &&
msg->nested_level() > IPC::Message::NOT_NESTED)
if (DispatchingSyncMessagePriority() == IPC::Message::PRIORITY_NORMAL &&
msg->priority() > IPC::Message::PRIORITY_NORMAL)
{
// Don't allow sending CPOWs while we're dispatching a sync message.
// If you want to do that, use sendRpcMessage instead.
IPC_LOG("Nested level forbids send");
IPC_LOG("Prio forbids send");
mLastSendError = SyncSendError::SendingCPOWWhileDispatchingSync;
return false;
}
if (DispatchingSyncMessageNestedLevel() == IPC::Message::NESTED_INSIDE_CPOW ||
DispatchingAsyncMessageNestedLevel() == IPC::Message::NESTED_INSIDE_CPOW)
if (DispatchingSyncMessagePriority() == IPC::Message::PRIORITY_URGENT ||
DispatchingAsyncMessagePriority() == IPC::Message::PRIORITY_URGENT)
{
// Generally only the parent dispatches urgent messages. And the only
// sync messages it can send are NESTED_INSIDE_SYNC. Mainly we want to ensure
// sync messages it can send are high-priority. Mainly we want to ensure
// here that we don't return false for non-CPOW messages.
MOZ_RELEASE_ASSERT(msg->nested_level() == IPC::Message::NESTED_INSIDE_SYNC);
MOZ_RELEASE_ASSERT(msg->priority() == IPC::Message::PRIORITY_HIGH);
IPC_LOG("Sending while dispatching urgent message");
mLastSendError = SyncSendError::SendingCPOWWhileDispatchingUrgent;
return false;
}
if (msg->nested_level() < DispatchingSyncMessageNestedLevel() ||
msg->nested_level() < AwaitingSyncReplyNestedLevel())
if (msg->priority() < DispatchingSyncMessagePriority() ||
msg->priority() < AwaitingSyncReplyPriority())
{
MOZ_RELEASE_ASSERT(DispatchingSyncMessage() || DispatchingAsyncMessage());
IPC_LOG("Cancel from Send");
CancelMessage *cancel = new CancelMessage(CurrentNestedInsideSyncTransaction());
CancelTransaction(CurrentNestedInsideSyncTransaction());
CancelMessage *cancel = new CancelMessage(CurrentHighPriorityTransaction());
CancelTransaction(CurrentHighPriorityTransaction());
mLink->SendMessage(cancel);
}
IPC_ASSERT(msg->is_sync(), "can only Send() sync messages here");
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,
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,
"not allowed to send messages while dispatching urgent messages");
IPC_ASSERT(DispatchingAsyncMessageNestedLevel() != IPC::Message::NESTED_INSIDE_CPOW,
IPC_ASSERT(DispatchingAsyncMessagePriority() != IPC::Message::PRIORITY_URGENT,
"not allowed to send messages while dispatching urgent messages");
if (!Connected()) {
@ -1159,21 +1154,21 @@ MessageChannel::Send(Message* aMsg, Message* aReply)
msg->set_seqno(NextSeqno());
int32_t seqno = msg->seqno();
int nestedLevel = msg->nested_level();
int prio = msg->priority();
msgid_t replyType = msg->type() + 1;
AutoEnterTransaction *stackTop = mTransactionStack;
// If the most recent message on the stack is NESTED_INSIDE_SYNC, then our
// If the most recent message on the stack is high priority, 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->NestedLevel() == IPC::Message::NESTED_INSIDE_SYNC;
bool nest = stackTop && stackTop->Priority() == IPC::Message::PRIORITY_HIGH;
int32_t transaction = nest ? stackTop->TransactionID() : seqno;
msg->set_transaction_id(transaction);
bool handleWindowsMessages = mListener->HandleWindowsMessages(*aMsg);
AutoEnterTransaction transact(this, seqno, transaction, nestedLevel);
AutoEnterTransaction transact(this, seqno, transaction, prio);
IPC_LOG("Send seqno=%d, xid=%d", seqno, transaction);
@ -1232,7 +1227,7 @@ MessageChannel::Send(Message* aMsg, Message* aReply)
IPC_LOG("Timing out Send: xid=%d", transaction);
mTimedOutMessageSeqno = seqno;
mTimedOutMessageNestedLevel = nestedLevel;
mTimedOutMessagePriority = prio;
mLastSendError = SyncSendError::TimedOut;
return false;
}
@ -1520,10 +1515,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 NOT_NESTED sync message S
// 2. parent sends a NESTED_INSIDE_SYNC sync message H at the same time
// 1. child sends a normal priority sync message S
// 2. parent sends a high priority sync message H at the same time
// 3. parent times out H
// 4. child starts processing H and sends a NESTED_INSIDE_SYNC message H' nested
// 4. child starts processing H and sends a high priority 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'.
@ -1531,13 +1526,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 nested level
// to process M. Those messages are the ones that have a higher priority
// 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.nested_level() > mTimedOutMessageNestedLevel ||
(msg.nested_level() == mTimedOutMessageNestedLevel
if (msg.priority() > mTimedOutMessagePriority ||
(msg.priority() == mTimedOutMessagePriority
&& msg.transaction_id() == mTimedOutMessageSeqno))
{
*recvd = Move(msg);
@ -1631,9 +1626,9 @@ MessageChannel::DispatchSyncMessage(const Message& aMsg, Message*& aReply)
{
AssertWorkerThread();
int nestedLevel = aMsg.nested_level();
int prio = aMsg.priority();
MOZ_RELEASE_ASSERT(nestedLevel == IPC::Message::NOT_NESTED || NS_IsMainThread());
MOZ_RELEASE_ASSERT(prio == IPC::Message::PRIORITY_NORMAL || NS_IsMainThread());
MessageChannel* dummy;
MessageChannel*& blockingVar = mSide == ChildSide && NS_IsMainThread() ? gParentProcessBlocker : dummy;
@ -1647,7 +1642,7 @@ MessageChannel::DispatchSyncMessage(const Message& aMsg, Message*& aReply)
if (!MaybeHandleError(rv, aMsg, "DispatchSyncMessage")) {
aReply = new Message();
aReply->set_sync();
aReply->set_nested_level(aMsg.nested_level());
aReply->set_priority(aMsg.priority());
aReply->set_reply();
aReply->set_reply_error();
}
@ -1667,9 +1662,9 @@ MessageChannel::DispatchAsyncMessage(const Message& aMsg)
Result rv;
{
int nestedLevel = aMsg.nested_level();
int prio = aMsg.priority();
AutoSetValue<bool> async(mDispatchingAsyncMessage, true);
AutoSetValue<int> nestedLevelSet(mDispatchingAsyncMessageNestedLevel, nestedLevel);
AutoSetValue<int> prioSet(mDispatchingAsyncMessagePriority, prio);
rv = mListener->OnMessageReceived(aMsg);
}
MaybeHandleError(rv, aMsg, "DispatchAsyncMessage");
@ -1780,7 +1775,7 @@ MessageChannel::MaybeUndeferIncall()
IPC_ASSERT(0 < mRemoteStackDepthGuess, "fatal logic error");
--mRemoteStackDepthGuess;
MOZ_RELEASE_ASSERT(call.nested_level() == IPC::Message::NOT_NESTED);
MOZ_RELEASE_ASSERT(call.priority() == IPC::Message::PRIORITY_NORMAL);
mPending.push_back(Move(call));
}
@ -2154,7 +2149,7 @@ class GoodbyeMessage : public IPC::Message
{
public:
GoodbyeMessage() :
IPC::Message(MSG_ROUTING_NONE, GOODBYE_MESSAGE_TYPE)
IPC::Message(MSG_ROUTING_NONE, GOODBYE_MESSAGE_TYPE, PRIORITY_NORMAL)
{
}
static bool Read(const Message* msg) {
@ -2343,7 +2338,7 @@ MessageChannel::EndTimeout()
IPC_LOG("Ending timeout of seqno=%d", mTimedOutMessageSeqno);
mTimedOutMessageSeqno = 0;
mTimedOutMessageNestedLevel = 0;
mTimedOutMessagePriority = 0;
for (size_t i = 0; i < mPending.size(); i++) {
// There may be messages in the queue that we expected to process from
@ -2380,7 +2375,7 @@ MessageChannel::CancelTransaction(int transaction)
EndTimeout();
// Normally mCurrentTransaction == 0 here. But it can be non-zero if:
// 1. Parent sends NESTED_INSIDE_SYNC message H.
// 1. Parent sends hi prio message H.
// 2. Parent times out H.
// 3. Child dispatches H and sends nested message H' (same transaction).
// 4. Parent dispatches H' and cancels.
@ -2400,8 +2395,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 NESTED_INSIDE_SYNC.
if (msg.is_sync() && msg.nested_level() != IPC::Message::NOT_NESTED) {
// cancelled. This happens if the message in the queue is high priority.
if (msg.is_sync() && msg.priority() != IPC::Message::PRIORITY_NORMAL) {
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());
@ -2425,17 +2420,17 @@ void
MessageChannel::CancelCurrentTransaction()
{
MonitorAutoLock lock(*mMonitor);
if (DispatchingSyncMessageNestedLevel() >= IPC::Message::NESTED_INSIDE_SYNC) {
if (DispatchingSyncMessageNestedLevel() == IPC::Message::NESTED_INSIDE_CPOW ||
DispatchingAsyncMessageNestedLevel() == IPC::Message::NESTED_INSIDE_CPOW)
if (DispatchingSyncMessagePriority() >= IPC::Message::PRIORITY_HIGH) {
if (DispatchingSyncMessagePriority() == IPC::Message::PRIORITY_URGENT ||
DispatchingAsyncMessagePriority() == IPC::Message::PRIORITY_URGENT)
{
mListener->IntentionalCrash();
}
IPC_LOG("Cancel requested: current xid=%d", CurrentNestedInsideSyncTransaction());
IPC_LOG("Cancel requested: current xid=%d", CurrentHighPriorityTransaction());
MOZ_RELEASE_ASSERT(DispatchingSyncMessage());
CancelMessage *cancel = new CancelMessage(CurrentNestedInsideSyncTransaction());
CancelTransaction(CurrentNestedInsideSyncTransaction());
CancelMessage *cancel = new CancelMessage(CurrentHighPriorityTransaction());
CancelTransaction(CurrentHighPriorityTransaction());
mLink->SendMessage(cancel);
}
}

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

@ -408,9 +408,9 @@ class MessageChannel : HasResultCodes
return mDispatchingAsyncMessage;
}
int DispatchingAsyncMessageNestedLevel() const {
int DispatchingAsyncMessagePriority() const {
AssertWorkerThread();
return mDispatchingAsyncMessageNestedLevel;
return mDispatchingAsyncMessagePriority;
}
bool Connected() const;
@ -626,7 +626,7 @@ class MessageChannel : HasResultCodes
};
bool mDispatchingAsyncMessage;
int mDispatchingAsyncMessageNestedLevel;
int mDispatchingAsyncMessagePriority;
// 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 CurrentNestedInsideSyncTransaction() const;
int32_t CurrentHighPriorityTransaction() const;
bool AwaitingSyncReply() const;
int AwaitingSyncReplyNestedLevel() const;
int AwaitingSyncReplyPriority() const;
bool DispatchingSyncMessage() const;
int DispatchingSyncMessageNestedLevel() const;
int DispatchingSyncMessagePriority() 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 mTimedOutMessageNestedLevel;
int mTimedOutMessagePriority;
// Queue of all incoming messages, except for replies to sync and urgent
// messages, which are delivered directly to mRecvd, and any pending urgent

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

@ -83,10 +83,10 @@ public:
ChannelOpened(TransportDescriptor aDescriptor,
ProcessId aOtherProcess,
ProtocolId aProtocol,
NestedLevel aNestedLevel = NOT_NESTED)
PriorityValue aPriority = PRIORITY_NORMAL)
: IPC::Message(MSG_ROUTING_CONTROL, // these only go to top-level actors
CHANNEL_OPENED_MESSAGE_TYPE,
aNestedLevel)
aPriority)
{
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::NESTED_INSIDE_CPOW))) {
IPC::Message::PRIORITY_URGENT))) {
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::NESTED_INSIDE_CPOW))) {
IPC::Message::PRIORITY_URGENT))) {
CloseDescriptor(parentSide);
CloseDescriptor(childSide);
return NS_ERROR_BRIDGE_OPEN_CHILD;

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

@ -25,7 +25,7 @@ public:
id_t aIPDLId,
size_t aSize,
SharedMemory::SharedMemoryType aType) :
IPC::Message(routingId, SHMEM_CREATED_MESSAGE_TYPE, NESTED_INSIDE_CPOW)
IPC::Message(routingId, SHMEM_CREATED_MESSAGE_TYPE, PRIORITY_URGENT)
{
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)
IPC::Message(routingId, SHMEM_DESTROYED_MESSAGE_TYPE, PRIORITY_NORMAL)
{
IPC::WriteParam(this, aIPDLId);
}

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

@ -4,9 +4,9 @@
import sys
NOT_NESTED = 1
INSIDE_SYNC_NESTED = 2
INSIDE_CPOW_NESTED = 3
NORMAL_PRIORITY = 1
HIGH_PRIORITY = 2
URGENT_PRIORITY = 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.nested = NOT_NESTED
self.priority = NORMAL_PRIORITY
self.spawnsStmts = [ ]
self.bridgesStmts = [ ]
self.opensStmts = [ ]
@ -296,7 +296,7 @@ class MessageDecl(Node):
Node.__init__(self, loc)
self.name = None
self.sendSemantics = ASYNC
self.nested = NOT_NESTED
self.priority = NORMAL_PRIORITY
self.direction = None
self.inParams = [ ]
self.outParams = [ ]

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

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

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

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

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

@ -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 NOT_NESTED, INSIDE_SYNC_NESTED, INSIDE_CPOW_NESTED
from ipdl.ast import NORMAL_PRIORITY, HIGH_PRIORITY, URGENT_PRIORITY
import ipdl.builtin as builtin
_DELETE_MSG = '__delete__'
@ -217,14 +217,14 @@ class IPDLType(Type):
@classmethod
def convertsTo(cls, lesser, greater):
if (lesser.nestedRange[0] < greater.nestedRange[0] or
lesser.nestedRange[1] > greater.nestedRange[1]):
if (lesser.priorityRange[0] < greater.priorityRange[0] or
lesser.priorityRange[1] > greater.priorityRange[1]):
return False
# Protocols that use intr semantics are not allowed to use
# message nesting.
# message priorities.
if (greater.isInterrupt() and
lesser.nestedRange != (NOT_NESTED, NOT_NESTED)):
lesser.priorityRange != (NORMAL_PRIORITY, NORMAL_PRIORITY)):
return False
if lesser.isAsync():
@ -251,14 +251,14 @@ class StateType(IPDLType):
return self.name()
class MessageType(IPDLType):
def __init__(self, nested, sendSemantics, direction,
def __init__(self, priority, 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.nested = nested
self.nestedRange = (nested, nested)
self.priority = priority
self.priorityRange = (priority, priority)
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, nestedRange, sendSemantics, stateless=False):
def __init__(self, qname, priorityRange, sendSemantics, stateless=False):
self.qname = qname
self.nestedRange = nestedRange
self.priorityRange = priorityRange
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.nestedRange, p.sendSemantics,
type=ProtocolType(qname, p.priorityRange, 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.nested, md.sendSemantics, md.direction,
msgtype = MessageType(md.priority, 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.nested == INSIDE_SYNC_NESTED and not mtype.isSync():
if mtype.priority == HIGH_PRIORITY and not mtype.isSync():
self.error(
loc,
"inside_sync nested messages must be sync (here, message `%s' in protocol `%s')",
"high priority messages must be sync (here, message `%s' in protocol `%s')",
mname, pname)
if mtype.nested == INSIDE_CPOW_NESTED and (mtype.isOut() or mtype.isInout()):
if mtype.priority == URGENT_PRIORITY and (mtype.isOut() or mtype.isInout()):
self.error(
loc,
"inside_cpow nested parent-to-child messages are verboten (here, message `%s' in protocol `%s')",
"urgent parent-to-child messages are verboten (here, message `%s' in protocol `%s')",
mname, pname)
# 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
# We allow high priority sync messages to be sent from the
# parent. Normal and urgent sync messages can only come from
# the child.
if mtype.isSync() and mtype.nested == NOT_NESTED and (mtype.isOut() or mtype.isInout()):
if mtype.isSync() and mtype.priority == NORMAL_PRIORITY and (mtype.isOut() or mtype.isInout()):
self.error(
loc,
"sync parent-to-child messages are verboten (here, message `%s' in protocol `%s')",

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

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

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

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

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

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

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

@ -1,20 +1,20 @@
namespace mozilla {
namespace _ipdltest {
nested(upto inside_sync) sync protocol PTestRPC
prio(normal upto high) sync protocol PTestRPC
{
parent:
nested(inside_sync) sync Test1_Start() returns (uint32_t result);
nested(inside_sync) sync Test1_InnerEvent() returns (uint32_t result);
prio(high) sync Test1_Start() returns (uint32_t result);
prio(high) sync Test1_InnerEvent() returns (uint32_t result);
async Test2_Start();
nested(inside_sync) sync Test2_OutOfOrder();
prio(high) sync Test2_OutOfOrder();
child:
async Start();
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();
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();
};
} // namespace _ipdltest

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

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

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

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

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

@ -15,7 +15,7 @@ using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
namespace mozilla {
namespace jsipc {
nested(upto inside_sync) sync protocol PJavaScript
prio(normal upto high) 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.
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 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 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 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 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 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 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);
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);
parent:
async __delete__();

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

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

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

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