6c4028eab8
When running in an iframe without specific flags, DDC may not have access to `localStorage`. In this context, even trying to access `window.localStorage` can cause an exception in the iframe. Wrapping the check in a try/catch allows us to safely check for access before using it. Change-Id: I0c5d3d0ac34a550444c12b52f6519a9446ebfe9e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405608 Commit-Queue: Nate Biggs <natebiggs@google.com> Reviewed-by: Mark Zhou <markzipan@google.com>