Skip to content

Commit

Permalink
[1.8>1.9] [MERGE #4684 @MikeHolman] fix assert in JIT data serialization
Browse files Browse the repository at this point in the history
Merge pull request #4684 from MikeHolman:serializedassert

We may have multiple codegen calls for same entrypoint, so replace the old JIT data if this happens

OS: 15845157
  • Loading branch information
MikeHolman committed Feb 15, 2018
2 parents 95875b5 + b7fdba0 commit c806128
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Runtime/Base/FunctionBody.h
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,12 @@ namespace Js
public:
void SetSerializedRpcData(const unsigned char* data, size_t size)
{
Assert(serializedRpcData == nullptr);
if (this->serializedRpcData != nullptr)
{
// We may have multiple codegens happen for same entrypoint
const unsigned char* rpcData = this->serializedRpcData;
HeapDeleteArray(this->serializedRpcDataSize, rpcData);
}
serializedRpcData = data;
serializedRpcDataSize = size;
}
Expand Down

0 comments on commit c806128

Please sign in to comment.