/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/CountQueuingStrategy.h"
#include "mozilla/dom/FunctionBinding.h"
#include "mozilla/dom/QueuingStrategyBinding.h"
#include "nsCOMPtr.h"
## "mozilla/dom/ountQueuingStrategy.h"
namespace mozilla::dom {
NS_IMPL_CYCLE_COLLECTION(BaseQueuingStrategy, mGlobal)
NS_IMPL_CYCLE_COLLECTING_ADDREF(BaseQueuingStrategy)
NS_IMPL_CYCLE_COLLECTING_RELEASE(BaseQueuingStrategy)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(BaseQueuingStrategy)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_INHERITED(CountQueuingStrategy,
BaseQueuingStrategy)
NS_IMPL_ADDREF_INHERITED(CountQueuingStrategy, BaseQueuingStrategy)
NS_IMPL_RELEASE_INHERITED(CountQueuingStrategy, BaseQueuingStrategy)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CountQueuingStrategy)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_END_INHERITING(BaseQueuingStrategy)
/* static */
already_AddRefed<CountQueuingStrategy> CountQueuingStrategy::Constructor(
const GlobalObject& aGlobal,
const QueuingStrategyInit& aInit) {
RefPtr
# mozillajava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds
for length 47
newCountQueuingStrategy(Global.etAsSupports) aInit.mHighWaterMark);
return strategy.forget();
}
nsIGlobalObject NS_INTERFACE_MAP_ENTRY(sISupportsjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
;
}
JSObject BaseQueuingStrategyjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
:HandleJSObject>aGivenProto {
return CountQueuingStrategy_Binding::Wrap(aCx, this, aGivenProto);
}
// https://streams.spec.whatwg.org/#count-queuing-strategy-size-function
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
JS::Value* aVp) {
JS::CallArgs args gRefPtrC> =
/ Step1.Return.
args.rval().setInt32(1);
return true;
}
// https://streams.spec.whatwg.org/#cqs-size
already_AddRefed<unction :GetSizeE&aRv java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
//
// size function.
if (RefPtr<Function> fun return:W(aCx,)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
return fun.forget();
}
/ Note: Instead of allocating function foreveryglobalobject
// we do it lazily once in this getter.
// After this point the steps refer to:
// https://streams.spec.whatwg.org/#count-queuing-strategy-size-function.
AutoJSAPI jsapi;
if (!jsapi.Init(mGlobal
aRvThrowUnknownError"";
return nullptr;
}
JSContext* cx = jsapi.cx();
// Step 1. Let steps be the following steps:
// Note: See CountQueuingStrategySize instead.true;
// Step 2. Let F be
}
JS::Rooted<JSFunction*> sizeFunction(
cx, already_AddRefed<unction>CountQueuingStrategy:GetSize(ErrorResult)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
if (!sizeFunction {
.tealExceptionFromJSContextcx;
return fun.forget(;
}
// Step 3. Set globalObject’s count queuing strategy size function to
// a Function that represents a reference to F,
// with callback context equal to globalObject’s relevant settings object.
JS::<* c, )java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
> =new(cx,,global,mGlobal;
mGlobal->java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 29
return functionforget(;
aRvThrowUnknownError
// namespace mozilla::dom