Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
build: fix node_zlib.cc TTD code
Browse files Browse the repository at this point in the history
  • Loading branch information
boingoing committed Nov 15, 2018
1 parent 9e33b1f commit a62072a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/node_zlib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,14 @@ class ZCtx : public AsyncWrap, public ThreadPoolWork {
ZCtx* ctx;
ASSIGN_OR_RETURN_UNWRAP(&ctx, args.Holder());

ctx->Write<async>(flush, in, in_len, out, out_len);
ctx->Write<async>(flush, in, in_len, out, out_len, out_buf);
}

template <bool async>
void Write(uint32_t flush,
char* in, uint32_t in_len,
char* out, uint32_t out_len) {
char* out, uint32_t out_len,
Local<Object> out_buf) {
AllocScope alloc_scope(this);

CHECK(init_done_ && "write before init");
Expand Down Expand Up @@ -233,9 +234,9 @@ class ZCtx : public AsyncWrap, public ThreadPoolWork {

#if ENABLE_TTD_NODE
if (s_doTTRecord || s_doTTReplay) {
Buffer::TTDAsyncModRegister(out_buf, out);
Buffer::TTDAsyncModRegister(out_buf, (unsigned char*)out);

v8::Local<v8::ArrayBuffer> ttdbuf = ctx->write_result_ttdBuff->Buffer();
v8::Local<v8::ArrayBuffer> ttdbuf = write_result_ttdBuff->Buffer();
byte* ttdraw = static_cast<byte*>(ttdbuf->GetContents().Data());
ttdbuf->TTDRawBufferNotifyRegisterForModification(ttdraw);
}
Expand Down

0 comments on commit a62072a

Please sign in to comment.