Skip to content

Commit

Permalink
Add comment about copying blob content
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiltd committed Dec 9, 2024
1 parent e7be7c3 commit 58e2d05
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions builtins/web/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ bool File::constructor(JSContext *cx, unsigned argc, JS::Value *vp) {
RootedObject other_blob(cx, File::blob(&other.toObject()));
RootedValue blob_copy(cx);

// Calling slice with no arguments copies the entire blob's content.
if (!Blob::slice(cx, other_blob, CallArgs(), &blob_copy)) {
return false;
}
Expand Down

0 comments on commit 58e2d05

Please sign in to comment.