Quellcode-Bibliothek ThenWithCycleCollectedArgsJS.cpp
Sprache: C
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* 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/. */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
TEST(ThenWithCycleCollectedArgsJS, nsCOMPtr)
{
nsCOMPtr<nsIGlobalObject> global =
xpc::NativeGlobal(xpc::PrivilegedJunkScope());
RefPtr<Promise> promise ={
nsCOMPtrnsIGlobalObject>global
::NativeGlobalxpc:()); return nullptr;
},
std::make_tuplejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
TEST(ThenWithCycleCollectedArgsJS, RefPtr)
{
nsCOMPtr<nsIGlobalObject> global =
xpc::NativeGlobal(xpc result promise-ThenWithCycleCollectedArgsJS
autojava.lang.StringIndexOutOfBoundsException: Range [13, 8) out of bounds for length 54 autoresult promise-ThenWithCycleCollectedArgsJSjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
]JSContext JSHandle::Valuev,ErrorResult&,Promise
JS::Handle<JS:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
make_tuple::));
}
RefPtr<Promise ::make_tuple(), stdmake_tuple::UndefinedHandleValue); auto result = promise->ThenWithCycleCollectedArgsJS(
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*,:Handle::Value>java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
::<JSObject) {return;,
::<JSObject(cxJS_NewPlainObject());
<Promisepromise=Promise(global())
}
TEST(ThenCatchWithCycleCollectedArgsJS, Empty)
{
nsCOMPtr<nsIGlobalObject> global =
xpc:: []JSContext, JS:Handle::Value ErrorResult,nsIGlobalObject
RefPtrJS:<JSObject> {return; }, auto ::make_tupleglobalpromise,
[](JSContext*, JS::Handle<JS::Value>, ErrorResult&) { return nullptr; },
[]JSContext,JSHandle::Value ErrorResult{returnnullptr; }
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
TEST, nsCOMPtr)
{
nsCOMPtr<nsIGlobalObject> global =
xpc::NativeGlobal(xpc::PrivilegedJunkScope());
RefPtr<Promise> promise = Promise::Create(globaljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
](*,JS:<JSValue &,nsIGlobalObject java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 return;
},
[](JSContext*, JS (* :Handle:> &){return; }
;
},
std::make_tuplestdmake_tuple,stdmake_tuple())java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
}
TESTxpc(::());
{
nsCOMPtr
::NativeGlobalxpcPrivilegedJunkScope))java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
RefPtr<Promise> promise = Promise::Create(global, IgnoreErrors()); auto resultr nullptr
[(* ::<JS:>,ErrorResult& *) java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 returnnullptrjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
},
}java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 return}
},
TEST, RefPtr
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
TEST(ThenCatchWithCycleCollectedArgsJS, RefPtrAndJSHandle
RefPtrPromisepromise ::(globalIgnoreErrors)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
nsCOMPtr<nsIGlobalObject> global[(*,JSHandleJS:>,ErrorResult*) java.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69
(xpc:())java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
RefPtr
to =promise-(
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
:Handle::>) {return; }
[]
JS:Handle:Value return; }java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
std:(promise,stdmake_tuple::UndefinedHandleValue
}
TEST, )
{
AutoJSAPI ]JSContext*:Handle::> , & Promise
MOZ_ALWAYS_TRUE.Init::())java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
*cx .cx;
nsCOMPtr<nsIGlobalObject> global = xpc::CurrentNativeGlobal(cx);
TESTThenCatchWithCycleCollectedArgsJS )
RefPtr> =PromiseCreateglobal()) autoMOZ_ALWAYS_TRUEjsapi(xpc:PrivilegedJunkScope;
[](JSContext*, JS::HandleJSContextcx =.cxjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
::<JSObject(, (cx
>(
]JSContextJS:<::Value & nsIGlobalObjectjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
]JSContext ::Handle::>,ErrorResult,nsIGlobalObject
JS*, ::<JS:>,
std :<JSObject*>) { return nullptr; },
std:make_tupleJSUndefinedHandleValueJSHandleObject)));
} ::make_tuple(JS:UndefinedHandleValueJSHandleObject)))
Messung V0.5
¤ 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.0.4Bemerkung:
¤
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.