Skip to content

Commit 748fda9

Browse files
author
Patrick Soquet
committed
XS: #479 #480
1 parent a8e1d81 commit 748fda9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

xs/sources/xsDataView.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,11 @@ void fxBuildDataView(txMachine* the)
286286
slot = fxBuildHostConstructor(the, mxCallback(fx_TypedArray), 3, mxID(dispatch->constructorID));
287287
the->stackPrototypes[-1 - dispatch->constructorID] = *the->stack; //@@
288288
slot->value.instance.prototype = constructor;
289+
property = mxFunctionInstanceHome(slot);
290+
slot = property->next;
291+
property = fxNextTypeDispatchProperty(the, property, (txTypeDispatch*)dispatch, (txTypeAtomics*)atomics, XS_NO_ID, XS_INTERNAL_FLAG | XS_GET_ONLY);
292+
property->next = slot;
289293
slot = fxLastProperty(the, slot);
290-
slot = fxNextTypeDispatchProperty(the, slot, (txTypeDispatch*)dispatch, (txTypeAtomics*)atomics, XS_NO_ID, XS_INTERNAL_FLAG | XS_GET_ONLY);
291294
slot = fxNextIntegerProperty(the, slot, dispatch->size, mxID(_BYTES_PER_ELEMENT), XS_GET_ONLY);
292295
the->stack++;
293296
}
@@ -1085,8 +1088,9 @@ txSlot* fxConstructTypedArray(txMachine* the)
10851088
txSlot* instance;
10861089
if (mxIsUndefined(mxTarget))
10871090
mxTypeError("call: TypedArray");
1091+
dispatch = mxFunctionInstanceHome(mxFunction->value.reference);
1092+
dispatch = dispatch->next;
10881093
prototype = mxBehaviorGetProperty(the, mxFunction->value.reference, mxID(_prototype), XS_NO_ID, XS_ANY);
1089-
dispatch = prototype->next;
10901094
if (!dispatch || (dispatch->kind != XS_TYPED_ARRAY_KIND))
10911095
mxTypeError("new: TypedArray");
10921096
mxPushSlot(mxTarget);

0 commit comments

Comments
 (0)