aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/wasm/api/sqlite3-api-prologue.js4
-rw-r--r--ext/wasm/speedtest1-kvvfs.html2
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/wasm/api/sqlite3-api-prologue.js b/ext/wasm/api/sqlite3-api-prologue.js
index 3d6d4c92b..1fc533da6 100644
--- a/ext/wasm/api/sqlite3-api-prologue.js
+++ b/ext/wasm/api/sqlite3-api-prologue.js
@@ -818,7 +818,7 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
string (the default) then both are counted. Only storage keys
which match the pattern used by kvvfs are counted. The returned
value is the "length" value of every matching key and value,
- noting that the kvvf uses only ASCII keys and values.
+ noting that JavaScript stores each character in 2 bytes.
Note that the returned size is not authoritative from the
perspective of how much data can fit into localStorage and
@@ -839,7 +839,7 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap(
}
}
});
- return sz;
+ return sz * 2 /* because JS uses UC16 encoding */;
};
/**
diff --git a/ext/wasm/speedtest1-kvvfs.html b/ext/wasm/speedtest1-kvvfs.html
index 9bb387643..82d32f4fe 100644
--- a/ext/wasm/speedtest1-kvvfs.html
+++ b/ext/wasm/speedtest1-kvvfs.html
@@ -77,7 +77,7 @@
}
}
});
- return sz;
+ return sz * 2 /* for 16-bit-char encoding */;
};
const clearStorage = function(){
sessionStorage.clear();