Skip to content

Commit 1a623ed

Browse files
authored
Move promise polyfill into polyfill subdirectory. NFC (#15939)
This lays the groundwork to add more polyfills over time. Since its preferable to use standard polyfills (not authored as part of emscripten), we exclude this directory from lint checking (i.e. we treat it as third-party code). Split out from #15822
1 parent adee9c8 commit 1a623ed

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ ignorePatterns:
1111
- "cache/"
1212
- "third_party/"
1313
- "tests/"
14+
- "src/polyfill/"
1415
- "src/library*.js"
1516
- "src/runtime_*.js"
1617
- "src/shell*.js"
@@ -30,7 +31,6 @@ ignorePatterns:
3031
- "src/memoryprofiler.js"
3132
- "src/support.js"
3233
- "src/gl-matrix.js"
33-
- "src/promise_polyfill.js"
3434
- "src/headless.js"
3535
- "src/headlessCanvas.js"
3636
- "src/emscripten-source-map.min.js"
File renamed without changes.

src/shell.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var Module = typeof {{{ EXPORT_NAME }}} !== 'undefined' ? {{{ EXPORT_NAME }}} :
4040
// Include a Promise polyfill for legacy browsers. This is needed either for
4141
// wasm2js, where we polyfill the wasm API which needs Promises, or when using
4242
// modularize which creates a Promise for when the module is ready.
43-
#include "promise_polyfill.js"
43+
#include "polyfill/promise.js"
4444
#endif
4545

4646
// See https://caniuse.com/mdn-javascript_builtins_object_assign

0 commit comments

Comments
 (0)