Skip to content

Commit efe2210

Browse files
committed
Bug 1949859 [wpt PR 50879] - Fix a crash in AILanguageDetectorFactory::capabilities() called on a detached frame, a=testonly
Automatic update from web-platform-tests Fix a crash in AILanguageDetectorFactory::capabilities() called on a detached frame - Add [RaisesException] EA to AILanguageDetectorFactory::capabilities(), raise an exception when no execution context is present; - See if execution context is available before calling GetLanguageDetectionDriverRemote() - Add a CHECK() within GetLanguageDetectionDriverRemote() to enforce that. Bug: 384233287 Change-Id: I81486a91cf2cdc270562615ccbc4a91720ec3ff7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6289147 Commit-Queue: Andrey Kosyakov <caseqchromium.org> Reviewed-by: Mike Wasserman <mswchromium.org> Cr-Commit-Position: refs/heads/main{#1423264} -- wpt-commits: b26ba1d0251ab1e9db078ba18c83a953cfaeb580 wpt-pr: 50879 UltraBlame original commit: 7d75f7540c56ad68dde612e450e954020a8d8087
1 parent fae88c8 commit efe2210

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<title>Assures no crash upon call of LanguageDetectorFactory.capabilities() on a detached document</title>
3+
<link rel="author" href="mailto:[email protected]">
4+
<link rel="help" href="https://issues.chromium.org/issues/384233287">
5+
<body>
6+
<iframe src="about:blank"></iframe>
7+
<script>
8+
const factory = frames[0].ai.languageDetector;
9+
document.getElementsByTagName("iframe")[0].remove();
10+
factory.capabilities();
11+
</script>
12+
</body>

0 commit comments

Comments
 (0)