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 @@ -253,8 +253,6 @@ void FixedSizeBlobCopyJob::AfterThreadPoolWork(int status) {
253
253
}
254
254
255
255
void FixedSizeBlobCopyJob::DoThreadPoolWork () {
256
- Environment* env = AsyncWrap::env ();
257
- destination_ = ArrayBuffer::NewBackingStore (env->isolate (), length_);
258
256
unsigned char * dest = static_cast <unsigned char *>(destination_->Data ());
259
257
if (length_ > 0 ) {
260
258
size_t total = 0 ;
@@ -313,6 +311,8 @@ void FixedSizeBlobCopyJob::Run(const FunctionCallbackInfo<Value>& args) {
313
311
Environment* env = Environment::GetCurrent (args);
314
312
FixedSizeBlobCopyJob* job;
315
313
ASSIGN_OR_RETURN_UNWRAP (&job, args.Holder ());
314
+ job->destination_ =
315
+ ArrayBuffer::NewBackingStore (env->isolate (), job->length_ );
316
316
if (job->mode () == FixedSizeBlobCopyJob::Mode::ASYNC)
317
317
return job->ScheduleWork ();
318
318
You can’t perform that action at this time.
0 commit comments