Skip to content

Commit 28663e5

Browse files
Version 7.4.5: [V8] Added AddPerformanceObject and SetTimerResolution to V8ScriptEngineFlags (GitHub Discussion microsoft#568); [V8] Enhanced execution and termination transitions, fixing GitHub Issue microsoft#560; optimized document code for string documents (GitHub Discussion microsoft#567); switched to Clang and C++20 on all platforms; added .NET 8 targets to test projects; updated API and build documentation. Tested with V8 12.3.219.12.
1 parent 78916b6 commit 28663e5

File tree

909 files changed

+2819
-2206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

909 files changed

+2819
-2206
lines changed

ClearScript/DefaultDocumentLoader.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ private async Task<Document> LoadDocumentAsync(DocumentSettings settings, Uri ur
289289
}
290290

291291
var documentInfo = new DocumentInfo(uri) { Category = category, ContextCallback = contextCallback };
292-
byte[] bytes = null;
293292

294293
if (!settings.AccessFlags.HasFlag(DocumentAccessFlags.UseAsyncLoadCallback))
295294
{
@@ -301,14 +300,13 @@ private async Task<Document> LoadDocumentAsync(DocumentSettings settings, Uri ur
301300
var callback = settings.AsyncLoadCallback;
302301
if (callback != null)
303302
{
304-
bytes = Encoding.UTF8.GetBytes(contents);
305303
var documentInfoRef = ValueRef.Create(documentInfo);
306-
await callback(documentInfoRef, new MemoryStream(bytes, false)).ConfigureAwait(false);
304+
await callback(documentInfoRef, new MemoryStream(Encoding.UTF8.GetBytes(contents), false)).ConfigureAwait(false);
307305
documentInfo = documentInfoRef.Value;
308306
}
309307
}
310308

311-
var document = CacheDocument((bytes != null) ? new StringDocument(documentInfo, bytes) : new StringDocument(documentInfo, contents), false);
309+
var document = CacheDocument(new StringDocument(documentInfo, contents), false);
312310

313311
var expectedCategory = category ?? DocumentCategory.Script;
314312
if (!settings.AccessFlags.HasFlag(DocumentAccessFlags.AllowCategoryMismatch) && (documentInfo.Category != expectedCategory))

ClearScript/Exports/VersionSymbols.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#pragma once
77

8-
#define CLEARSCRIPT_VERSION_STRING "7.4.4"
9-
#define CLEARSCRIPT_VERSION_COMMA_SEPARATED 7,4,4
10-
#define CLEARSCRIPT_VERSION_STRING_INFORMATIONAL "7.4.4"
8+
#define CLEARSCRIPT_VERSION_STRING "7.4.5"
9+
#define CLEARSCRIPT_VERSION_COMMA_SEPARATED 7,4,5
10+
#define CLEARSCRIPT_VERSION_STRING_INFORMATIONAL "7.4.5"
1111
#define CLEARSCRIPT_FILE_FLAGS 0L

ClearScript/HostSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static class HostSettings
4242
/// </summary>
4343
/// <remarks>
4444
/// When not explicitly assigned to a non-<c>null</c> value, this property returns the
45-
/// <see cref="CustomAttributeLoader.Default">default custom attribute loader.</see>.
45+
/// <see cref="CustomAttributeLoader.Default">default custom attribute loader</see>.
4646
/// </remarks>
4747
public static CustomAttributeLoader CustomAttributeLoader
4848
{

ClearScript/IScriptEngine.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ public interface IScriptEngine : IDisposable
886886
/// <summary>
887887
/// Executes script code with an associated document name.
888888
/// </summary>
889-
/// <param name="documentName">A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
889+
/// <param name="documentName">A document name for the script code. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
890890
/// <param name="code">The script code to execute.</param>
891891
/// <remarks>
892892
/// <para>
@@ -904,7 +904,7 @@ public interface IScriptEngine : IDisposable
904904
/// <summary>
905905
/// Executes script code with an associated document name, optionally discarding the document after execution.
906906
/// </summary>
907-
/// <param name="documentName">A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
907+
/// <param name="documentName">A document name for the script code. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
908908
/// <param name="discard"><c>True</c> to discard the script document after execution, <c>false</c> otherwise.</param>
909909
/// <param name="code">The script code to execute.</param>
910910
/// <remarks>
@@ -1009,7 +1009,7 @@ public interface IScriptEngine : IDisposable
10091009
/// <summary>
10101010
/// Evaluates script code with an associated document name.
10111011
/// </summary>
1012-
/// <param name="documentName">A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
1012+
/// <param name="documentName">A document name for the script code. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
10131013
/// <param name="code">The script code to evaluate.</param>
10141014
/// <returns>The result value.</returns>
10151015
/// <remarks>
@@ -1032,7 +1032,7 @@ public interface IScriptEngine : IDisposable
10321032
/// <summary>
10331033
/// Evaluates script code with an associated document name, optionally discarding the document after execution.
10341034
/// </summary>
1035-
/// <param name="documentName">A document name for the script code. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
1035+
/// <param name="documentName">A document name for the script code. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
10361036
/// <param name="discard"><c>True</c> to discard the script document after execution, <c>false</c> otherwise.</param>
10371037
/// <param name="code">The script code to evaluate.</param>
10381038
/// <returns>The result value.</returns>

ClearScript/Properties/AssemblyInfo.Core.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
[assembly: InternalsVisibleTo("ClearScriptTest")]
1919

2020
[assembly: ComVisible(false)]
21-
[assembly: AssemblyVersion("7.4.4")]
22-
[assembly: AssemblyFileVersion("7.4.4")]
23-
[assembly: AssemblyInformationalVersion("7.4.4")]
21+
[assembly: AssemblyVersion("7.4.5")]
22+
[assembly: AssemblyFileVersion("7.4.5")]
23+
[assembly: AssemblyInformationalVersion("7.4.5")]
2424

2525
namespace Microsoft.ClearScript.Properties
2626
{
2727
internal static class ClearScriptVersion
2828
{
29-
public const string Triad = "7.4.4";
30-
public const string Informational = "7.4.4";
29+
public const string Triad = "7.4.5";
30+
public const string Informational = "7.4.5";
3131
}
3232
}

ClearScript/Properties/AssemblyInfo.V8.ICUData.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
[assembly: InternalsVisibleTo("ClearScript.V8")]
1616

1717
[assembly: ComVisible(false)]
18-
[assembly: AssemblyVersion("7.4.4")]
19-
[assembly: AssemblyFileVersion("7.4.4")]
20-
[assembly: AssemblyInformationalVersion("7.4.4")]
18+
[assembly: AssemblyVersion("7.4.5")]
19+
[assembly: AssemblyFileVersion("7.4.5")]
20+
[assembly: AssemblyInformationalVersion("7.4.5")]

ClearScript/Properties/AssemblyInfo.V8.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
[assembly: InternalsVisibleTo("ClearScriptTest")]
1616

1717
[assembly: ComVisible(false)]
18-
[assembly: AssemblyVersion("7.4.4")]
19-
[assembly: AssemblyFileVersion("7.4.4")]
20-
[assembly: AssemblyInformationalVersion("7.4.4")]
18+
[assembly: AssemblyVersion("7.4.5")]
19+
[assembly: AssemblyFileVersion("7.4.5")]
20+
[assembly: AssemblyInformationalVersion("7.4.5")]

ClearScript/Properties/AssemblyInfo.Windows.Core.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616
[assembly: InternalsVisibleTo("ClearScriptTest")]
1717

1818
[assembly: ComVisible(false)]
19-
[assembly: AssemblyVersion("7.4.4")]
20-
[assembly: AssemblyFileVersion("7.4.4")]
21-
[assembly: AssemblyInformationalVersion("7.4.4")]
19+
[assembly: AssemblyVersion("7.4.5")]
20+
[assembly: AssemblyFileVersion("7.4.5")]
21+
[assembly: AssemblyInformationalVersion("7.4.5")]

ClearScript/Properties/AssemblyInfo.Windows.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
[assembly: InternalsVisibleTo("ClearScriptTest")]
1616

1717
[assembly: ComVisible(false)]
18-
[assembly: AssemblyVersion("7.4.4")]
19-
[assembly: AssemblyFileVersion("7.4.4")]
20-
[assembly: AssemblyInformationalVersion("7.4.4")]
18+
[assembly: AssemblyVersion("7.4.5")]
19+
[assembly: AssemblyFileVersion("7.4.5")]
20+
[assembly: AssemblyInformationalVersion("7.4.5")]

ClearScript/ScriptEngine.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public abstract class ScriptEngine : IScriptEngine, IHostContext
3737
/// <summary>
3838
/// Initializes a new script engine instance.
3939
/// </summary>
40-
/// <param name="name">A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
40+
/// <param name="name">A name to associate with the instance. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
4141
[Obsolete("Use ScriptEngine(string name, string fileNameExtensions) instead.")]
4242
protected ScriptEngine(string name)
4343
: this(name, null)
@@ -47,7 +47,7 @@ protected ScriptEngine(string name)
4747
/// <summary>
4848
/// Initializes a new script engine instance with the specified list of supported file name extensions.
4949
/// </summary>
50-
/// <param name="name">A name to associate with the instance. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
50+
/// <param name="name">A name to associate with the instance. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
5151
/// <param name="fileNameExtensions">A semicolon-delimited list of supported file name extensions.</param>
5252
protected ScriptEngine(string name, string fileNameExtensions)
5353
{

0 commit comments

Comments
 (0)