Bug 1558685 [wpt PR 17279] - [ES6 modules] Fix crash when dynamic import from an inactive browsing context, a=testonly

Automatic update from web-platform-tests
[ES6 modules] Fix crash when dynamic import from an inactive browsing context

Bug: 972960, 961674
Change-Id: Iff5c464dcc5227f211462f0e1b70c938fab452c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1654370
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#669989}

--

wpt-commits: 61c3d0684043fa5e60a5b6cffc6426bd18405f4c
wpt-pr: 17279
This commit is contained in:
Kouhei Ueno 2019-07-19 12:24:34 +00:00 коммит произвёл James Graham
Родитель 17b559c9a2
Коммит 75fbf734bf
1 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Dynamic import triggered from inactive context should not crash</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="container">
<iframe></iframe>
</div>
<script>
test(() => {
const iframe = document.querySelector('iframe');
const otherWindow = iframe.contentWindow;
iframe.remove();
// Below should not crash
otherWindow.eval(`import('foobar');`);
}, 'dynamic import from inactive context should not crash');
</script>