Skip to content

Commit 274dfdc

Browse files
committed
latest core-js
1 parent d8c571d commit 274dfdc

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/changes/changes.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88

99
<body>
1010
<release version="4.8.0" date="December xx, 2024" description="Bugfixes">
11+
<action type="add" dev="RhinoTeam">
12+
core-js: Allow symbol keys in getter/setter in object literal syntax like 'var o = { get [aSymbol]: value }'.
13+
</action>
14+
<action type="add" dev="RhinoTeam">
15+
core-js: Support for generator methods in object literals like 'o = {*g() {...}}' added.
16+
</action>
17+
<action type="add" dev="RhinoTeam">
18+
core-js: Implement the super operator - which can actually be used outside of classes and will do something that intuitively is "refer to the prototype".
19+
</action>
20+
<action type="fix" dev="RhinoTeam">
21+
core-js: Fix tokenEnd and cursor for string, template, xml literals and multiline comments when using multibyte characters.
22+
</action>
1123
<action type="update" dev="rbri">
1224
Upgrade Apache commons-text to 1.13.0.
1325
</action>

src/main/java/org/htmlunit/javascript/HtmlUnitContextFactory.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@
1818
import static org.htmlunit.BrowserVersionFeatures.JS_PROPERTY_DESCRIPTOR_NAME;
1919

2020
import java.io.Serializable;
21+
import java.util.function.Consumer;
2122

2223
import org.htmlunit.BrowserVersion;
2324
import org.htmlunit.ScriptException;
2425
import org.htmlunit.ScriptPreProcessor;
2526
import org.htmlunit.WebClient;
2627
import org.htmlunit.corejs.javascript.Callable;
28+
import org.htmlunit.corejs.javascript.CompilerEnvirons;
2729
import org.htmlunit.corejs.javascript.Context;
2830
import org.htmlunit.corejs.javascript.ContextAction;
2931
import org.htmlunit.corejs.javascript.ContextFactory;
@@ -156,7 +158,8 @@ public void terminateScriptIfNecessary() {
156158
@Override
157159
protected Script compileString(String source, final Evaluator compiler,
158160
final ErrorReporter compilationErrorReporter, final String sourceName,
159-
final int lineno, final Object securityDomain) {
161+
final int lineno, final Object securityDomain,
162+
final Consumer<CompilerEnvirons> compilerEnvironsProcessor) {
160163

161164
// this method gets called by Context.compileString and by ScriptRuntime.evalSpecial
162165
// which is used for window.eval. We have to take care in which case we are.
@@ -192,7 +195,7 @@ protected Script compileString(String source, final Evaluator compiler,
192195
source = preProcess(page, source, sourceName, lineno, null);
193196

194197
return super.compileString(source, compiler, compilationErrorReporter,
195-
sourceName, lineno, securityDomain);
198+
sourceName, lineno, securityDomain, compilerEnvironsProcessor);
196199
}
197200

198201
@Override

0 commit comments

Comments
 (0)