JSRuntime class
- Implemented types
- Mixed-in types
-
- AutoDisposeFinalizer
Constructors
- JSRuntime.new(JSRuntimeRef _ref, {bool autoDispose = true})
- JSRuntime.create({bool autoDispose = true})
-
factory
-
JSRuntime.create2(JSMallocFunctions jsMallocFunctions, Pointer<
Void> userOpaque, {bool autoDispose = true}) -
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- nativeFinalizer ↔ NativeFinalizer?
-
dart 对象回收器
getter/setter pairinherited
- ref → JSRuntimeRef
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
attach(
Pointer< NativeFinalizerFunction> callback, Pointer<Void> token, {bool autoDispose = true, Object? detach, int? externalSize}) → dynamic -
将引擎持有的指针和 dart 对象回收器绑定。确保 dart 对象销毁的时候,释放引擎持有的指针和资源
inherited
-
computeMemoryUsage(
JSMemoryUsage s) → void -
detach(
) → dynamic -
将引擎持有的指针和资源释放
inherited
-
dumpMemoryUsage(
Pointer< FILE> fp, JSMemoryUsage s) → void - FIXME: helper function with FILE
-
executePendingJob(
Pointer< JSContextRef> pctx) → int -
free(
) → void -
gc(
) → void -
getUserOpaque(
) → Pointer< Void> -
isJobPending(
) → bool -
isLiveObject(
JSValue v) → bool -
jsStdFreeHandlers(
) → void -
jsStdInitHandlers(
) → void -
markValue(
JSValue v, JS_MarkFunc markFunc) → void - invoke JS_MarkFunc when tag is JS_TAG_OBJECT/JS_TAG_FUNCTION_BYTECODE
-
newContext(
{bool autoDispose = true}) → JSContext -
newContextRaw(
{bool autoDispose = true}) → JSContext -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setCanBlock(
int canBlock) → void -
setHostPromiseRejectionTracker(
JSHostPromiseRejectionTracker cb, Uint8List user_data) → void -
setInfo(
String info) → void -
setInterruptHandler(
JSInterruptHandler cb, Uint8List user_data) → void -
setMaxStacKSize(
int stackSize) → void -
setMemoryLimit(
int gcThreshold) → void -
setModuleLoaderFunc(
JSModuleNormalizeFunc moduleNormalize, JSModuleLoaderFunc moduleLoader, {Uint8List? user_data}) → void -
setUserOpaque(
Uint8List userOpaque) → void -
toString(
) → String -
A string representation of this object.
inherited
-
updateStackTop(
) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited