Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ option(JSRUNTIMEHOST_POLYFILL_FILE "Include JsRuntimeHost Polyfill File and File
option(JSRUNTIMEHOST_POLYFILL_PERFORMANCE "Include JsRuntimeHost Polyfill Performance." ON)
option(JSRUNTIMEHOST_POLYFILL_TEXTDECODER "Include JsRuntimeHost Polyfill TextDecoder." ON)
option(JSRUNTIMEHOST_POLYFILL_TEXTENCODER "Include JsRuntimeHost Polyfill TextEncoder." ON)
option(JSRUNTIMEHOST_POLYFILL_STREAMS "Include JsRuntimeHost Polyfill Web Streams." ON)

# Sanitizers
option(ENABLE_SANITIZERS "Enable AddressSanitizer and UBSan" OFF)
Expand Down
1 change: 1 addition & 0 deletions Polyfills/Blob/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
set(SOURCES
"Include/Babylon/Polyfills/Blob.h"
"README.md"
"Source/Blob.cpp"
"Source/Blob.h")

Expand Down
12 changes: 12 additions & 0 deletions Polyfills/Blob/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Blob

Provides the browser `Blob` constructor, byte/text readers, zero-copy Blob
composition and slicing, and a lazily pulled byte `ReadableStream`.

Call `Babylon::Polyfills::Streams::Initialize` before using `Blob.stream()` on
engines that do not provide Web Streams. Stream reads copy only the requested
chunk into JavaScript-owned memory; composing Blobs and slicing share immutable
native byte segments.

The focused tests are adapted from WPT `FileAPI/blob`, WebKit's Blob stream
chunk/crash regressions, and Firefox's large Blob `pipeTo` regression.
Loading