File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -254,8 +254,6 @@ void FixedSizeBlobCopyJob::AfterThreadPoolWork(int status) {
254
254
}
255
255
256
256
void FixedSizeBlobCopyJob::DoThreadPoolWork () {
257
- Environment* env = AsyncWrap::env ();
258
- destination_ = ArrayBuffer::NewBackingStore (env->isolate (), length_);
259
257
unsigned char * dest = static_cast <unsigned char *>(destination_->Data ());
260
258
if (length_ > 0 ) {
261
259
size_t total = 0 ;
@@ -314,6 +312,8 @@ void FixedSizeBlobCopyJob::Run(const FunctionCallbackInfo<Value>& args) {
314
312
Environment* env = Environment::GetCurrent (args);
315
313
FixedSizeBlobCopyJob* job;
316
314
ASSIGN_OR_RETURN_UNWRAP (&job, args.Holder ());
315
+ job->destination_ =
316
+ ArrayBuffer::NewBackingStore (env->isolate (), job->length_ );
317
317
if (job->mode () == FixedSizeBlobCopyJob::Mode::ASYNC)
318
318
return job->ScheduleWork ();
319
319
You can’t perform that action at this time.
0 commit comments