You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError("The versions of JavaScriptKit are incompatible.");
147
158
}
148
159
}
160
+
getclosureHeap(): SwiftClosureHeap|null{
161
+
if(this._closureHeap)returnthis._closureHeap;
162
+
if(!this.instance)
163
+
thrownewError("WebAssembly instance is not set yet");
164
+
165
+
constexports=(this.instance
166
+
.exportsasany)asSwiftRuntimeExportedFunctions;
167
+
constfeatures=exports.swjs_library_features();
168
+
constlibrarySupportsWeakRef=
169
+
(features&LibraryFeatures.WeakRefs)!=0;
170
+
if(librarySupportsWeakRef){
171
+
if(typeofFinalizationRegistry!=="undefined"){
172
+
this._closureHeap=newSwiftClosureHeap(exports);
173
+
returnthis._closureHeap;
174
+
}else{
175
+
thrownewError(
176
+
"The Swift part of JavaScriptKit was configured to require the availability of JavaScript WeakRefs. Please build with `-Xswiftc -DJAVASCRIPTKIT_WITHOUT_WEAKREFS` to disable features that use WeakRefs."
0 commit comments