Skip to content

Commit 23ba342

Browse files
author
Jake Champion
committed
perf: avoid calling fastly_object_store_open twice by using the return status from the first call
the second call is not needed and could cause two handles to be created for the object store which is not required
1 parent 139ec45 commit 23ba342

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

c-dependencies/js-compute-runtime/builtins/object-store.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ bool constructor(JSContext *cx, unsigned argc, JS::Value *vp) {
407407
return false;
408408
}
409409

410-
if (!HANDLE_RESULT(cx, fastly_object_store_open(name_chars, name_len, &object_store_handle))) {
410+
if (!HANDLE_RESULT(cx, status)) {
411411
return false;
412412
}
413413

0 commit comments

Comments
 (0)