mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1167423 - patch 3 - Handle return values of FallibleTArray functions in MutationObserver, r=smaug
This commit is contained in:
parent
98514d828a
commit
4cb28b400a
@ -693,7 +693,9 @@ nsDOMMutationObserver::TakeRecords(
|
||||
}
|
||||
|
||||
void
|
||||
nsDOMMutationObserver::GetObservingInfo(nsTArray<Nullable<MutationObservingInfo> >& aResult)
|
||||
nsDOMMutationObserver::GetObservingInfo(
|
||||
nsTArray<Nullable<MutationObservingInfo>>& aResult,
|
||||
mozilla::ErrorResult& aRv)
|
||||
{
|
||||
aResult.SetCapacity(mReceivers.Count());
|
||||
for (int32_t i = 0; i < mReceivers.Count(); ++i) {
|
||||
@ -712,7 +714,10 @@ nsDOMMutationObserver::GetObservingInfo(nsTArray<Nullable<MutationObservingInfo>
|
||||
mozilla::dom::Sequence<nsString>& filtersAsStrings =
|
||||
info.mAttributeFilter.Value();
|
||||
for (int32_t j = 0; j < filters.Count(); ++j) {
|
||||
filtersAsStrings.AppendElement(nsDependentAtomString(filters[j]));
|
||||
if (!filtersAsStrings.AppendElement(nsDependentAtomString(filters[j]))) {
|
||||
aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
info.mObservedNode = mr->Target();
|
||||
|
@ -493,7 +493,8 @@ public:
|
||||
|
||||
void HandleMutation();
|
||||
|
||||
void GetObservingInfo(nsTArray<Nullable<MutationObservingInfo> >& aResult);
|
||||
void GetObservingInfo(nsTArray<Nullable<MutationObservingInfo>>& aResult,
|
||||
mozilla::ErrorResult& aRv);
|
||||
|
||||
mozilla::dom::MutationCallback* MutationCallback() { return mCallback; }
|
||||
|
||||
|
@ -43,7 +43,7 @@ interface MutationObserver {
|
||||
void disconnect();
|
||||
sequence<MutationRecord> takeRecords();
|
||||
|
||||
[ChromeOnly]
|
||||
[ChromeOnly, Throws]
|
||||
sequence<MutationObservingInfo?> getObservingInfo();
|
||||
[ChromeOnly]
|
||||
readonly attribute MutationCallback mutationCallback;
|
||||
|
Loading…
Reference in New Issue
Block a user