Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,7 @@ class YarrGenerator final : public YarrJITInfo, private MacroAssembler {

if (!nonGreedyFailuresDecrementIndex.empty()) {
nonGreedyFailuresDecrementIndex.link(this);
breakpoint();
sub32(TrustedImm32(1), index);
}
nonGreedyFailures.link(this);
sub32(countRegister, index);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,4 +423,12 @@ public void onError() {
throw new AssertionError(ex);
}
}

// JDK-8282134 Certain regex can cause a JS trap in WebView
@Test public void jsRegexpTrapTest() {
final String FILE = "src/test/resources/test/html/unicode.html";
load(new File(FILE));
WebEngine web = getEngine();
assertTrue("Load task completed successfully", getLoadState() == SUCCEEDED);
}
}
13 changes: 13 additions & 0 deletions modules/javafx.web/src/test/resources/test/html/unicode.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<body>
<script>
let a = "\ud800\ud800\udc00"
let b = /(.*[^x]+?)[^]*([1])/u
b.exec(a)
</script>

<p id="regtest">PASS</p>

</body>
</html>