Skip to content

Commit

Permalink
latest core-js
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Dec 16, 2024
1 parent d8c571d commit 274dfdc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@

<body>
<release version="4.8.0" date="December xx, 2024" description="Bugfixes">
<action type="add" dev="RhinoTeam">
core-js: Allow symbol keys in getter/setter in object literal syntax like 'var o = { get [aSymbol]: value }'.
</action>
<action type="add" dev="RhinoTeam">
core-js: Support for generator methods in object literals like 'o = {*g() {...}}' added.
</action>
<action type="add" dev="RhinoTeam">
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".
</action>
<action type="fix" dev="RhinoTeam">
core-js: Fix tokenEnd and cursor for string, template, xml literals and multiline comments when using multibyte characters.
</action>
<action type="update" dev="rbri">
Upgrade Apache commons-text to 1.13.0.
</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
import static org.htmlunit.BrowserVersionFeatures.JS_PROPERTY_DESCRIPTOR_NAME;

import java.io.Serializable;
import java.util.function.Consumer;

import org.htmlunit.BrowserVersion;
import org.htmlunit.ScriptException;
import org.htmlunit.ScriptPreProcessor;
import org.htmlunit.WebClient;
import org.htmlunit.corejs.javascript.Callable;
import org.htmlunit.corejs.javascript.CompilerEnvirons;
import org.htmlunit.corejs.javascript.Context;
import org.htmlunit.corejs.javascript.ContextAction;
import org.htmlunit.corejs.javascript.ContextFactory;
Expand Down Expand Up @@ -156,7 +158,8 @@ public void terminateScriptIfNecessary() {
@Override
protected Script compileString(String source, final Evaluator compiler,
final ErrorReporter compilationErrorReporter, final String sourceName,
final int lineno, final Object securityDomain) {
final int lineno, final Object securityDomain,
final Consumer<CompilerEnvirons> compilerEnvironsProcessor) {

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

return super.compileString(source, compiler, compilationErrorReporter,
sourceName, lineno, securityDomain);
sourceName, lineno, securityDomain, compilerEnvironsProcessor);
}

@Override
Expand Down

0 comments on commit 274dfdc

Please sign in to comment.