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
Fixing HeapFree AV
We have allocated objectBeforeCollectCallbackList object on HeapAllocator but
we freed this by ArenaAllocator::Free function. Fixed that by allocate that object
onto ArenaAllocator.
/// Free current object (which was created upon JsVarSerializer) when the serialization is done. SerializerHandleBase object should not be used further after FreeSelf call.
1691
+
/// </summary>
1607
1692
virtualvoidFreeSelf() =0;
1608
-
};
1693
+
}SerializerHandleBase;
1609
1694
1610
-
classDeserializerCallbackBase
1695
+
/// <summary>
1696
+
/// A callback structure to facilitate de-serialization work.
1697
+
/// </summary>
1698
+
typedefstructDeserializerCallbackBase
1611
1699
{
1612
1700
public:
1701
+
1702
+
/// <summary>
1703
+
/// A callback to ask host to read the current data from the serialization buffer as a Host object.
1704
+
/// </summary>
1705
+
/// <returns>
1706
+
/// A valid host object is returned upon success, an exception is thrown otherwise.
1707
+
/// </returns>
1613
1708
virtualJsValueRefReadHostObject() =0;
1709
+
1710
+
/// <summary>
1711
+
/// A callback to ask host to retrieve SharedArrayBuffer object from given ID.
1712
+
/// </summary>
1713
+
/// <param name="id">An ID, which was provided by SerializerCallbackBase::GetSharedArrayBufferId method</param>
1714
+
/// <returns>
1715
+
/// A valid SharedArrayBuffer is returned upon success, an exception is thrown otherwise.
/// Free current object (which was created upon JsVarDeserializer) when the deserialization is done. DeserializerHandleBase object should not be used further after FreeSelf call.
1768
+
/// </summary>
1625
1769
virtualvoidFreeSelf() =0;
1626
-
};
1770
+
}DeserializerHandleBase;
1627
1771
1772
+
/// <summary>
1773
+
/// Initialize Serialization of the object.
1774
+
/// </summary>
1775
+
/// <param name="serializerCallback">A callback object to interact with host during serialization.</param>
1776
+
/// <param name="serializerHandle">A handle which provides various functionalities to serailize objects</param>
1777
+
/// <returns>
1778
+
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
1779
+
/// </returns>
1628
1780
CHAKRA_API
1629
1781
JsVarSerializer(
1630
-
_In_SerializerCallbackBase*delegate,
1782
+
_In_SerializerCallbackBase*serializerCallback,
1631
1783
_Out_SerializerHandleBase**serializerHandle);
1632
1784
1785
+
/// <summary>
1786
+
/// Initiate Deserialization of the memory buffer to a Javascript object.
1787
+
/// </summary>
1788
+
/// <param name="data">A memory buffer which holds the serialized data</param>
1789
+
/// <param name="size">Length of the passed data in bytes</param>
1790
+
/// <param name="deserializerCallback">A callback object to interact with host during deserialization</param>
1791
+
/// <param name="deserializerHandle">A handle which provides various functionalities to deserailize a buffer to an object</param>
1792
+
/// <returns>
1793
+
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
0 commit comments