File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -253,8 +253,6 @@ void FixedSizeBlobCopyJob::AfterThreadPoolWork(int status) {
253253}
254254
255255void FixedSizeBlobCopyJob::DoThreadPoolWork () {
256- Environment* env = AsyncWrap::env ();
257- destination_ = ArrayBuffer::NewBackingStore (env->isolate (), length_);
258256 unsigned char * dest = static_cast <unsigned char *>(destination_->Data ());
259257 if (length_ > 0 ) {
260258 size_t total = 0 ;
@@ -313,6 +311,8 @@ void FixedSizeBlobCopyJob::Run(const FunctionCallbackInfo<Value>& args) {
313311 Environment* env = Environment::GetCurrent (args);
314312 FixedSizeBlobCopyJob* job;
315313 ASSIGN_OR_RETURN_UNWRAP (&job, args.Holder ());
314+ job->destination_ =
315+ ArrayBuffer::NewBackingStore (env->isolate (), job->length_ );
316316 if (job->mode () == FixedSizeBlobCopyJob::Mode::ASYNC)
317317 return job->ScheduleWork ();
318318
You can’t perform that action at this time.
0 commit comments