Skip to content

Commit 5a3a468

Browse files
committed
avoid ConcurrentModificationExceptions in frame processing
1 parent a60cc55 commit 5a3a468

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/changes/changes.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,21 @@
88

99
<body>
1010
<release version="4.8.0" date="December xx, 2024" description="Bugfixes">
11+
<action type="fix" dev="rbri">
12+
Avoid ConcurrentModificationExceptions in frame processing.
13+
</action>
14+
<action type="fix" dev="RhinoTeam">
15+
core-js: handle stack frames in the correct order.
16+
</action>
17+
<action type="add" dev="rbri">
18+
cssparser: support hwb(), lab(), lch(), oklab(), and oklch() color definitions.
19+
</action>
20+
<action type="add" dev="rbri">
21+
cssparser: add support for 'none' in modern color definitions.
22+
</action>
1123
<action type="fix" dev="rbri">
1224
core-js: fix border checks for typedarray set-method (see https://github.com/HtmlUnit/htmlunit-core-js/issues/27)
25+
</action>
1326
<action type="add" dev="RhinoTeam">
1427
core-js: Allow symbol keys in getter/setter in object literal syntax like 'var o = { get [aSymbol]: value }'.
1528
</action>

src/main/java/org/htmlunit/html/HtmlPage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public void initialize() throws IOException, FailingHttpStatusCodeException {
295295
executeEventHandlersIfNeeded(Event.TYPE_LOAD);
296296
}
297297

298-
for (final BaseFrameElement frameElement : frameElements_) {
298+
for (final BaseFrameElement frameElement : new ArrayList<>(frameElements_)) {
299299
if (frameElement instanceof HtmlFrame) {
300300
final Page page = frameElement.getEnclosedWindow().getEnclosedPage();
301301
if (page != null && page.isHtmlPage()) {
@@ -1896,7 +1896,7 @@ private void calculateBase() {
18961896
* {@link WebClientOptions#setThrowExceptionOnFailingStatusCode(boolean)} is set to {@code true}
18971897
*/
18981898
void loadFrames() throws FailingHttpStatusCodeException {
1899-
for (final BaseFrameElement frameElement : frameElements_) {
1899+
for (final BaseFrameElement frameElement : new ArrayList<>(frameElements_)) {
19001900
// test if the frame should really be loaded:
19011901
// if a script has already changed its content, it should be skipped
19021902
// use == and not equals(...) to identify initial content (versus URL set to "about:blank")

0 commit comments

Comments
 (0)