bump base64 from 0.10 to 0.21 (#29804)

* bump base64 from 0.10 to 0.21

* Fix configuration of bitflags

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Tuna 2023-08-03 00:25:37 +03:00 committed by GitHub
parent ad0fa77456
commit 4c8db6af87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 103 additions and 86 deletions

View file

@ -25,7 +25,7 @@ use crate::realms::enter_realm;
use crate::script_runtime::JSContext;
use crate::task_source::file_reading::FileReadingTask;
use crate::task_source::{TaskSource, TaskSourceName};
use base64;
use base64::Engine;
use dom_struct::dom_struct;
use encoding_rs::{Encoding, UTF_8};
use js::jsapi::Heap;
@ -89,7 +89,7 @@ pub struct FileReaderSharedFunctionality;
impl FileReaderSharedFunctionality {
pub fn dataurl_format(blob_contents: &[u8], blob_type: String) -> DOMString {
let base64 = base64::encode(&blob_contents);
let base64 = base64::engine::general_purpose::STANDARD.encode(&blob_contents);
let dataurl = if blob_type.is_empty() {
format!("data:base64,{}", base64)