Commit 17ed3cb
[dart2js] Fix URI leak when using deferred load
Passed library name instead of URI to "checkDeferredLoad" in the
generated JS. The URI was only used to report errors on library load at
runtime - the user should be able to to find the URI in the dart import
statemement instead.
Closes #37623
Notes:
- The URI is also stored in the deferred library's source map. If finding
this information on load failure is too inconvenient, we might consider
storing the URI in the main source map as well, and making sure that the
URI is loaded from the source map on load failure at runtime, for better
error reporting for users who have access to the source maps.
- Not sure how much work is needed for this to be done, so leaving this
until the need arises.
Change-Id: I90caa560e7c57c61e810b9ca4cfc648cddba5905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122200
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>1 parent 6ca96ac commit 17ed3cb
File tree
3 files changed
+5
-7
lines changed- pkg/compiler/lib/src/ssa
- sdk_nnbd/lib/_internal/js_runtime/lib
- sdk/lib/_internal/js_runtime/lib
3 files changed
+5
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1709 | 1709 | | |
1710 | 1710 | | |
1711 | 1711 | | |
1712 | | - | |
1713 | | - | |
1714 | 1712 | | |
1715 | 1713 | | |
1716 | | - | |
| 1714 | + | |
1717 | 1715 | | |
1718 | 1716 | | |
1719 | 1717 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3074 | 3074 | | |
3075 | 3075 | | |
3076 | 3076 | | |
3077 | | - | |
| 3077 | + | |
3078 | 3078 | | |
3079 | | - | |
| 3079 | + | |
3080 | 3080 | | |
3081 | 3081 | | |
3082 | 3082 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3076 | 3076 | | |
3077 | 3077 | | |
3078 | 3078 | | |
3079 | | - | |
| 3079 | + | |
3080 | 3080 | | |
3081 | | - | |
| 3081 | + | |
3082 | 3082 | | |
3083 | 3083 | | |
3084 | 3084 | | |
| |||
0 commit comments