diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/FileAPI/Blob.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/FileAPI/Blob.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/FileAPI/Blob.cpp b/Userland/Libraries/LibWeb/FileAPI/Blob.cpp index fbff037466..6d86e6c773 100644 --- a/Userland/Libraries/LibWeb/FileAPI/Blob.cpp +++ b/Userland/Libraries/LibWeb/FileAPI/Blob.cpp @@ -16,7 +16,7 @@ namespace Web::FileAPI { JS::NonnullGCPtr<Blob> Blob::create(JS::Realm& realm, ByteBuffer byte_buffer, DeprecatedString type) { - return JS::NonnullGCPtr(*realm.heap().allocate<Blob>(realm, realm, move(byte_buffer), move(type))); + return realm.heap().allocate<Blob>(realm, realm, move(byte_buffer), move(type)); } // https://w3c.github.io/FileAPI/#convert-line-endings-to-native @@ -139,7 +139,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Blob>> Blob::create(JS::Realm& realm, Optio { // 1. If invoked with zero parameters, return a new Blob object consisting of 0 bytes, with size set to 0, and with type set to the empty string. if (!blob_parts.has_value() && !options.has_value()) - return JS::NonnullGCPtr(*realm.heap().allocate<Blob>(realm, realm)); + return realm.heap().allocate<Blob>(realm, realm); ByteBuffer byte_buffer {}; // 2. Let bytes be the result of processing blob parts given blobParts and options. @@ -164,7 +164,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Blob>> Blob::create(JS::Realm& realm, Optio } // 4. Return a Blob object referring to bytes as its associated byte sequence, with its size set to the length of bytes, and its type set to the value of t from the substeps above. - return JS::NonnullGCPtr(*realm.heap().allocate<Blob>(realm, realm, move(byte_buffer), move(type))); + return realm.heap().allocate<Blob>(realm, realm, move(byte_buffer), move(type)); } WebIDL::ExceptionOr<JS::NonnullGCPtr<Blob>> Blob::construct_impl(JS::Realm& realm, Optional<Vector<BlobPart>> const& blob_parts, Optional<BlobPropertyBag> const& options) @@ -233,7 +233,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Blob>> Blob::slice(Optional<i64> start, Opt // b. S.size = span. // c. S.type = relativeContentType. auto byte_buffer = TRY_OR_RETURN_OOM(realm(), m_byte_buffer.slice(relative_start, span)); - return JS::NonnullGCPtr(*heap().allocate<Blob>(realm(), realm(), move(byte_buffer), move(relative_content_type))); + return heap().allocate<Blob>(realm(), realm(), move(byte_buffer), move(relative_content_type)); } // https://w3c.github.io/FileAPI/#dom-blob-text |