-
Notifications
You must be signed in to change notification settings - Fork 637
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Metro currently offers Source Maps via an HTTP interface. Recent versions of Chrome have stopped fetching Source Maps from HTTP URLs. Source Maps can be delivered as a data URL, so this change makes the Inspector Proxy: - extract source map HTTP URLs from the `scriptParsed` CDP message - perform the HTTP fetch on the source map URL - encode the resulting source map as a data URL - replace the HTTP URL with the data URL before forwarding the message to Chrome This restores source mapping functionality to applications being debugged using Metro and the Inspector Proxy. This change includes a safeguard to ensure we don't try to embed excessively large source maps (~350 megabytes plain, ~500 megabytes when base64 encoded). There are longer-term plans to fetch source maps via new mechanisms. In the meantime, this change will allow re-use of the existing HTTP interface for fetching source maps. Reviewed By: newobj Differential Revision: D42973408 fbshipit-source-id: c3d4512bb6ec9524b7f27a5b35e990b719648ee3
- Loading branch information
1 parent
1a9c719
commit 6690b39
Showing
2 changed files
with
75 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters