icecat: add release icecat-140.10.1-1gnu1 for ecne
This commit is contained in:
parent
a5f93cb214
commit
ff85d7c623
1256 changed files with 63469 additions and 24141 deletions
|
|
@ -8,8 +8,8 @@
|
|||
#define mozilla_dom_QueueWithSizes_h
|
||||
|
||||
#include <cmath>
|
||||
#include "js/TypeDecls.h"
|
||||
#include "js/Value.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "nsTArray.h"
|
||||
|
|
@ -83,8 +83,9 @@ inline void EnqueueValueWithSize(QueueContainingClass aContainer,
|
|||
|
||||
// https://streams.spec.whatwg.org/#dequeue-value
|
||||
template <class QueueContainingClass>
|
||||
inline void DequeueValue(QueueContainingClass aContainer,
|
||||
JS::MutableHandle<JS::Value> aResultValue) {
|
||||
inline void DequeueValue(JSContext* aCx, QueueContainingClass aContainer,
|
||||
JS::MutableHandle<JS::Value> aResultValue,
|
||||
ErrorResult& aRv) {
|
||||
// Step 1. Implicit via template instantiation.
|
||||
// Step 2.
|
||||
MOZ_ASSERT(!aContainer->Queue().isEmpty());
|
||||
|
|
@ -104,12 +105,18 @@ inline void DequeueValue(QueueContainingClass aContainer,
|
|||
|
||||
// Step 7.
|
||||
aResultValue.set(valueWithSize->mValue);
|
||||
valueWithSize.reset();
|
||||
if (!JS_WrapValue(aCx, aResultValue)) {
|
||||
aResultValue.setUndefined();
|
||||
aRv.StealExceptionFromJSContext(aCx);
|
||||
}
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#peek-queue-value
|
||||
template <class QueueContainingClass>
|
||||
inline void PeekQueueValue(QueueContainingClass aContainer,
|
||||
JS::MutableHandle<JS::Value> aResultValue) {
|
||||
inline void PeekQueueValue(JSContext* aCx, QueueContainingClass aContainer,
|
||||
JS::MutableHandle<JS::Value> aResultValue,
|
||||
ErrorResult& aRv) {
|
||||
// Step 1. Assert: container has [[queue]] and [[queueTotalSize]] internal
|
||||
// slots.
|
||||
// Step 2. Assert: container.[[queue]] is not empty.
|
||||
|
|
@ -120,6 +127,11 @@ inline void PeekQueueValue(QueueContainingClass aContainer,
|
|||
|
||||
// Step 4. Return valueWithSize’s value.
|
||||
aResultValue.set(valueWithSize->mValue);
|
||||
valueWithSize = nullptr;
|
||||
if (!JS_WrapValue(aCx, aResultValue)) {
|
||||
aResultValue.setUndefined();
|
||||
aRv.StealExceptionFromJSContext(aCx);
|
||||
}
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#reset-queue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue