Skip to content

Commit 0c04af9

Browse files
authored
Inline URIUtils.js. NFC (#23496)
This is only three lines and doesn't warrant a separate file. Prior to #23297 it did need to be separately usable.
1 parent 3d19606 commit 0c04af9

6 files changed

+17
-25
lines changed

eslint.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ export default [{
5959
'src/proxyWorker.js',
6060
'src/proxyClient.js',
6161
'src/IDBStore.js',
62-
'src/URIUtils.js',
6362
'tools/experimental',
6463
],
6564
}, ...compat.extends('prettier'), js.configs.recommended, {

src/URIUtils.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/preamble.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,20 @@ var runtimeInitialized = false;
140140
var runtimeExited = false;
141141
#endif
142142

143-
#include "URIUtils.js"
143+
// Prefix of data URIs emitted by SINGLE_FILE and related options.
144+
var dataURIPrefix = 'data:application/octet-stream;base64,';
145+
146+
/**
147+
* Indicates whether filename is a base64 data URI.
148+
* @noinline
149+
*/
150+
var isDataURI = (filename) => filename.startsWith(dataURIPrefix);
151+
152+
/**
153+
* Indicates whether filename is delivered via file protocol (as opposed to http/https)
154+
* @noinline
155+
*/
156+
var isFileURI = (filename) => filename.startsWith('file://');
144157

145158
#include "runtime_shared.js"
146159

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
52732
1+
52681
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
28480
1+
28429
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
51515
1+
51464

0 commit comments

Comments
 (0)