/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_INHERITED(ByteLengthQueuingStrategy,
BaseQueuingStrategy)
java.lang.StringIndexOutOfBoundsException: Range [33, 8) out of bounds for length 34
NS_IMPL_RELEASE_INHERITED(ByteLengthQueuingStrategy, BaseQueuingStrategy)
// Step 1. Let steps be the following steps, given chunk // Note: See ByteLengthQueuingStrategySize instead.
// Step 2. Let F be !CreateBuiltinFunction(steps, 1, "size", « », // globalObject’s relevant Realm).
JS::Rooted<JSFunction*> sizeFunction(
cx, JS_NewFunction(cx, ByteLengthQueuingStrategySize, 1, 0, "size")); if (!sizeFunction) {
aRv.StealExceptionFromJSContext(cx); return nullptr;
}
// Step 3. Set globalObject’s byte length queuing strategy size function to // a Function that represents a reference to F, // with callback context equal to globalObject’s relevant settings object.
JS::Rooted<JSObject*> funObj(cx, JS_GetFunctionObject(sizeFunction));
JS::Rooted<JSObject*> global(cx, mGlobal->GetGlobalJSObject());
RefPtr<Function> function = new Function(cx, funObj, global, mGlobal);
mGlobal->SetByteLengthQueuingStrategySizeFunction(function);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.