Version 7.4.5: [V8] Added AddPerformanceObject and SetTimerResolution to V8ScriptEngineFlags (GitHub Discussion #568); [V8] Enhanced execution and termination transitions, fixing GitHub Issue #560; optimized document code for string documents (GitHub Discussion #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.

This commit is contained in:
ClearScript 2024-03-24 20:48:28 -04:00
Родитель 78916b6215
Коммит 28663e58e6
909 изменённых файлов: 2822 добавлений и 2209 удалений

Просмотреть файл

@ -289,7 +289,6 @@ namespace Microsoft.ClearScript
}
var documentInfo = new DocumentInfo(uri) { Category = category, ContextCallback = contextCallback };
byte[] bytes = null;
if (!settings.AccessFlags.HasFlag(DocumentAccessFlags.UseAsyncLoadCallback))
{
@ -301,14 +300,13 @@ namespace Microsoft.ClearScript
var callback = settings.AsyncLoadCallback;
if (callback != null)
{
bytes = Encoding.UTF8.GetBytes(contents);
var documentInfoRef = ValueRef.Create(documentInfo);
await callback(documentInfoRef, new MemoryStream(bytes, false)).ConfigureAwait(false);
await callback(documentInfoRef, new MemoryStream(Encoding.UTF8.GetBytes(contents), false)).ConfigureAwait(false);
documentInfo = documentInfoRef.Value;
}
}
var document = CacheDocument((bytes != null) ? new StringDocument(documentInfo, bytes) : new StringDocument(documentInfo, contents), false);
var document = CacheDocument(new StringDocument(documentInfo, contents), false);
var expectedCategory = category ?? DocumentCategory.Script;
if (!settings.AccessFlags.HasFlag(DocumentAccessFlags.AllowCategoryMismatch) && (documentInfo.Category != expectedCategory))

Просмотреть файл

@ -5,7 +5,7 @@
#pragma once
#define CLEARSCRIPT_VERSION_STRING "7.4.4"
#define CLEARSCRIPT_VERSION_COMMA_SEPARATED 7,4,4
#define CLEARSCRIPT_VERSION_STRING_INFORMATIONAL "7.4.4"
#define CLEARSCRIPT_VERSION_STRING "7.4.5"
#define CLEARSCRIPT_VERSION_COMMA_SEPARATED 7,4,5
#define CLEARSCRIPT_VERSION_STRING_INFORMATIONAL "7.4.5"
#define CLEARSCRIPT_FILE_FLAGS 0L

Просмотреть файл

@ -42,7 +42,7 @@ namespace Microsoft.ClearScript
/// </summary>
/// <remarks>
/// When not explicitly assigned to a non-<c>null</c> value, this property returns the
/// <see cref="CustomAttributeLoader.Default">default custom attribute loader.</see>.
/// <see cref="CustomAttributeLoader.Default">default custom attribute loader</see>.
/// </remarks>
public static CustomAttributeLoader CustomAttributeLoader
{

Просмотреть файл

@ -886,7 +886,7 @@ namespace Microsoft.ClearScript
/// <summary>
/// Executes script code with an associated document name.
/// </summary>
/// <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>
/// <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>
/// <param name="code">The script code to execute.</param>
/// <remarks>
/// <para>
@ -904,7 +904,7 @@ namespace Microsoft.ClearScript
/// <summary>
/// Executes script code with an associated document name, optionally discarding the document after execution.
/// </summary>
/// <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>
/// <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>
/// <param name="discard"><c>True</c> to discard the script document after execution, <c>false</c> otherwise.</param>
/// <param name="code">The script code to execute.</param>
/// <remarks>
@ -1009,7 +1009,7 @@ namespace Microsoft.ClearScript
/// <summary>
/// Evaluates script code with an associated document name.
/// </summary>
/// <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>
/// <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>
/// <param name="code">The script code to evaluate.</param>
/// <returns>The result value.</returns>
/// <remarks>
@ -1032,7 +1032,7 @@ namespace Microsoft.ClearScript
/// <summary>
/// Evaluates script code with an associated document name, optionally discarding the document after execution.
/// </summary>
/// <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>
/// <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>
/// <param name="discard"><c>True</c> to discard the script document after execution, <c>false</c> otherwise.</param>
/// <param name="code">The script code to evaluate.</param>
/// <returns>The result value.</returns>

Просмотреть файл

@ -18,15 +18,15 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo("ClearScriptTest")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("7.4.4")]
[assembly: AssemblyFileVersion("7.4.4")]
[assembly: AssemblyInformationalVersion("7.4.4")]
[assembly: AssemblyVersion("7.4.5")]
[assembly: AssemblyFileVersion("7.4.5")]
[assembly: AssemblyInformationalVersion("7.4.5")]
namespace Microsoft.ClearScript.Properties
{
internal static class ClearScriptVersion
{
public const string Triad = "7.4.4";
public const string Informational = "7.4.4";
public const string Triad = "7.4.5";
public const string Informational = "7.4.5";
}
}

Просмотреть файл

@ -15,6 +15,6 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo("ClearScript.V8")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("7.4.4")]
[assembly: AssemblyFileVersion("7.4.4")]
[assembly: AssemblyInformationalVersion("7.4.4")]
[assembly: AssemblyVersion("7.4.5")]
[assembly: AssemblyFileVersion("7.4.5")]
[assembly: AssemblyInformationalVersion("7.4.5")]

Просмотреть файл

@ -15,6 +15,6 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo("ClearScriptTest")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("7.4.4")]
[assembly: AssemblyFileVersion("7.4.4")]
[assembly: AssemblyInformationalVersion("7.4.4")]
[assembly: AssemblyVersion("7.4.5")]
[assembly: AssemblyFileVersion("7.4.5")]
[assembly: AssemblyInformationalVersion("7.4.5")]

Просмотреть файл

@ -16,6 +16,6 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo("ClearScriptTest")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("7.4.4")]
[assembly: AssemblyFileVersion("7.4.4")]
[assembly: AssemblyInformationalVersion("7.4.4")]
[assembly: AssemblyVersion("7.4.5")]
[assembly: AssemblyFileVersion("7.4.5")]
[assembly: AssemblyInformationalVersion("7.4.5")]

Просмотреть файл

@ -15,6 +15,6 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo("ClearScriptTest")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("7.4.4")]
[assembly: AssemblyFileVersion("7.4.4")]
[assembly: AssemblyInformationalVersion("7.4.4")]
[assembly: AssemblyVersion("7.4.5")]
[assembly: AssemblyFileVersion("7.4.5")]
[assembly: AssemblyInformationalVersion("7.4.5")]

Просмотреть файл

@ -37,7 +37,7 @@ namespace Microsoft.ClearScript
/// <summary>
/// Initializes a new script engine instance.
/// </summary>
/// <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>
/// <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>
[Obsolete("Use ScriptEngine(string name, string fileNameExtensions) instead.")]
protected ScriptEngine(string name)
: this(name, null)
@ -47,7 +47,7 @@ namespace Microsoft.ClearScript
/// <summary>
/// Initializes a new script engine instance with the specified list of supported file name extensions.
/// </summary>
/// <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>
/// <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>
/// <param name="fileNameExtensions">A semicolon-delimited list of supported file name extensions.</param>
protected ScriptEngine(string name, string fileNameExtensions)
{

Просмотреть файл

@ -11,24 +11,22 @@ namespace Microsoft.ClearScript
/// </summary>
public class StringDocument : Document
{
private readonly byte[] contents;
/// <summary>
/// Initializes a new <c><see cref="StringDocument"/></c> instance.
/// </summary>
/// <param name="info">A structure containing meta-information for the document.</param>
/// <param name="contents">A string containing the document's contents.</param>
public StringDocument(DocumentInfo info, string contents)
: this(info, Encoding.UTF8.GetBytes(contents))
{
}
internal StringDocument(DocumentInfo info, byte[] contents)
{
Info = info;
this.contents = contents;
StringContents = contents;
}
/// <summary>
/// Gets the document's contents as a string.
/// </summary>
public string StringContents { get; }
#region Document overrides
/// <summary>
@ -43,7 +41,7 @@ namespace Microsoft.ClearScript
/// The <c><see cref="StringDocument"/></c> implementation of this property returns a
/// <c><see cref="MemoryStream"/></c> instance.
/// </remarks>
public override Stream Contents => new MemoryStream(contents, false);
public override Stream Contents => new MemoryStream(Encoding.GetBytes(StringContents), false);
/// <summary>
/// Gets the document's character encoding.

Просмотреть файл

@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using System.Collections.Generic;
@ -16,29 +16,28 @@ namespace Microsoft.ClearScript.Util
public override bool Equals(T x, T y)
{
if ((x == null) && (y == null))
if (ReferenceEquals(x, y))
{
return true;
}
else if ((x == null) || (y == null))
if (ReferenceEquals(x, null) || ReferenceEquals(y, null))
{
return false;
}
try
{
return (x.Module == y.Module) && (x.MetadataToken == y.MetadataToken);
}
catch
{
return x == y;
}
return MiscHelpers.Try(out var result, () => UnsafeEquals(x, y)) && result;
}
public override int GetHashCode(T obj)
{
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
return (obj == null) ? 0 : obj.GetHashCode();
return ReferenceEquals(obj, null) ? 0 : obj.GetHashCode();
}
private static bool UnsafeEquals(T x, T y)
{
return (x.Module == y.Module) && (x.MetadataToken == y.MetadataToken);
}
}
}

Просмотреть файл

@ -473,7 +473,7 @@ namespace Microsoft.ClearScript.Util
//
// UPDATE: The observed behavior is actually documented. As Dispose is invoked via
// the callback's only reference, the callback may become eligible for finalization
// during the call. Typically Dispose invokes GC.SuppressFinalize just before
// during the call. Typically, Dispose invokes GC.SuppressFinalize just before
// exiting, which, in addition to canceling finalization, extends the object's
// lifetime until Dispose has done its job. The callback here is unusual in that it
// requires finalization regardless of disposal, so the correct fix is for Dispose
@ -506,6 +506,11 @@ namespace Microsoft.ClearScript.Util
public static string GetTextContents(this Document document)
{
if (document is StringDocument stringDocument)
{
return stringDocument.StringContents;
}
using (var reader = new StreamReader(document.Contents, document.Encoding ?? Encoding.UTF8))
{
return reader.ReadToEnd();

Просмотреть файл

@ -1180,20 +1180,18 @@ namespace Microsoft.ClearScript.Util
#region Nested type: PropertySignatureComparer
private sealed class PropertySignatureComparer : IEqualityComparer<PropertyInfo>
private sealed class PropertySignatureComparer : EqualityComparer<PropertyInfo>
{
public static readonly PropertySignatureComparer Instance = new PropertySignatureComparer();
#region IEqualityComparer<PropertyInfo> implementation
public bool Equals(PropertyInfo first, PropertyInfo second)
public override bool Equals(PropertyInfo first, PropertyInfo second)
{
var firstParamTypes = first.GetIndexParameters().Select(param => param.ParameterType);
var secondParamTypes = second.GetIndexParameters().Select(param => param.ParameterType);
return firstParamTypes.SequenceEqual(secondParamTypes);
}
public int GetHashCode(PropertyInfo property)
public override int GetHashCode(PropertyInfo property)
{
var hashCode = 0;
@ -1205,8 +1203,6 @@ namespace Microsoft.ClearScript.Util
return hashCode;
}
#endregion
}
#endregion

Просмотреть файл

@ -1191,6 +1191,7 @@ namespace Microsoft.ClearScript.V8.SplitProxy
#endregion
}
internal static class V8CpuProfile
{
public static void ProcessProfile(V8Entity.Handle hEntity, Ptr pProfile, V8.V8CpuProfile profile)

Просмотреть файл

@ -38,7 +38,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 runtime instance with the specified name.
/// </summary>
/// <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>
/// <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>
public V8Runtime(string name)
: this(name, null)
{
@ -56,7 +56,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 runtime instance with the specified name and resource constraints.
/// </summary>
/// <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>
/// <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>
/// <param name="constraints">Resource constraints for the instance.</param>
public V8Runtime(string name, V8RuntimeConstraints constraints)
: this(name, constraints, V8RuntimeFlags.None)
@ -85,7 +85,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 runtime instance with the specified name and options.
/// </summary>
/// <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>
/// <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>
/// <param name="flags">A value that selects options for the operation.</param>
public V8Runtime(string name, V8RuntimeFlags flags)
: this(name, flags, 0)
@ -95,7 +95,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 runtime instance with the specified name, options, and debug port.
/// </summary>
/// <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>
/// <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>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="debugPort">A TCP port on which to listen for a debugger connection.</param>
public V8Runtime(string name, V8RuntimeFlags flags, int debugPort)
@ -127,7 +127,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 runtime instance with the specified name, resource constraints, and options.
/// </summary>
/// <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>
/// <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>
/// <param name="constraints">Resource constraints for the instance.</param>
/// <param name="flags">A value that selects options for the operation.</param>
public V8Runtime(string name, V8RuntimeConstraints constraints, V8RuntimeFlags flags)
@ -138,7 +138,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 runtime instance with the specified name, resource constraints, options, and debug port.
/// </summary>
/// <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>
/// <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>
/// <param name="constraints">Resource constraints for the instance.</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="debugPort">A TCP port on which to listen for a debugger connection.</param>
@ -354,7 +354,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Creates a new V8 script engine instance with the specified name.
/// </summary>
/// <param name="engineName">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>
/// <param name="engineName">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>
/// <returns>A new V8 script engine instance.</returns>
/// <remarks>
/// The new script engine instance shares the V8 runtime with other instances created by
@ -411,7 +411,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Creates a new V8 script engine instance with the specified name and options.
/// </summary>
/// <param name="engineName">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>
/// <param name="engineName">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>
/// <param name="flags">A value that selects options for the operation.</param>
/// <returns>A new V8 script engine instance.</returns>
/// <remarks>
@ -433,7 +433,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Creates a new V8 script engine instance with the specified name, options, and debug port.
/// </summary>
/// <param name="engineName">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>
/// <param name="engineName">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>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="debugPort">A TCP port on which to listen for a debugger connection.</param>
/// <returns>A new V8 script engine instance.</returns>
@ -467,7 +467,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Creates a compiled script with an associated document name.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <returns>A compiled script that can be executed by multiple V8 script engine instances.</returns>
public V8Script Compile(string documentName, string code)
@ -507,7 +507,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Creates a compiled script with an associated document name, generating cache data for accelerated recompilation.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <param name="cacheKind">The kind of cache data to be generated.</param>
/// <param name="cacheBytes">Cache data for accelerated recompilation.</param>
@ -564,7 +564,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Creates a compiled script with an associated document name, consuming previously generated cache data.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <param name="cacheKind">The kind of cache data to be consumed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>
@ -625,7 +625,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Creates a compiled script with an associated document name, consuming previously generated cache data and updating it if necessary.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <param name="cacheKind">The kind of cache data to be processed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>

Просмотреть файл

@ -71,7 +71,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 script engine instance with the specified name.
/// </summary>
/// <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>
/// <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>
/// <remarks>
/// A separate V8 runtime is created for the new script engine instance.
/// </remarks>
@ -95,7 +95,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 script engine instance with the specified name and resource constraints.
/// </summary>
/// <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>
/// <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>
/// <param name="constraints">Resource constraints for the V8 runtime (see remarks).</param>
/// <remarks>
/// A separate V8 runtime is created for the new script engine instance.
@ -133,7 +133,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 script engine instance with the specified name and options.
/// </summary>
/// <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>
/// <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>
/// <param name="flags">A value that selects options for the operation.</param>
/// <remarks>
/// A separate V8 runtime is created for the new script engine instance.
@ -146,7 +146,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 script engine instance with the specified name, options, and debug port.
/// </summary>
/// <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>
/// <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>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="debugPort">A TCP port on which to listen for a debugger connection.</param>
/// <remarks>
@ -187,7 +187,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 script engine instance with the specified name, resource constraints, and options.
/// </summary>
/// <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>
/// <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>
/// <param name="constraints">Resource constraints for the V8 runtime (see remarks).</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <remarks>
@ -201,7 +201,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Initializes a new V8 script engine instance with the specified name, resource constraints, options, and debug port.
/// </summary>
/// <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>
/// <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>
/// <param name="constraints">Resource constraints for the V8 runtime (see remarks).</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="debugPort">A TCP port on which to listen for a debugger connection.</param>
@ -473,7 +473,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Creates a compiled script with an associated document name.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <returns>A compiled script that can be executed multiple times without recompilation.</returns>
public V8Script Compile(string documentName, string code)
@ -513,7 +513,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Creates a compiled script with an associated document name, generating cache data for accelerated recompilation.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <param name="cacheKind">The kind of cache data to be generated.</param>
/// <param name="cacheBytes">Cache data for accelerated recompilation.</param>
@ -578,7 +578,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Creates a compiled script with an associated document name, consuming previously generated cache data.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <param name="cacheKind">The kind of cache data to be consumed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>
@ -647,7 +647,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Creates a compiled script with an associated document name, consuming previously generated cache data and updating it if necessary.
/// </summary>
/// <param name="documentName">A document name for the compiled script. Currently this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="documentName">A document name for the compiled script. Currently, this name is used only as a label in presentation contexts such as debugger user interfaces.</param>
/// <param name="code">The script code to compile.</param>
/// <param name="cacheKind">The kind of cache data to be processed.</param>
/// <param name="cacheBytes">Cache data for accelerated compilation.</param>

Просмотреть файл

@ -56,7 +56,7 @@ namespace Microsoft.ClearScript.V8
/// <summary>
/// Specifies that
/// <see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports">dynamic module imports</see>
/// <see href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import">dynamic module imports</see>
/// are to be enabled. This is an experimental feature and may be removed in a future release.
/// </summary>
EnableDynamicModuleImports = 0x00000020,
@ -129,6 +129,23 @@ namespace Microsoft.ClearScript.V8
/// interoperability. This option is ignored if
/// <c><see cref="EnableTaskPromiseConversion"/></c> is not specified.
/// </summary>
UseSynchronizationContexts = 0x00002000
UseSynchronizationContexts = 0x00002000,
/// <summary>
/// Specifies that the
/// <c><see href="https://microsoft.github.io/ClearScript/2024/03/21/performance-api.html">Performance</see></c>
/// object is to be added to the script engine's global namespace. This object provides a
/// set of low-level native facilities for performance-sensitive scripts.
/// </summary>
AddPerformanceObject = 0x00004000,
/// <summary>
/// Specifies that native timers are to be set to the highest available resolution while
/// the current <c><see cref="V8ScriptEngine"/></c> instance is active. This option is
/// ignored if <c><see cref="AddPerformanceObject"/></c> is not specified. It is only a
/// hint and may be ignored on some systems. On platforms that support it, this option can
/// degrade overall system performance or power efficiency, so caution is recommended.
/// </summary>
SetTimerResolution = 0x00008000
}
}

Просмотреть файл

@ -115,7 +115,7 @@ namespace Microsoft.ClearScript.Windows.Core
/// <summary>
/// Initializes a new JScript engine instance with the specified name.
/// </summary>
/// <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>
/// <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>
/// <param name="syncInvoker">An object that enforces thread affinity for the instance.</param>
public JScriptEngine(string name, ISyncInvoker syncInvoker)
: this(name, WindowsScriptEngineFlags.None, syncInvoker)
@ -136,7 +136,7 @@ namespace Microsoft.ClearScript.Windows.Core
/// Initializes a new JScript engine instance with the specified name, options, and
/// synchronous invoker.
/// </summary>
/// <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>
/// <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>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="syncInvoker">An object that enforces thread affinity for the instance.</param>
public JScriptEngine(string name, WindowsScriptEngineFlags flags, ISyncInvoker syncInvoker)
@ -150,7 +150,7 @@ namespace Microsoft.ClearScript.Windows.Core
/// invoker.
/// </summary>
/// <param name="progID">The programmatic identifier (ProgID) of the JScript engine class.</param>
/// <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>
/// <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>
/// <param name="fileNameExtensions">A semicolon-delimited list of supported file name extensions.</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="syncInvoker">An object that enforces thread affinity for the instance.</param>

Просмотреть файл

@ -269,7 +269,7 @@ namespace Microsoft.ClearScript.Windows.Core
/// <summary>
/// Initializes a new VBScript engine instance with the specified name.
/// </summary>
/// <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>
/// <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>
/// <param name="syncInvoker">An object that enforces thread affinity for the instance.</param>
public VBScriptEngine(string name, ISyncInvoker syncInvoker)
: this(name, WindowsScriptEngineFlags.None, syncInvoker)
@ -289,7 +289,7 @@ namespace Microsoft.ClearScript.Windows.Core
/// <summary>
/// Initializes a new VBScript engine instance with the specified name, options, and synchronous invoker.
/// </summary>
/// <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>
/// <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>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="syncInvoker">An object that enforces thread affinity for the instance.</param>
public VBScriptEngine(string name, WindowsScriptEngineFlags flags, ISyncInvoker syncInvoker)
@ -303,7 +303,7 @@ namespace Microsoft.ClearScript.Windows.Core
/// invoker.
/// </summary>
/// <param name="progID">The programmatic identifier (ProgID) of the VBScript engine class.</param>
/// <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>
/// <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>
/// <param name="fileNameExtensions">A semicolon-delimited list of supported file name extensions.</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="syncInvoker">An object that enforces thread affinity for the instance.</param>

Просмотреть файл

@ -51,7 +51,7 @@ namespace Microsoft.ClearScript.Windows.Core
/// Initializes a new Windows Script engine instance with the specified list of supported file name extensions and synchronous invoker.
/// </summary>
/// <param name="progID">The programmatic identifier (ProgID) of the Windows Script engine class.</param>
/// <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>
/// <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>
/// <param name="fileNameExtensions">A semicolon-delimited list of supported file name extensions.</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <param name="syncInvoker">An object that enforces thread affinity for the instance.</param>
@ -481,7 +481,7 @@ namespace Microsoft.ClearScript.Windows.Core
// A host exception surrogate passed through the COM boundary; this happens
// when some script engines are invoked via script item access rather than
// script execution. Use the exception in the script frame if one is available.
// Otherwise chain the host exception to a new script exception.
// Otherwise, chain the host exception to a new script exception.
ThrowScriptError(CurrentScriptFrame.ScriptError ?? CurrentScriptFrame.PendingScriptError);

Просмотреть файл

@ -42,7 +42,7 @@ namespace Microsoft.ClearScript.Windows
/// <summary>
/// Initializes a new JScript engine instance with the specified name.
/// </summary>
/// <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>
/// <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>
public JScriptEngine(string name)
: this(name, WindowsScriptEngineFlags.None)
{
@ -60,7 +60,7 @@ namespace Microsoft.ClearScript.Windows
/// <summary>
/// Initializes a new JScript engine instance with the specified name and options.
/// </summary>
/// <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>
/// <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>
/// <param name="flags">A value that selects options for the operation.</param>
public JScriptEngine(string name, WindowsScriptEngineFlags flags)
: this("JScript", name, "js", flags)
@ -72,7 +72,7 @@ namespace Microsoft.ClearScript.Windows
/// identifier, name, list of supported file name extensions, and options.
/// </summary>
/// <param name="progID">The programmatic identifier (ProgID) of the JScript engine class.</param>
/// <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>
/// <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>
/// <param name="fileNameExtensions">A semicolon-delimited list of supported file name extensions.</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <remarks>

Просмотреть файл

@ -31,7 +31,7 @@ namespace Microsoft.ClearScript.Windows
/// <summary>
/// Initializes a new VBScript engine instance with the specified name.
/// </summary>
/// <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>
/// <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>
public VBScriptEngine(string name)
: this(name, WindowsScriptEngineFlags.None)
{
@ -49,7 +49,7 @@ namespace Microsoft.ClearScript.Windows
/// <summary>
/// Initializes a new VBScript engine instance with the specified name and options.
/// </summary>
/// <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>
/// <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>
/// <param name="flags">A value that selects options for the operation.</param>
public VBScriptEngine(string name, WindowsScriptEngineFlags flags)
: this("VBScript", name, "vbs", flags)
@ -61,7 +61,7 @@ namespace Microsoft.ClearScript.Windows
/// identifier, name, list of supported file name extensions, and options.
/// </summary>
/// <param name="progID">The programmatic identifier (ProgID) of the VBScript engine class.</param>
/// <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>
/// <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>
/// <param name="fileNameExtensions">A semicolon-delimited list of supported file name extensions.</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <remarks>

Просмотреть файл

@ -22,7 +22,7 @@ namespace Microsoft.ClearScript.Windows
/// Initializes a new Windows Script engine instance with the specified list of supported file name extensions.
/// </summary>
/// <param name="progID">The programmatic identifier (ProgID) of the Windows Script engine class.</param>
/// <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>
/// <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>
/// <param name="fileNameExtensions">A semicolon-delimited list of supported file name extensions.</param>
/// <param name="flags">A value that selects options for the operation.</param>
/// <remarks>

Двоичные данные
ClearScript/doc/Build.docx

Двоичный файл не отображается.

Двоичные данные
ClearScript/doc/Reference.chm

Двоичный файл не отображается.

Просмотреть файл

@ -11,6 +11,6 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCopyright("(c) Microsoft Corporation")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("7.4.4")]
[assembly: AssemblyFileVersion("7.4.4")]
[assembly: AssemblyInformationalVersion("7.4.4")]
[assembly: AssemblyVersion("7.4.5")]
[assembly: AssemblyFileVersion("7.4.5")]
[assembly: AssemblyInformationalVersion("7.4.5")]

Просмотреть файл

@ -29,7 +29,7 @@ namespace Microsoft.ClearScript.Test
Console.WriteLine("ClearScript Console ({0}, {1}, {2} {3})", RuntimeInformation.FrameworkDescription.Trim(), RuntimeInformation.OSDescription.Trim(), RuntimeInformation.ProcessArchitecture, flavor);
using (var engine = new V8ScriptEngine(nameof(ClearScriptConsole), V8ScriptEngineFlags.EnableDebugging))
using (var engine = new V8ScriptEngine(nameof(ClearScriptConsole), V8ScriptEngineFlags.EnableDebugging | V8ScriptEngineFlags.AddPerformanceObject))
{
engine.AddHostObject("host", new ExtendedHostFunctions());
engine.AddHostObject("lib", HostItemFlags.GlobalMembers, new HostTypeCollection("mscorlib", "System", "System.Core", "System.Numerics", "ClearScript.Core", "ClearScript.V8"));

Просмотреть файл

@ -11,6 +11,6 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCopyright("(c) Microsoft Corporation")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("7.4.4")]
[assembly: AssemblyFileVersion("7.4.4")]
[assembly: AssemblyInformationalVersion("7.4.4")]
[assembly: AssemblyVersion("7.4.5")]
[assembly: AssemblyFileVersion("7.4.5")]
[assembly: AssemblyInformationalVersion("7.4.5")]

Просмотреть файл

@ -1863,6 +1863,44 @@ namespace Microsoft.ClearScript.Test
Assert.AreEqual(789, result);
}
[TestMethod, TestCategory("BugFix")]
public void BugFix_V8Runtime_CreateScriptEngineAfterNoopInterrupt()
{
using (var runtime = new V8Runtime())
{
using (var tempEngine = runtime.CreateScriptEngine())
{
tempEngine.Interrupt();
using (runtime.CreateScriptEngine())
{
}
}
}
}
[TestMethod, TestCategory("BugFix")]
public void BugFix_V8Runtime_CreateScriptEngineWithPendingInterrupt()
{
using (var runtime = new V8Runtime())
{
using (var tempEngine = runtime.CreateScriptEngine())
{
// ReSharper disable AccessToDisposedClosure
tempEngine.Script.foo = new Action(() =>
{
tempEngine.Interrupt();
TestUtil.AssertException<ScriptEngineException>(() => runtime.CreateScriptEngine(), false);
tempEngine.CancelInterrupt();
});
// ReSharper restore AccessToDisposedClosure
tempEngine.Execute("foo()");
}
}
}
// ReSharper restore InconsistentNaming
#endregion

Просмотреть файл

@ -127,6 +127,8 @@ namespace Microsoft.ClearScript.Test
{
yield return asyncEnumerator.Current;
}
asyncEnumerator.DisposeAsync().AsTask().Wait();
}
#endregion

Просмотреть файл

@ -11,6 +11,6 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCopyright("(c) Microsoft Corporation")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("7.4.4")]
[assembly: AssemblyFileVersion("7.4.4")]
[assembly: AssemblyInformationalVersion("7.4.4")]
[assembly: AssemblyVersion("7.4.5")]
[assembly: AssemblyFileVersion("7.4.5")]
[assembly: AssemblyInformationalVersion("7.4.5")]

Просмотреть файл

@ -5183,7 +5183,6 @@ namespace Microsoft.ClearScript.Test
}
}
[TestMethod, TestCategory("V8ScriptEngine")]
public void V8ScriptEngine_UseSynchronizationContexts()
{
@ -5240,6 +5239,49 @@ namespace Microsoft.ClearScript.Test
// ReSharper restore AccessToDisposedClosure
}
[TestMethod, TestCategory("V8ScriptEngine")]
public void V8ScriptEngine_PerformanceObject()
{
Assert.IsInstanceOfType(engine.Script.Performance, typeof(Undefined));
engine.Dispose();
engine = new V8ScriptEngine(V8ScriptEngineFlags.EnableDebugging | V8ScriptEngineFlags.AddPerformanceObject);
Assert.IsInstanceOfType(engine.Script.Performance, typeof(IJavaScriptObject));
Assert.IsInstanceOfType(engine.Script.Performance.sleep, typeof(IJavaScriptObject));
Assert.IsInstanceOfType(engine.Script.Performance.now, typeof(IJavaScriptObject));
var elapsed = Convert.ToDouble(engine.Evaluate(@"(() => {
const start = Performance.now();
Performance.sleep(25);
return Performance.now() - start;
})()"));
Assert.IsTrue(elapsed >= 25);
elapsed = Convert.ToDouble(engine.Evaluate(@"(() => {
const start = Performance.now();
Performance.sleep(25, false);
return Performance.now() - start;
})()"));
Assert.IsTrue(elapsed >= 25);
var average = Convert.ToDouble(engine.Evaluate(@"(() => {
const start = Performance.now();
for (let i = 0; i < 1000; ++i) Performance.sleep(5, true);
return (Performance.now() - start) / 1000;
})()"));
Assert.IsTrue((average >= 5) && (average < 5.5));
var delta = Convert.ToDouble(engine.Evaluate(@"
Math.abs(Performance.timeOrigin + Performance.now() - Date.now());
"));
Assert.IsTrue(delta < 5);
}
// ReSharper restore InconsistentNaming
#endregion

Просмотреть файл

@ -22,6 +22,7 @@
#include <memory>
#include <queue>
#include <string>
#include <thread>
#include <unordered_map>
#include <unordered_set>
#include <vector>
@ -103,6 +104,31 @@ inline bool HasFlag(TFlag mask, TFlag flag)
//-----------------------------------------------------------------------------
template <typename TFlag, typename... TOthers>
inline bool HasFlag(TFlag mask, TOthers... others)
{
return HasFlag(mask, CombineFlags(others...));
}
//-----------------------------------------------------------------------------
template <typename TFlag>
inline bool HasFlags(TFlag mask, TFlag flags)
{
using TUnderlying = std::underlying_type_t<TFlag>;
return (static_cast<TUnderlying>(mask) & static_cast<TUnderlying>(flags)) == static_cast<TUnderlying>(flags);
}
//-----------------------------------------------------------------------------
template <typename TFlag, typename... TOthers>
inline bool HasFlags(TFlag mask, TOthers... others)
{
return HasFlags(mask, CombineFlags(others...));
}
//-----------------------------------------------------------------------------
template <typename TFlag>
inline TFlag CombineFlags(TFlag flag1, TFlag flag2)
{

Просмотреть файл

@ -8,9 +8,15 @@
// HighResolutionClock implementation
//-----------------------------------------------------------------------------
double HighResolutionClock::GetRelativeSeconds()
bool HighResolutionClock::SetTimerResolution()
{
return false;
}
//-----------------------------------------------------------------------------
void HighResolutionClock::RestoreTimerResolution()
{
return std::chrono::duration<double>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
}
//-----------------------------------------------------------------------------

Просмотреть файл

@ -8,25 +8,30 @@
// HighResolutionClock implementation
//-----------------------------------------------------------------------------
static OnceFlag s_InitializationFlag;
static LARGE_INTEGER s_TicksPerSecond;
static TIMECAPS s_TimeCaps {};
static auto s_GotTimeCaps = false;
//-----------------------------------------------------------------------------
bool HighResolutionClock::SetTimerResolution()
{
static OnceFlag s_InitializationFlag;
s_InitializationFlag.CallOnce([]()
{
s_GotTimeCaps = ::timeGetDevCaps(&s_TimeCaps, sizeof s_TimeCaps) == MMSYSERR_NOERROR;
});
return s_GotTimeCaps && (::timeBeginPeriod(s_TimeCaps.wPeriodMin) == TIMERR_NOERROR);
}
//-----------------------------------------------------------------------------
double HighResolutionClock::GetRelativeSeconds()
void HighResolutionClock::RestoreTimerResolution()
{
s_InitializationFlag.CallOnce([]
if (s_GotTimeCaps)
{
ASSERT_EVAL(::QueryPerformanceFrequency(&s_TicksPerSecond));
});
LARGE_INTEGER tickCount;
ASSERT_EVAL(::QueryPerformanceCounter(&tickCount));
auto wholeSeconds = tickCount.QuadPart / s_TicksPerSecond.QuadPart;
auto remainingTicks = tickCount.QuadPart % s_TicksPerSecond.QuadPart;
return wholeSeconds + (static_cast<double>(remainingTicks) / s_TicksPerSecond.QuadPart);
ASSERT_EVAL(::timeEndPeriod(s_TimeCaps.wPeriodMin) == TIMERR_NOERROR);
}
}
//-----------------------------------------------------------------------------

Просмотреть файл

@ -0,0 +1,43 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#include "ClearScriptV8Native.h"
//-----------------------------------------------------------------------------
// HighResolutionClock implementation
//-----------------------------------------------------------------------------
void HighResolutionClock::SleepMilliseconds(double delay, bool precise)
{
if (!precise)
{
std::this_thread::sleep_for(std::chrono::duration<double, std::milli>(delay));
}
else
{
auto start = std::chrono::high_resolution_clock::now();
auto end = start + std::chrono::duration<double, std::milli>(delay);
while (std::chrono::high_resolution_clock::now() < end) std::this_thread::yield();
}
}
//-----------------------------------------------------------------------------
double HighResolutionClock::GetMillisecondsSinceUnixEpoch()
{
return std::chrono::duration<double, std::milli>(std::chrono::system_clock::now().time_since_epoch()).count();
}
//-----------------------------------------------------------------------------
double HighResolutionClock::GetRelativeMilliseconds()
{
return std::chrono::duration<double, std::milli>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
}
//-----------------------------------------------------------------------------
double HighResolutionClock::GetRelativeSeconds()
{
return std::chrono::duration<double>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
}

Просмотреть файл

@ -9,6 +9,11 @@
struct HighResolutionClock final: StaticBase
{
static bool SetTimerResolution();
static void RestoreTimerResolution();
static void SleepMilliseconds(double delay, bool precise);
static double GetMillisecondsSinceUnixEpoch();
static double GetRelativeMilliseconds();
static double GetRelativeSeconds();
static size_t GetHardwareConcurrency();
};

Просмотреть файл

@ -28,7 +28,9 @@ public:
UseCaseInsensitiveMemberBinding = 0x00000400,
EnableStringifyEnhancements = 0x00000800,
HideHostExceptions = 0x00001000,
UseSynchronizationContexts = 0x00002000
UseSynchronizationContexts = 0x00002000,
AddPerformanceObject = 0x00004000,
SetTimerResolution = 0x00008000
};
struct Options final

Просмотреть файл

@ -4,23 +4,19 @@
#include "ClearScriptV8Native.h"
//-----------------------------------------------------------------------------
// FromMaybeScope
// support for v8::Maybe and v8::MaybeLocal
//-----------------------------------------------------------------------------
class FromMaybeScope final
{
};
//-----------------------------------------------------------------------------
// FromMaybeFailure
//-----------------------------------------------------------------------------
class FromMaybeFailure final
{
};
//-----------------------------------------------------------------------------
// local helper functions
//-----------------------------------------------------------------------------
template <typename T>
@ -67,9 +63,57 @@ inline v8::Local<T> FromMaybeDefault(const v8::MaybeLocal<T>& maybe, const v8::L
//-----------------------------------------------------------------------------
#define FROM_MAYBE_TRY \
{ \
DISABLE_WARNING(4456) /* declaration hides previous local declaration */ \
FromMaybeScope t_FromMaybeScope; \
DEFAULT_WARNING(4456) \
try \
{
#define FROM_MAYBE_CATCH \
IGNORE_UNUSED(t_FromMaybeScope); \
} \
catch (const FromMaybeFailure&) \
{ \
#define FROM_MAYBE_END \
IGNORE_UNUSED(t_FromMaybeScope); \
} \
}
#define FROM_MAYBE_CATCH_CONSUME \
FROM_MAYBE_CATCH \
FROM_MAYBE_END
#define FROM_MAYBE(...) \
(::FromMaybe(t_FromMaybeScope, __VA_ARGS__))
#define FROM_MAYBE_DEFAULT(...) \
(::FromMaybeDefault(__VA_ARGS__))
//-----------------------------------------------------------------------------
// local helper functions
//-----------------------------------------------------------------------------
inline v8::Local<v8::String> ValueAsString(const v8::Local<v8::Value>& hValue)
{
return (!hValue.IsEmpty() && hValue->IsString()) ? hValue.As<v8::String>() : v8::Local<v8::String>();
if (hValue.IsEmpty())
{
return v8::Local<v8::String>();
}
if (hValue->IsString())
{
return hValue.As<v8::String>();
}
if (hValue->IsStringObject())
{
return hValue.As<v8::StringObject>()->ValueOf();
}
return v8::Local<v8::String>();
}
//-----------------------------------------------------------------------------
@ -90,7 +134,102 @@ inline v8::Local<v8::External> ValueAsExternal(const v8::Local<v8::Value>& hValu
inline v8::Local<v8::BigInt> ValueAsBigInt(const v8::Local<v8::Value>& hValue)
{
return (!hValue.IsEmpty() && hValue->IsBigInt()) ? hValue.As<v8::BigInt>() : v8::Local<v8::BigInt>();
if (hValue.IsEmpty())
{
return v8::Local<v8::BigInt>();
}
if (hValue->IsBigInt())
{
return hValue.As<v8::BigInt>();
}
if (hValue->IsBigIntObject())
{
return hValue.As<v8::BigIntObject>()->ValueOf();
}
return v8::Local<v8::BigInt>();
}
//-----------------------------------------------------------------------------
inline bool TryGetValueAsBoolean(const SharedPtr<V8IsolateImpl>& spIsolateImpl, const v8::Local<v8::Value>& hValue, bool& value)
{
if (hValue.IsEmpty())
{
return false;
}
if (hValue->IsBoolean())
{
value = spIsolateImpl->BooleanValue(hValue);
return true;
}
if (hValue->IsBooleanObject())
{
value = hValue.As<v8::BooleanObject>()->ValueOf();
return true;
}
return false;
}
//-----------------------------------------------------------------------------
inline bool TryGetValueAsNumber(v8::Local<v8::Context> hContext, const v8::Local<v8::Value>& hValue, double& value)
{
if (hValue.IsEmpty())
{
return false;
}
FROM_MAYBE_TRY
if (hValue->IsNumber())
{
value = FROM_MAYBE(hValue->NumberValue(hContext));
return true;
}
if (hValue->IsNumberObject())
{
value = hValue.As<v8::NumberObject>()->ValueOf();
return true;
}
FROM_MAYBE_CATCH_CONSUME
return false;
}
//-----------------------------------------------------------------------------
inline bool TryGetValueAsAnyNumber(v8::Local<v8::Context> hContext, const v8::Local<v8::Value>& hValue, double& value)
{
if (hValue.IsEmpty())
{
return false;
}
FROM_MAYBE_TRY
if (hValue->IsInt32())
{
value = FROM_MAYBE(hValue->Int32Value(hContext));
return true;
}
if (hValue->IsUint32())
{
value = FROM_MAYBE(hValue->Uint32Value(hContext));
return true;
}
FROM_MAYBE_CATCH_CONSUME
return TryGetValueAsNumber(hContext, hValue, value);
}
//-----------------------------------------------------------------------------
@ -102,7 +241,7 @@ static V8ContextImpl* GetContextImplFromHolder(const TInfo& info)
if (!hHolder.IsEmpty() && hHolder->InternalFieldCount() > 0)
{
auto hField = hHolder->GetInternalField(0);
if (!hField.IsEmpty() && !hField->IsUndefined())
if (!hField.IsEmpty() && hField->IsValue() && !hField.template As<v8::Value>()->IsUndefined())
{
return static_cast<V8ContextImpl*>(hHolder->GetAlignedPointerFromInternalField(0));
}
@ -134,35 +273,6 @@ static V8ContextImpl* GetContextImplFromData(const TInfo& info)
IGNORE_UNUSED(t_IsolateScope); \
}
#define FROM_MAYBE_TRY \
{ \
DISABLE_WARNING(4456) /* declaration hides previous local declaration */ \
FromMaybeScope t_FromMaybeScope; \
DEFAULT_WARNING(4456) \
try \
{
#define FROM_MAYBE_CATCH \
IGNORE_UNUSED(t_FromMaybeScope); \
} \
catch (const FromMaybeFailure&) \
{ \
#define FROM_MAYBE_END \
IGNORE_UNUSED(t_FromMaybeScope); \
} \
}
#define FROM_MAYBE_CATCH_CONSUME \
FROM_MAYBE_CATCH \
FROM_MAYBE_END
#define FROM_MAYBE(...) \
(::FromMaybe(t_FromMaybeScope, __VA_ARGS__))
#define FROM_MAYBE_DEFAULT(...) \
(::FromMaybeDefault(__VA_ARGS__))
#define BEGIN_CONTEXT_SCOPE \
{ \
DISABLE_WARNING(4456) /* declaration hides previous local declaration */ \
@ -231,11 +341,20 @@ V8ContextImpl::V8ContextImpl(SharedPtr<V8IsolateImpl>&& spIsolateImpl, const Std
m_spIsolateImpl(std::move(spIsolateImpl)),
m_DateTimeConversionEnabled(HasFlag(options.Flags, Flags::EnableDateTimeConversion)),
m_HideHostExceptions(HasFlag(options.Flags, Flags::HideHostExceptions)),
m_pvV8ObjectCache(nullptr),
m_AllowHostObjectConstructorCall(false)
m_AllowHostObjectConstructorCall(false),
m_ChangedTimerResolution(false),
m_pvV8ObjectCache(nullptr)
{
VerifyNotOutOfMemory();
if (HasFlags(options.Flags, Flags::AddPerformanceObject, Flags::SetTimerResolution))
{
m_ChangedTimerResolution = HighResolutionClock::SetTimerResolution();
}
auto timeOrigin = HighResolutionClock::GetMillisecondsSinceUnixEpoch();
m_RelativeTimeOrigin = HighResolutionClock::GetRelativeMilliseconds();
BEGIN_ISOLATE_SCOPE
FROM_MAYBE_TRY
@ -251,14 +370,25 @@ V8ContextImpl::V8ContextImpl(SharedPtr<V8IsolateImpl>&& spIsolateImpl, const Std
hGlobalTemplate->SetHandler(v8::IndexedPropertyHandlerConfiguration(GetGlobalProperty, SetGlobalProperty, QueryGlobalProperty, DeleteGlobalProperty, GetGlobalPropertyIndices));
m_hContext = CreatePersistent(CreateContext(nullptr, hGlobalTemplate));
auto hGlobal = ::ValueAsObject(m_hContext->Global()->GetPrototype());
if (!hGlobal.IsEmpty() && (hGlobal->InternalFieldCount() > 0))
if (!m_hContext.IsEmpty())
{
hGlobal->SetAlignedPointerInInternalField(0, this);
auto hGlobalProxy = m_hContext->Global();
if (!hGlobalProxy.IsEmpty())
{
auto hGlobal = ::ValueAsObject(hGlobalProxy->GetPrototype());
if (!hGlobal.IsEmpty() && (hGlobal->InternalFieldCount() > 0))
{
hGlobal->SetAlignedPointerInInternalField(0, this);
}
}
}
}
if (m_hContext.IsEmpty())
{
throw FromMaybeFailure();
}
auto hContextImpl = CreateExternal(this);
v8::Local<v8::FunctionTemplate> hGetIteratorFunction;
@ -271,7 +401,7 @@ V8ContextImpl::V8ContextImpl(SharedPtr<V8IsolateImpl>&& spIsolateImpl, const Std
m_hContext->SetAlignedPointerInEmbedderData(1, this);
m_hIsHostObjectKey = CreatePersistent(CreateSymbol());
FROM_MAYBE(m_hContext->Global()->Set(m_hContext, CreateString("isHostObjectKey"), m_hIsHostObjectKey));
ASSERT_EVAL(FROM_MAYBE(m_hContext->Global()->Set(m_hContext, CreateString("isHostObjectKey"), m_hIsHostObjectKey)));
m_hHostExceptionKey = CreatePersistent(CreateString("hostException"));
m_hCacheKey = CreatePersistent(CreatePrivate());
@ -293,6 +423,15 @@ V8ContextImpl::V8ContextImpl(SharedPtr<V8IsolateImpl>&& spIsolateImpl, const Std
m_hFlushFunction = CreatePersistent(FROM_MAYBE(v8::Function::New(m_hContext, FlushCallback)));
m_hTerminationException = CreatePersistent(v8::Exception::Error(CreateString("Script execution was interrupted")));
if (HasFlag(options.Flags, Flags::AddPerformanceObject))
{
auto hPerformance = CreateObject();
ASSERT_EVAL(FROM_MAYBE(hPerformance->DefineOwnProperty(m_hContext, CreateString("timeOrigin"), CreateNumber(timeOrigin), CombineFlags(v8::ReadOnly, v8::DontDelete))));
ASSERT_EVAL(FROM_MAYBE(hPerformance->DefineOwnProperty(m_hContext, CreateString("now"), FROM_MAYBE(v8::Function::New(m_hContext, PerformanceNowCallback, hContextImpl)), CombineFlags(v8::ReadOnly, v8::DontDelete))));
ASSERT_EVAL(FROM_MAYBE(hPerformance->DefineOwnProperty(m_hContext, CreateString("sleep"), FROM_MAYBE(v8::Function::New(m_hContext, PerformanceSleepCallback, hContextImpl)), CombineFlags(v8::ReadOnly, v8::DontDelete))));
ASSERT_EVAL(FROM_MAYBE(m_hContext->Global()->DefineOwnProperty(m_hContext, CreateString("Performance"), hPerformance, v8::DontEnum)));
}
END_CONTEXT_SCOPE
auto hToJSON = CreateString("toJSON");
@ -1941,18 +2080,31 @@ void V8ContextImpl::Teardown()
// As of V8 3.16.0, the global property getter for a disposed context
// may be invoked during GC after the V8ContextImpl instance is gone.
auto hGlobal = ::ValueAsObject(m_hContext->Global()->GetPrototype());
if (!hGlobal.IsEmpty() && (hGlobal->InternalFieldCount() > 0))
if (!m_hContext.IsEmpty())
{
hGlobal->SetAlignedPointerInInternalField(0, nullptr);
auto hGlobalProxy = m_hContext->Global();
if (!hGlobalProxy.IsEmpty())
{
auto hGlobal = ::ValueAsObject(hGlobalProxy->GetPrototype());
if (!hGlobal.IsEmpty() && (hGlobal->InternalFieldCount() > 0))
{
hGlobal->SetAlignedPointerInInternalField(0, nullptr);
}
}
if (m_hContext->GetNumberOfEmbedderDataFields() > 1)
{
m_hContext->SetAlignedPointerInEmbedderData(1, nullptr);
}
Dispose(m_hContext);
}
if (m_hContext->GetNumberOfEmbedderDataFields() > 1)
if (m_ChangedTimerResolution)
{
m_hContext->SetAlignedPointerInEmbedderData(1, nullptr);
HighResolutionClock::RestoreTimerResolution();
m_ChangedTimerResolution = false;
}
Dispose(m_hContext);
}
//-----------------------------------------------------------------------------
@ -2067,8 +2219,8 @@ void V8ContextImpl::GetV8ObjectPropertyNames(v8::Local<v8::Object> hObject, std:
names.reserve(nameCount);
for (auto index = 0; index < nameCount; index++)
{
auto hName = FROM_MAYBE(hNames->Get(m_hContext, index));
if (hName->IsString())
auto hName = ::ValueAsString(FROM_MAYBE(hNames->Get(m_hContext, index)));
if (!hName.IsEmpty())
{
names.push_back(CreateStdString(hName));
}
@ -2104,12 +2256,15 @@ void V8ContextImpl::GetV8ObjectPropertyIndices(v8::Local<v8::Object> hObject, st
indices.push_back(static_cast<int>(value));
}
}
else if (hName->IsNumber())
else
{
auto value = FROM_MAYBE(hName->NumberValue(m_hContext));
if (value == std::round(value) && (value >= static_cast<double>(INT_MIN)) && (value <= static_cast<double>(INT_MAX)))
double value;
if (::TryGetValueAsNumber(m_hContext, hName, value))
{
indices.push_back(static_cast<int>(value));
if (value == std::round(value) && (value >= static_cast<double>(INT_MIN)) && (value <= static_cast<double>(INT_MAX)))
{
indices.push_back(static_cast<int>(value));
}
}
}
}
@ -3008,6 +3163,54 @@ void V8ContextImpl::FlushCallback(const v8::FunctionCallbackInfo<v8::Value>& /*i
//-----------------------------------------------------------------------------
void V8ContextImpl::PerformanceNowCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
auto now = HighResolutionClock::GetRelativeMilliseconds();
auto pContextImpl = ::GetContextImplFromData(info);
if (pContextImpl == nullptr)
{
return;
}
CALLBACK_RETURN(now - pContextImpl->m_RelativeTimeOrigin);
}
//-----------------------------------------------------------------------------
void V8ContextImpl::PerformanceSleepCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
auto pContextImpl = ::GetContextImplFromData(info);
if (pContextImpl == nullptr)
{
return;
}
double delay;
if ((info.Length() < 1) || !::TryGetValueAsAnyNumber(pContextImpl->m_hContext, info[0], delay))
{
pContextImpl->ThrowException(v8::Exception::TypeError(pContextImpl->CreateString("Invalid argument: 'delay' must be a number")));
return;
}
auto precise = false;
if (info.Length() > 1)
{
auto hArg = info[1];
if (!hArg.IsEmpty())
{
precise = hArg->BooleanValue(info.GetIsolate());
}
}
if (delay > 0)
{
HighResolutionClock::SleepMilliseconds(delay, precise);
}
}
//-----------------------------------------------------------------------------
void V8ContextImpl::DisposeWeakHandle(v8::Isolate* pIsolate, Persistent<v8::Object>* phObject, HostObjectHolder* pHolder, void* pvV8ObjectCache)
{
IGNORE_UNUSED(pIsolate);
@ -3411,14 +3614,20 @@ V8Value V8ContextImpl::ExportValue(v8::Local<v8::Value> hValue)
return V8Value(V8Value::Null);
}
if (hValue->IsBoolean())
{
return V8Value(m_spIsolateImpl->BooleanValue(hValue));
bool value;
if (::TryGetValueAsBoolean(m_spIsolateImpl, hValue, value))
{
return V8Value(value);
}
}
if (hValue->IsNumber())
{
return V8Value(FROM_MAYBE(hValue->NumberValue(m_hContext)));
double value;
if (::TryGetValueAsNumber(m_hContext, hValue, value))
{
return V8Value(value);
}
}
if (hValue->IsInt32())
@ -3431,9 +3640,10 @@ V8Value V8ContextImpl::ExportValue(v8::Local<v8::Value> hValue)
return V8Value(FROM_MAYBE(hValue->Uint32Value(m_hContext)));
}
if (hValue->IsString())
auto hString = ::ValueAsString(hValue);
if (!hString.IsEmpty())
{
return V8Value(new StdString(CreateStdString(hValue)));
return V8Value(new StdString(CreateStdString(hString)));
}
if (m_DateTimeConversionEnabled && hValue->IsDate())

Просмотреть файл

@ -458,6 +458,8 @@ private:
static void InvokeHostObject(const v8::FunctionCallbackInfo<v8::Value>& info);
static void FlushCallback(const v8::FunctionCallbackInfo<v8::Value>& info);
static void PerformanceNowCallback(const v8::FunctionCallbackInfo<v8::Value>& info);
static void PerformanceSleepCallback(const v8::FunctionCallbackInfo<v8::Value>& info);
v8::MaybeLocal<v8::Promise> ImportModule(const V8DocumentInfo* pSourceDocumentInfo, v8::Local<v8::String> hSpecifier);
v8::MaybeLocal<v8::Module> ResolveModule(v8::Local<v8::String> hSpecifier, const V8DocumentInfo* pSourceDocumentInfo);
@ -493,8 +495,6 @@ private:
StdString m_Name;
SharedPtr<V8IsolateImpl> m_spIsolateImpl;
bool m_DateTimeConversionEnabled;
bool m_HideHostExceptions;
Persistent<v8::Context> m_hContext;
std::vector<std::pair<StdString, Persistent<v8::Object>>> m_GlobalMembersStack;
Persistent<v8::Symbol> m_hIsHostObjectKey;
@ -521,9 +521,13 @@ private:
SharedPtr<V8WeakContextBinding> m_spWeakBinding;
std::list<ModuleCacheEntry> m_ModuleCache;
std::list<SyntheticModuleEntry> m_SyntheticModuleData;
void* m_pvV8ObjectCache;
bool m_AllowHostObjectConstructorCall;
Statistics m_Statistics;
bool m_DateTimeConversionEnabled;
bool m_HideHostExceptions;
bool m_AllowHostObjectConstructorCall;
bool m_ChangedTimerResolution;
void* m_pvV8ObjectCache;
double m_RelativeTimeOrigin;
};
//-----------------------------------------------------------------------------

Просмотреть файл

@ -17,14 +17,17 @@ public:
virtual v8::PageAllocator* GetPageAllocator() override;
virtual int NumberOfWorkerThreads() override;
virtual std::shared_ptr<v8::TaskRunner> GetForegroundTaskRunner(v8::Isolate* pIsolate) override;
virtual void CallOnWorkerThread(std::unique_ptr<v8::Task> upTask) override;
virtual void CallDelayedOnWorkerThread(std::unique_ptr<v8::Task> upTask, double delayInSeconds) override;
virtual std::unique_ptr<v8::JobHandle> CreateJob(v8::TaskPriority priority, std::unique_ptr<v8::JobTask> upJobTask) override;
virtual std::shared_ptr<v8::TaskRunner> GetForegroundTaskRunner(v8::Isolate* pIsolate, v8::TaskPriority priority) override;
virtual double MonotonicallyIncreasingTime() override;
virtual double CurrentClockTimeMillis() override;
virtual v8::TracingController* GetTracingController() override;
protected:
virtual std::unique_ptr<v8::JobHandle> CreateJobImpl(v8::TaskPriority priority, std::unique_ptr<v8::JobTask> upJobTask, const v8::SourceLocation& location) override;
virtual void PostTaskOnWorkerThreadImpl(v8::TaskPriority priority, std::unique_ptr<v8::Task> upTask, const v8::SourceLocation& location) override;
virtual void PostDelayedTaskOnWorkerThreadImpl(v8::TaskPriority priority, std::unique_ptr<v8::Task> upTask, double delayInSeconds, const v8::SourceLocation& location) override;
private:
V8Platform();
@ -113,14 +116,21 @@ int V8Platform::NumberOfWorkerThreads()
//-----------------------------------------------------------------------------
std::shared_ptr<v8::TaskRunner> V8Platform::GetForegroundTaskRunner(v8::Isolate* pIsolate)
std::shared_ptr<v8::TaskRunner> V8Platform::GetForegroundTaskRunner(v8::Isolate* pIsolate, v8::TaskPriority /*priority*/)
{
return V8IsolateImpl::GetInstanceFromIsolate(pIsolate)->GetForegroundTaskRunner();
}
//-----------------------------------------------------------------------------
void V8Platform::CallOnWorkerThread(std::unique_ptr<v8::Task> upTask)
std::unique_ptr<v8::JobHandle> V8Platform::CreateJobImpl(v8::TaskPriority priority, std::unique_ptr<v8::JobTask> upJobTask, const v8::SourceLocation& /*location*/)
{
return v8::platform::NewDefaultJobHandle(this, priority, std::move(upJobTask), NumberOfWorkerThreads());
}
//-----------------------------------------------------------------------------
void V8Platform::PostTaskOnWorkerThreadImpl(v8::TaskPriority /*priority*/, std::unique_ptr<v8::Task> upTask, const v8::SourceLocation& /*location*/)
{
auto pIsolate = v8::Isolate::GetCurrent();
if (pIsolate == nullptr)
@ -135,7 +145,7 @@ void V8Platform::CallOnWorkerThread(std::unique_ptr<v8::Task> upTask)
//-----------------------------------------------------------------------------
void V8Platform::CallDelayedOnWorkerThread(std::unique_ptr<v8::Task> upTask, double delayInSeconds)
void V8Platform::PostDelayedTaskOnWorkerThreadImpl(v8::TaskPriority /*priority*/, std::unique_ptr<v8::Task> upTask, double delayInSeconds, const v8::SourceLocation& /*location*/)
{
auto pIsolate = v8::Isolate::GetCurrent();
if (pIsolate != nullptr)
@ -146,13 +156,6 @@ void V8Platform::CallDelayedOnWorkerThread(std::unique_ptr<v8::Task> upTask, dou
//-----------------------------------------------------------------------------
std::unique_ptr<v8::JobHandle> V8Platform::CreateJob(v8::TaskPriority priority, std::unique_ptr<v8::JobTask> upJobTask)
{
return v8::platform::NewDefaultJobHandle(this, priority, std::move(upJobTask), NumberOfWorkerThreads());
}
//-----------------------------------------------------------------------------
double V8Platform::MonotonicallyIncreasingTime()
{
return HighResolutionClock::GetRelativeSeconds();
@ -477,10 +480,10 @@ V8IsolateImpl::V8IsolateImpl(const StdString& name, const v8::ResourceConstraint
m_CpuProfileSampleInterval(1000U),
m_StackWatchLevel(0),
m_pStackLimit(nullptr),
m_IsExecutionTerminating(false),
m_pExecutionScope(nullptr),
m_pDocumentInfo(nullptr),
m_IsOutOfMemory(false),
m_IsExecutionTerminating(false),
m_Released(false)
{
V8Platform::GetInstance().EnsureInitialized();
@ -1402,7 +1405,7 @@ void V8IsolateImpl::CallWithLockNoWait(bool allowNesting, CallWithLockCallback&&
void NORETURN V8IsolateImpl::ThrowOutOfMemoryException()
{
m_IsOutOfMemory = true;
throw V8Exception(V8Exception::Type::Fatal, m_Name, StdString(SL("The V8 runtime has exceeded its memory limit")), (m_pExecutionScope != nullptr) ? m_pExecutionScope->ExecutionStarted() : false);
throw V8Exception(V8Exception::Type::Fatal, m_Name, StdString(SL("The V8 runtime has exceeded its memory limit")), ExecutionStarted());
}
//-----------------------------------------------------------------------------
@ -1592,6 +1595,28 @@ void V8IsolateImpl::ClearScriptCache()
//-----------------------------------------------------------------------------
void V8IsolateImpl::TerminateExecutionInternal()
{
if (!m_IsExecutionTerminating)
{
m_upIsolate->TerminateExecution();
m_IsExecutionTerminating = true;
}
}
//-----------------------------------------------------------------------------
void V8IsolateImpl::CancelTerminateExecutionInternal()
{
if (m_IsExecutionTerminating)
{
m_upIsolate->CancelTerminateExecution();
m_IsExecutionTerminating = false;
}
}
//-----------------------------------------------------------------------------
V8IsolateImpl::~V8IsolateImpl()
{
--s_InstanceCount;
@ -1916,13 +1941,8 @@ V8IsolateImpl::ExecutionScope* V8IsolateImpl::EnterExecutionScope(ExecutionScope
m_StackWatchLevel++;
}
// clear termination flag
m_IsExecutionTerminating = false;
// mark execution scope
auto pPreviousExecutionScope = m_pExecutionScope;
m_pExecutionScope = pExecutionScope;
return pPreviousExecutionScope;
return SetExecutionScope(pExecutionScope);
}
//-----------------------------------------------------------------------------
@ -1932,7 +1952,7 @@ void V8IsolateImpl::ExitExecutionScope(ExecutionScope* pPreviousExecutionScope)
_ASSERTE(IsCurrent() && IsLocked());
// reset execution scope
m_pExecutionScope = pPreviousExecutionScope;
SetExecutionScope(pPreviousExecutionScope);
// is interrupt propagation enabled?
if (!m_EnableInterruptPropagation)
@ -1969,15 +1989,69 @@ void V8IsolateImpl::ExitExecutionScope(ExecutionScope* pPreviousExecutionScope)
}
}
//-----------------------------------------------------------------------------
void V8IsolateImpl::SetUpHeapWatchTimer()
V8IsolateImpl::ExecutionScope* V8IsolateImpl::SetExecutionScope(ExecutionScope* pExecutionScope)
{
BEGIN_MUTEX_SCOPE(m_TerminateExecutionMutex)
auto pPrevExecutionScope = std::exchange(m_pExecutionScope, pExecutionScope);
if (pExecutionScope == nullptr)
{
CancelTerminateExecutionInternal();
}
return pPrevExecutionScope;
END_MUTEX_SCOPE
}
//-----------------------------------------------------------------------------
bool V8IsolateImpl::InExecutionScope()
{
BEGIN_MUTEX_SCOPE(m_TerminateExecutionMutex)
return m_pExecutionScope != nullptr;
END_MUTEX_SCOPE
}
//-----------------------------------------------------------------------------
void V8IsolateImpl::OnExecutionStarted()
{
BEGIN_MUTEX_SCOPE(m_TerminateExecutionMutex)
if (m_pExecutionScope != nullptr)
{
m_pExecutionScope->OnExecutionStarted();
}
END_MUTEX_SCOPE
}
//-----------------------------------------------------------------------------
bool V8IsolateImpl::ExecutionStarted()
{
BEGIN_MUTEX_SCOPE(m_TerminateExecutionMutex)
return (m_pExecutionScope != nullptr) ? m_pExecutionScope->ExecutionStarted() : false;
END_MUTEX_SCOPE
}
//-----------------------------------------------------------------------------
void V8IsolateImpl::SetUpHeapWatchTimer(bool forceMinInterval)
{
_ASSERTE(IsCurrent() && IsLocked());
const auto minInterval = 50.0;
auto interval = forceMinInterval ? minInterval : std::max(GetHeapSizeSampleInterval(), minInterval);
// create heap watch timer
auto wrIsolate = CreateWeakRef();
m_spHeapWatchTimer = new Timer(static_cast<int>(std::max(GetHeapSizeSampleInterval(), 125.0)), -1, [this, wrIsolate] (Timer* pTimer)
m_spHeapWatchTimer = new Timer(static_cast<int>(interval), -1, [this, wrIsolate] (Timer* pTimer)
{
// heap watch callback; is the isolate still alive?
auto spIsolate = wrIsolate.GetTarget();
@ -2012,7 +2086,10 @@ void V8IsolateImpl::CheckHeapSize(const std::optional<size_t>& optMaxHeapSize, b
auto maxHeapSize = optMaxHeapSize.has_value() ? optMaxHeapSize.value() : m_MaxHeapSize.load();
if (maxHeapSize > 0)
{
// yes; is the total heap size over the limit?
// yes; use normal heap watch timer interval by default
auto forceMinInterval = false;
// is the total heap size over the limit?
v8::HeapStatistics heapStatistics;
GetHeapStatistics(heapStatistics);
if (heapStatistics.total_heap_size() > maxHeapSize)
@ -2028,17 +2105,22 @@ void V8IsolateImpl::CheckHeapSize(const std::optional<size_t>& optMaxHeapSize, b
// yes; the isolate is out of memory; act based on policy
if (m_DisableHeapSizeViolationInterrupt)
{
m_MaxHeapSize = 0;
m_upIsolate->ThrowError("The V8 runtime has exceeded its memory limit");
if (InExecutionScope())
{
m_MaxHeapSize = 0;
m_upIsolate->ThrowError("The V8 runtime has exceeded its memory limit");
return;
}
// defer exception until code execution is in progress
forceMinInterval = true;
}
else
{
m_IsOutOfMemory = true;
TerminateExecution();
return;
}
// exit to avoid restarting the timer
return;
}
}
@ -2046,7 +2128,7 @@ void V8IsolateImpl::CheckHeapSize(const std::optional<size_t>& optMaxHeapSize, b
if (!timerTriggered || (m_HeapWatchLevel > 0))
{
// yes; restart heap watch timer
SetUpHeapWatchTimer();
SetUpHeapWatchTimer(forceMinInterval);
}
}
}
@ -2063,11 +2145,7 @@ void V8IsolateImpl::OnBeforeCallEntered(v8::Isolate* pIsolate)
void V8IsolateImpl::OnBeforeCallEntered()
{
_ASSERTE(IsCurrent() && IsLocked());
if (m_pExecutionScope)
{
m_pExecutionScope->OnExecutionStarted();
}
OnExecutionStarted();
}
//-----------------------------------------------------------------------------

Просмотреть файл

@ -319,7 +319,7 @@ public:
v8::Local<v8::Module> CreateSyntheticModule(v8::Local<v8::String> moduleName, const std::vector<v8::Local<v8::String>>& exportNames, v8::Module::SyntheticModuleEvaluationSteps evaluationSteps)
{
return v8::Module::CreateSyntheticModule(m_upIsolate.get(), moduleName, exportNames, evaluationSteps);
return v8::Module::CreateSyntheticModule(m_upIsolate.get(), moduleName, v8::MemorySpan<const v8::Local<v8::String>>(exportNames.cbegin(), exportNames.cend()), evaluationSteps);
}
v8::Maybe<bool> SetSyntheticModuleExport(v8::Local<v8::Module> hModule, v8::Local<v8::String> hName, v8::Local<v8::Value> hValue)
@ -329,7 +329,7 @@ public:
v8::ScriptOrigin CreateScriptOrigin(v8::Local<v8::Value> hResourceName, int lineOffset = 0, int columnOffset = 0, bool isSharedCrossOrigin = false, int scriptId = -1, v8::Local<v8::Value> hSourceMapUrl = v8::Local<v8::Value>(), bool isOpaque = false, bool isWasm = false, bool isModule = false, v8::Local<v8::PrimitiveArray> hHostDefinedOptions = v8::Local<v8::PrimitiveArray>())
{
return v8::ScriptOrigin(m_upIsolate.get(), hResourceName, lineOffset, columnOffset, isSharedCrossOrigin, scriptId, hSourceMapUrl, isOpaque, isWasm, isModule, hHostDefinedOptions);
return v8::ScriptOrigin(hResourceName, lineOffset, columnOffset, isSharedCrossOrigin, scriptId, hSourceMapUrl, isOpaque, isWasm, isModule, hHostDefinedOptions);
}
template <typename T>
@ -397,19 +397,33 @@ public:
END_MUTEX_SCOPE
m_upIsolate->TerminateExecution();
m_IsExecutionTerminating = true;
BEGIN_MUTEX_SCOPE(m_TerminateExecutionMutex)
if (m_pExecutionScope != nullptr)
{
TerminateExecutionInternal();
}
END_MUTEX_SCOPE
}
bool IsExecutionTerminating()
{
return m_upIsolate->IsExecutionTerminating() || m_IsExecutionTerminating;
BEGIN_MUTEX_SCOPE(m_TerminateExecutionMutex)
return m_IsExecutionTerminating;
END_MUTEX_SCOPE
}
void CancelTerminateExecution()
{
m_upIsolate->CancelTerminateExecution();
m_IsExecutionTerminating = false;
BEGIN_MUTEX_SCOPE(m_TerminateExecutionMutex)
if (m_pExecutionScope != nullptr)
{
CancelTerminateExecutionInternal();
}
END_MUTEX_SCOPE
}
int ContextDisposedNotification()
@ -542,6 +556,9 @@ public:
void SetCachedScriptCacheBytes(uint64_t uniqueId, size_t codeDigest, const std::vector<uint8_t>& cacheBytes);
void ClearScriptCache();
void TerminateExecutionInternal();
void CancelTerminateExecutionInternal();
~V8IsolateImpl();
private:
@ -622,7 +639,12 @@ private:
ExecutionScope* EnterExecutionScope(ExecutionScope* pExecutionScope, size_t* pStackMarker);
void ExitExecutionScope(ExecutionScope* pPreviousExecutionScope);
void SetUpHeapWatchTimer();
ExecutionScope* SetExecutionScope(ExecutionScope* pExecutionScope);
bool InExecutionScope();
void OnExecutionStarted();
bool ExecutionStarted();
void SetUpHeapWatchTimer(bool forceMinInterval);
void CheckHeapSize(const std::optional<size_t>& optMaxHeapSize, bool timerTriggered);
static void OnBeforeCallEntered(v8::Isolate* pIsolate);
@ -670,10 +692,11 @@ private:
std::atomic<uint32_t> m_CpuProfileSampleInterval;
size_t m_StackWatchLevel;
size_t* m_pStackLimit;
SimpleMutex m_TerminateExecutionMutex;
bool m_IsExecutionTerminating;
ExecutionScope* m_pExecutionScope;
const V8DocumentInfo* m_pDocumentInfo;
std::atomic<bool> m_IsOutOfMemory;
std::atomic<bool> m_IsExecutionTerminating;
std::atomic<bool> m_Released;
Statistics m_Statistics;
};

Просмотреть файл

@ -13,6 +13,10 @@
#define V8_DEPRECATION_WARNINGS
#define V8_IMMINENT_DEPRECATION_WARNINGS
#ifdef _DEBUG
#define V8_ENABLE_CHECKS
#endif // _DEBUG
// #define CLEARSCRIPT_V8_POINTER_COMPRESSION_ENABLED
#ifdef CLEARSCRIPT_V8_POINTER_COMPRESSION_ENABLED

Просмотреть файл

@ -15,6 +15,7 @@
<Keyword>ManagedCProj</Keyword>
<RootNamespace>ClearScriptV864</RootNamespace>
<ProjectName>ClearScriptV8.win-arm64</ProjectName>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm64'" Label="Configuration">
@ -29,7 +30,7 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)'=='17.0'">
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>ClangCL</PlatformToolset>
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)'==''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)'=='16.0'">
@ -83,8 +84,9 @@
<SDLCheck>true</SDLCheck>
<OmitFramePointers>false</OmitFramePointers>
<StringPooling>true</StringPooling>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>-Wno-unused-parameter -Wno-unused-private-field</AdditionalOptions>
</ClCompile>
<Link>
<GenerateDebugInformation Condition="'$(VisualStudioVersion)'=='17.0'">DebugFull</GenerateDebugInformation>
@ -120,8 +122,9 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<StringPooling>true</StringPooling>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>-Wno-unused-parameter -Wno-unused-private-field</AdditionalOptions>
</ClCompile>
<Link>
<GenerateDebugInformation Condition="'$(VisualStudioVersion)'=='17.0'">DebugFull</GenerateDebugInformation>
@ -139,6 +142,7 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\HighResolutionClock.cpp" />
<ClCompile Include="..\HighResolutionClock.Windows.cpp" />
<ClCompile Include="..\HostObjectHolderImpl.cpp" />
<ClCompile Include="..\HostObjectUtil.cpp" />

Просмотреть файл

@ -46,6 +46,9 @@
<ClCompile Include="..\HighResolutionClock.Windows.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\HighResolutionClock.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">

Просмотреть файл

@ -15,6 +15,7 @@
<Keyword>ManagedCProj</Keyword>
<RootNamespace>ClearScriptV864</RootNamespace>
<ProjectName>ClearScriptV8.win-x64</ProjectName>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
@ -29,7 +30,7 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)'=='17.0'">
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>ClangCL</PlatformToolset>
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)'==''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)'=='16.0'">
@ -83,8 +84,9 @@
<SDLCheck>true</SDLCheck>
<OmitFramePointers>false</OmitFramePointers>
<StringPooling>true</StringPooling>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>-Wno-unused-parameter -Wno-unused-private-field</AdditionalOptions>
</ClCompile>
<Link>
<GenerateDebugInformation Condition="'$(VisualStudioVersion)'=='17.0'">DebugFull</GenerateDebugInformation>
@ -120,8 +122,9 @@
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<StringPooling>true</StringPooling>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>-Wno-unused-parameter -Wno-unused-private-field</AdditionalOptions>
</ClCompile>
<Link>
<GenerateDebugInformation Condition="'$(VisualStudioVersion)'=='17.0'">DebugFull</GenerateDebugInformation>
@ -139,6 +142,7 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\HighResolutionClock.cpp" />
<ClCompile Include="..\HighResolutionClock.Windows.cpp" />
<ClCompile Include="..\HostObjectHolderImpl.cpp" />
<ClCompile Include="..\HostObjectUtil.cpp" />

Просмотреть файл

@ -46,6 +46,9 @@
<ClCompile Include="..\HighResolutionClock.Windows.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\HighResolutionClock.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">

Просмотреть файл

@ -15,6 +15,7 @@
<Keyword>ManagedCProj</Keyword>
<RootNamespace>ClearScriptV832</RootNamespace>
<ProjectName>ClearScriptV8.win-x86</ProjectName>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@ -29,7 +30,7 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)'=='17.0'">
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>ClangCL</PlatformToolset>
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)'==''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(VisualStudioVersion)'=='16.0'">
@ -82,8 +83,9 @@
<TreatWarningAsError>true</TreatWarningAsError>
<SDLCheck>true</SDLCheck>
<StringPooling>true</StringPooling>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalOptions>-Wno-unused-parameter -Wno-unused-private-field</AdditionalOptions>
</ClCompile>
<Link>
<GenerateDebugInformation Condition="'$(VisualStudioVersion)'=='17.0'">DebugFull</GenerateDebugInformation>
@ -119,8 +121,9 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<OmitFramePointers>true</OmitFramePointers>
<StringPooling>true</StringPooling>
<LanguageStandard>stdcpp17</LanguageStandard>
<LanguageStandard>stdcpp20</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>-Wno-unused-parameter -Wno-unused-private-field</AdditionalOptions>
</ClCompile>
<Link>
<GenerateDebugInformation Condition="'$(VisualStudioVersion)'=='17.0'">DebugFull</GenerateDebugInformation>
@ -138,6 +141,7 @@
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\HighResolutionClock.cpp" />
<ClCompile Include="..\HighResolutionClock.Windows.cpp" />
<ClCompile Include="..\HostObjectHolderImpl.cpp" />
<ClCompile Include="..\HostObjectUtil.cpp" />

Просмотреть файл

@ -46,6 +46,9 @@
<ClCompile Include="..\HighResolutionClock.Windows.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\HighResolutionClock.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">

Просмотреть файл

@ -3,7 +3,7 @@
<!-- ReSharper disable once UnknownProperty -->
<PropertyGroup Condition="'$(VisualStudioVersion)'&gt;='17.0'">
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<RootNamespace>Microsoft.ClearScript.Test</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<CheckEolTargetFramework>false</CheckEolTargetFramework>

Просмотреть файл

@ -3,7 +3,7 @@
<!-- ReSharper disable once UnknownProperty -->
<PropertyGroup Condition="'$(VisualStudioVersion)'&gt;='17.0'">
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<RootNamespace>Microsoft.ClearScript.Test</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<CheckEolTargetFramework>false</CheckEolTargetFramework>

Просмотреть файл

@ -2,7 +2,7 @@
<!-- ReSharper disable once UnknownProperty -->
<PropertyGroup Condition="'$(VisualStudioVersion)'&gt;='17.0'">
<TargetFrameworks>netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<RootNamespace>Microsoft.ClearScript.Test</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<CheckEolTargetFramework>false</CheckEolTargetFramework>

Просмотреть файл

@ -3,7 +3,7 @@
<!-- ReSharper disable once UnknownProperty -->
<PropertyGroup Condition="'$(VisualStudioVersion)'&gt;='17.0'">
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<RootNamespace>Microsoft.ClearScript.Test</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<CheckEolTargetFramework>false</CheckEolTargetFramework>

Просмотреть файл

@ -2,7 +2,7 @@
<!-- ReSharper disable once UnknownProperty -->
<PropertyGroup Condition="'$(VisualStudioVersion)'&gt;='17.0'">
<TargetFrameworks>netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0-windows;net6.0-windows;net7.0-windows;net8.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<RootNamespace>Microsoft.ClearScript.Test</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>

Просмотреть файл

@ -3,7 +3,7 @@
<!-- ReSharper disable once UnknownProperty -->
<PropertyGroup Condition="'$(VisualStudioVersion)'&gt;='17.0'">
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<RootNamespace>Microsoft.ClearScript.Test</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<CheckEolTargetFramework>false</CheckEolTargetFramework>

Просмотреть файл

@ -3,7 +3,7 @@
<!-- ReSharper disable once UnknownProperty -->
<PropertyGroup Condition="'$(VisualStudioVersion)'&gt;='17.0'">
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<RootNamespace>Microsoft.ClearScript.Test</RootNamespace>
<AssemblyName>ClearScriptConsole</AssemblyName>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>

Просмотреть файл

@ -2,7 +2,7 @@
<!-- ReSharper disable once UnknownProperty -->
<PropertyGroup Condition="'$(VisualStudioVersion)'&gt;='17.0'">
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<RootNamespace>Microsoft.ClearScript.Test</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>

Просмотреть файл

@ -2,7 +2,7 @@
<!-- ReSharper disable once UnknownProperty -->
<PropertyGroup Condition="'$(VisualStudioVersion)'&gt;='17.0'">
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netcoreapp3.1;net5.0;net6.0;net7.0;net8.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<RootNamespace>Microsoft.ClearScript.Test</RootNamespace>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>

Просмотреть файл

@ -1,6 +1,6 @@
ifdef DEBUG
CONFIG = Debug
CXXCONFIGFLAGS = -O0 -g
CXXCONFIGFLAGS = -O0 -g -D_DEBUG
else
CONFIG = Release
CXXCONFIGFLAGS = -O3 -DNDEBUG
@ -118,10 +118,11 @@ OBJDIR = $(OUTDIR)/obj/$(CPU)
CLEARSCRIPTV8 = $(OUTDIR)/ClearScriptV8.$(OS)-$(CPU).$(EXTENSION)
CXX = clang++
CXXFLAGS = --target=$(TARGET) -std=c++17 -fvisibility=default -fPIC -fno-rtti -Wno-deprecated-declarations -Wno-ignored-attributes $(CXXCONFIGFLAGS) -I$(V8INCDIR) -I$(JSONINCDIR) $(CXXCROSSFLAGS)
CXXFLAGS = --target=$(TARGET) -std=c++20 -fvisibility=default -fPIC -fno-rtti -Wno-deprecated-declarations -Wno-ignored-attributes $(CXXCONFIGFLAGS) -I$(V8INCDIR) -I$(JSONINCDIR) $(CXXCROSSFLAGS)
HEADERS = $(wildcard $(SRCDIR)/*.h) $(wildcard $(EXPORTSDIR)/*.h)
OBJECTS = \
$(OBJDIR)/HighResolutionClock.o \
$(OBJDIR)/HighResolutionClock.Unix.o \
$(OBJDIR)/HostObjectHolderImpl.o \
$(OBJDIR)/HostObjectUtil.o \

Просмотреть файл

@ -1,8 +1,8 @@
#!/bin/bash
v8testedrev=11.8.172.15
v8testedrev=12.3.219.12
v8testedcommit=
v8cherrypicks=28a7e2d45fd620fa68fb0678a7246fc8e426d1cc
v8cherrypicks=
v8linuxbuildcommit=3d9590754d5d23e62d15472c5baf6777ca59df20
v8linuxclangcommit=184bc29dd86c3994a02b4f3feca125ffe785319c
@ -226,7 +226,7 @@ if [[ $linux == true ]]; then
fi
echo "Building V8 ..."
gn gen out/$cpu/$mode --args="fatal_linker_warnings=false is_cfi=false is_component_build=false is_debug=$isdebug target_cpu=\"$cpu\" use_custom_libcxx=false use_thin_lto=false v8_embedder_string=\"-ClearScript\" v8_enable_pointer_compression=false v8_enable_31bit_smis_on_64bit_arch=false v8_monolithic=true v8_use_external_startup_data=false v8_target_cpu=\"$cpu\"" >gn-$cpu-$mode.log || fail
gn gen out/$cpu/$mode --args="fatal_linker_warnings=false is_cfi=false is_component_build=false is_debug=$isdebug target_cpu=\"$cpu\" use_custom_libcxx=false use_thin_lto=false v8_embedder_string=\"-ClearScript\" v8_enable_fuzztest=false v8_enable_pointer_compression=false v8_enable_31bit_smis_on_64bit_arch=false v8_monolithic=true v8_use_external_startup_data=false v8_target_cpu=\"$cpu\"" >gn-$cpu-$mode.log || fail
ninja -C out/$cpu/$mode obj/libv8_monolith.a >build-$cpu-$mode.log || fail
cd ../..

Просмотреть файл

@ -1,5 +1,5 @@
diff --git a/absl.gni b/absl.gni
index cf8a39e..06c0af0 100644
index 91d4111..9800433 100644
--- a/absl.gni
+++ b/absl.gni
@@ -25,7 +25,6 @@ template("absl_source_set") {

Просмотреть файл

@ -1,5 +1,5 @@
diff --git a/BUILD.gn b/BUILD.gn
index dd97c4f922c..b847c2d4cd4 100644
index a28da024c76..83c1b5d21ad 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -8,7 +8,6 @@ import("//build/config/coverage/coverage.gni")
@ -10,7 +10,7 @@ index dd97c4f922c..b847c2d4cd4 100644
import("//build/config/sanitizers/sanitizers.gni")
import("//build_overrides/build.gni")
@@ -1228,7 +1227,7 @@ config("toolchain") {
@@ -1255,7 +1254,7 @@ config("toolchain") {
visibility = [ "./*" ]
defines = []
@ -20,10 +20,10 @@ index dd97c4f922c..b847c2d4cd4 100644
if (v8_current_cpu == "arm") {
diff --git a/gni/v8.gni b/gni/v8.gni
index e2505eea24e..977b8776db2 100644
index 185de67a522..c2335989396 100644
--- a/gni/v8.gni
+++ b/gni/v8.gni
@@ -103,7 +103,7 @@ declare_args() {
@@ -119,7 +119,7 @@ declare_args() {
cppgc_is_standalone = false
# Enable object names in cppgc for profiling purposes.
@ -67,24 +67,11 @@ index d3e35d6ec5f..56b3faaa791 100644
private:
V8();
diff --git a/include/v8-platform.h b/include/v8-platform.h
index 0d82f4b990a..16d717a2cef 100644
--- a/include/v8-platform.h
+++ b/include/v8-platform.h
@@ -1232,7 +1232,7 @@ class Platform {
* required.
*/
virtual int64_t CurrentClockTimeMilliseconds() {
- return floor(CurrentClockTimeMillis());
+ return static_cast<int64_t>(floor(CurrentClockTimeMillis()));
}
/**
diff --git a/include/v8-template.h b/include/v8-template.h
index 11296cd4889..0f090446dc0 100644
index 674d4201d5d..a4538592531 100644
--- a/include/v8-template.h
+++ b/include/v8-template.h
@@ -939,6 +939,9 @@ class V8_EXPORT ObjectTemplate : public Template {
@@ -935,6 +935,9 @@ class V8_EXPORT ObjectTemplate : public Template {
*/
void SetImmutableProto();
@ -95,10 +82,10 @@ index 11296cd4889..0f090446dc0 100644
* Support for TC39 "dynamic code brand checks" proposal.
*
diff --git a/include/v8config.h b/include/v8config.h
index 33bb3f94316..f03936a972d 100644
index e649d8cce7d..3ca8f9fb448 100644
--- a/include/v8config.h
+++ b/include/v8config.h
@@ -532,7 +532,7 @@ path. Add it with -I<path> to the command line
@@ -550,7 +550,7 @@ path. Add it with -I<path> to the command line
// Use like:
// V8_NOINLINE V8_PRESERVE_MOST void UnlikelyMethod();
#if V8_HAS_ATTRIBUTE_PRESERVE_MOST
@ -108,10 +95,10 @@ index 33bb3f94316..f03936a972d 100644
# define V8_PRESERVE_MOST /* NOT SUPPORTED */
#endif
diff --git a/src/api/api-natives.cc b/src/api/api-natives.cc
index 3015c2f80fb..cafd758b32a 100644
index 0f1747a2a91..0e3e6d6343c 100644
--- a/src/api/api-natives.cc
+++ b/src/api/api-natives.cc
@@ -448,6 +448,9 @@ MaybeHandle<JSObject> InstantiateObject(Isolate* isolate,
@@ -451,6 +451,9 @@ MaybeHandle<JSObject> InstantiateObject(Isolate* isolate,
if (info->immutable_proto()) {
JSObject::SetImmutableProto(object);
}
@ -122,10 +109,10 @@ index 3015c2f80fb..cafd758b32a 100644
// Keep prototypes in slow-mode. Let them be lazily turned fast later on.
// TODO(dcarney): is this necessary?
diff --git a/src/api/api.cc b/src/api/api.cc
index f6505e6820b..00a0a06575e 100644
index 9ca94b045c2..4bce5309eb7 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -1921,6 +1921,17 @@ void ObjectTemplate::SetImmutableProto() {
@@ -1934,6 +1934,17 @@ void ObjectTemplate::SetImmutableProto() {
self->set_immutable_proto(true);
}
@ -143,7 +130,7 @@ index f6505e6820b..00a0a06575e 100644
bool ObjectTemplate::IsCodeLike() const {
return Utils::OpenDirectHandle(this)->code_like();
}
@@ -6454,6 +6465,10 @@ bool v8::V8::InitializeICU(const char* icu_data_file) {
@@ -6530,6 +6541,10 @@ bool v8::V8::InitializeICU(const char* icu_data_file) {
return i::InitializeICU(icu_data_file);
}
@ -154,24 +141,8 @@ index f6505e6820b..00a0a06575e 100644
bool v8::V8::InitializeICUDefaultLocation(const char* exec_path,
const char* icu_data_file) {
return i::InitializeICUDefaultLocation(exec_path, icu_data_file);
diff --git a/src/ast/ast.cc b/src/ast/ast.cc
index 25a9bd3f82e..4e2ff80d108 100644
--- a/src/ast/ast.cc
+++ b/src/ast/ast.cc
@@ -886,8 +886,11 @@ static bool MatchLiteralCompareTypeof(Expression* left, Token::Value op,
return false;
}
+static bool disable_literal_compare_typeof_detection = true;
+
bool CompareOperation::IsLiteralCompareTypeof(Expression** expr,
Literal** literal) {
+ if (disable_literal_compare_typeof_detection) return false;
return MatchLiteralCompareTypeof(left_, op(), right_, expr, literal) ||
MatchLiteralCompareTypeof(right_, op(), left_, expr, literal);
}
diff --git a/src/base/build_config.h b/src/base/build_config.h
index 673330236ce..30e752bc843 100644
index f25bd3f9b57..98b040ac0f0 100644
--- a/src/base/build_config.h
+++ b/src/base/build_config.h
@@ -36,7 +36,7 @@
@ -184,10 +155,10 @@ index 673330236ce..30e752bc843 100644
#define V8_HAS_PKU_JIT_WRITE_PROTECT 0
#endif
diff --git a/src/base/platform/platform.h b/src/base/platform/platform.h
index 4ced4fdeddc..ca5ab82c54a 100644
index 99be31da701..f38dfbd6997 100644
--- a/src/base/platform/platform.h
+++ b/src/base/platform/platform.h
@@ -52,6 +52,8 @@
@@ -53,6 +53,8 @@
#include <sanitizer/asan_interface.h>
#endif // V8_USE_ADDRESS_SANITIZER
@ -197,7 +168,7 @@ index 4ced4fdeddc..ca5ab82c54a 100644
#if V8_CC_MSVC && V8_HOST_ARCH_IA32
// __readfsdword is supposed to be declared in intrin.h but it is missing from
diff --git a/src/builtins/builtins-async-module.cc b/src/builtins/builtins-async-module.cc
index 9920f0b6dc1..61559e2d5fb 100644
index 72ad214dcfa..d0a81059cb5 100644
--- a/src/builtins/builtins-async-module.cc
+++ b/src/builtins/builtins-async-module.cc
@@ -15,7 +15,8 @@ BUILTIN(CallAsyncModuleFulfilled) {
@ -211,10 +182,10 @@ index 9920f0b6dc1..61559e2d5fb 100644
// The evaluation of async module can not throwing a JavaScript observable
// exception.
diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc
index 5edbe168532..2fd4cbad80c 100644
index cc80f7aacca..faefc8d367f 100644
--- a/src/codegen/code-stub-assembler.cc
+++ b/src/codegen/code-stub-assembler.cc
@@ -2126,6 +2126,10 @@ TNode<Uint32T> CodeStubAssembler::LoadMapBitField3(TNode<Map> map) {
@@ -2227,6 +2227,10 @@ TNode<Uint32T> CodeStubAssembler::LoadMapBitField3(TNode<Map> map) {
return LoadObjectField<Uint32T>(map, Map::kBitField3Offset);
}
@ -225,7 +196,7 @@ index 5edbe168532..2fd4cbad80c 100644
TNode<Uint16T> CodeStubAssembler::LoadMapInstanceType(TNode<Map> map) {
return LoadObjectField<Uint16T>(map, Map::kInstanceTypeOffset);
}
@@ -14732,6 +14736,11 @@ TNode<String> CodeStubAssembler::Typeof(TNode<Object> value) {
@@ -15093,6 +15097,11 @@ TNode<String> CodeStubAssembler::Typeof(TNode<Object> value) {
GotoIf(InstanceTypeEqual(instance_type, ODDBALL_TYPE), &if_oddball);
@ -238,10 +209,10 @@ index 5edbe168532..2fd4cbad80c 100644
Word32And(LoadMapBitField(map),
Int32Constant(Map::Bits1::IsCallableBit::kMask |
diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h
index 24def3b60b9..169e3b1a19f 100644
index 7d687744c10..dd15ab9cc6a 100644
--- a/src/codegen/code-stub-assembler.h
+++ b/src/codegen/code-stub-assembler.h
@@ -1491,6 +1491,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
@@ -1570,6 +1570,8 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
TNode<Int32T> LoadMapBitField2(TNode<Map> map);
// Load bit field 3 of a map.
TNode<Uint32T> LoadMapBitField3(TNode<Map> map);
@ -251,11 +222,11 @@ index 24def3b60b9..169e3b1a19f 100644
TNode<Uint16T> LoadMapInstanceType(TNode<Map> map);
// Load the ElementsKind of a map.
diff --git a/src/common/code-memory-access-inl.h b/src/common/code-memory-access-inl.h
index e357648966e..c37396eff65 100644
index e1ec30c166f..5ceb3f452bf 100644
--- a/src/common/code-memory-access-inl.h
+++ b/src/common/code-memory-access-inl.h
@@ -97,31 +97,92 @@ void ThreadIsolation::WritableJitAllocation::ClearBytes(size_t offset,
memset(reinterpret_cast<void*>(address_ + offset), 0, len);
@@ -212,28 +212,89 @@ void WritableFreeSpace::ClearTagged(size_t count) const {
count);
}
-#if V8_HAS_PTHREAD_JIT_WRITE_PROTECT
@ -275,9 +246,8 @@ index e357648966e..c37396eff65 100644
+ code_space_host_nesting_level_++;
+ return code_space_write_nesting_level;
+}
// static
-bool RwxMemoryWriteScope::IsSupportedUntrusted() { return true; }
+
+// static
+void RwxMemoryWriteScope::ExitHostScope(int code_space_write_nesting_level) {
+ if (v8_flags.jitless || !IsSupported()) return;
+ DCHECK_GE(code_space_write_nesting_level, 0);
@ -335,9 +305,6 @@ index e357648966e..c37396eff65 100644
+bool RwxMemoryWriteScope::IsSupported() { return true; }
+
+// static
+bool RwxMemoryWriteScope::IsSupportedUntrusted() { return true; }
+
+// static
+void RwxMemoryWriteScope::SetWritableInternal() {
+ base::SetJitWriteProtected(0);
+}
@ -352,7 +319,7 @@ index e357648966e..c37396eff65 100644
// static
bool RwxMemoryWriteScope::IsSupported() {
static_assert(base::MemoryProtectionKey::kNoMemoryProtectionKey == -1);
@@ -140,31 +201,23 @@ bool RwxMemoryWriteScope::IsSupportedUntrusted() {
@@ -245,31 +306,23 @@ bool RwxMemoryWriteScope::IsSupported() {
}
// static
@ -386,8 +353,8 @@ index e357648966e..c37396eff65 100644
}
#else // !V8_HAS_PTHREAD_JIT_WRITE_PROTECT && !V8_TRY_USE_PKU_JIT_WRITE_PROTECT
@@ -176,10 +229,10 @@ bool RwxMemoryWriteScope::IsSupported() { return false; }
bool RwxMemoryWriteScope::IsSupportedUntrusted() { return false; }
@@ -278,10 +331,10 @@ void RwxMemoryWriteScope::SetExecutable() {
bool RwxMemoryWriteScope::IsSupported() { return false; }
// static
-void RwxMemoryWriteScope::SetWritable() {}
@ -400,10 +367,10 @@ index e357648966e..c37396eff65 100644
#endif // V8_HAS_PTHREAD_JIT_WRITE_PROTECT
diff --git a/src/common/code-memory-access.cc b/src/common/code-memory-access.cc
index 34ee8c78ca5..f6c4537f562 100644
index 94328a128b8..45317ac0461 100644
--- a/src/common/code-memory-access.cc
+++ b/src/common/code-memory-access.cc
@@ -2,10 +2,22 @@
@@ -2,16 +2,29 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@ -426,7 +393,6 @@ index 34ee8c78ca5..f6c4537f562 100644
namespace internal {
ThreadIsolation::TrustedData ThreadIsolation::trusted_data_;
@@ -13,6 +25,7 @@ ThreadIsolation::UntrustedData ThreadIsolation::untrusted_data_;
#if V8_HAS_PTHREAD_JIT_WRITE_PROTECT || V8_HAS_PKU_JIT_WRITE_PROTECT
thread_local int RwxMemoryWriteScope::code_space_write_nesting_level_ = 0;
@ -435,10 +401,10 @@ index 34ee8c78ca5..f6c4537f562 100644
#if V8_HAS_PKU_JIT_WRITE_PROTECT
diff --git a/src/common/code-memory-access.h b/src/common/code-memory-access.h
index c44982d2256..b90eec27f46 100644
index e0d317b07fe..c77411bcdd9 100644
--- a/src/common/code-memory-access.h
+++ b/src/common/code-memory-access.h
@@ -122,6 +122,9 @@ class V8_NODISCARD RwxMemoryWriteScope {
@@ -114,6 +114,9 @@ class V8_NODISCARD RwxMemoryWriteScope {
static V8_EXPORT void SetDefaultPermissionsForSignalHandler();
#endif // V8_HAS_PKU_JIT_WRITE_PROTECT
@ -446,9 +412,9 @@ index c44982d2256..b90eec27f46 100644
+ V8_INLINE static void ExitHostScope(int code_space_write_nesting_level);
+
private:
friend class CodePageMemoryModificationScope;
friend class RwxMemoryWriteScopeForTesting;
@@ -133,9 +136,13 @@ class V8_NODISCARD RwxMemoryWriteScope {
friend class wasm::CodeSpaceWriteScope;
@@ -124,9 +127,13 @@ class V8_NODISCARD RwxMemoryWriteScope {
V8_INLINE static void SetWritable();
V8_INLINE static void SetExecutable();
@ -542,7 +508,7 @@ index a71b866135b..4f1d26676c2 100644
// Unprotect reserved page.
DWORD old_protect;
diff --git a/src/execution/isolate-inl.h b/src/execution/isolate-inl.h
index d956e5f088c..f882ef02606 100644
index 256db29d140..3880ea12bb9 100644
--- a/src/execution/isolate-inl.h
+++ b/src/execution/isolate-inl.h
@@ -35,7 +35,6 @@ V8_INLINE Isolate* Isolate::TryGetCurrent() { return g_current_isolate_; }
@ -554,10 +520,10 @@ index d956e5f088c..f882ef02606 100644
}
diff --git a/src/execution/stack-guard.cc b/src/execution/stack-guard.cc
index 563916a4e96..954e9eb242e 100644
index efcaf8cd10b..0e7cfbb704d 100644
--- a/src/execution/stack-guard.cc
+++ b/src/execution/stack-guard.cc
@@ -232,8 +232,10 @@ void StackGuard::FreeThreadResources() {
@@ -235,8 +235,10 @@ void StackGuard::FreeThreadResources() {
void StackGuard::ThreadLocal::Initialize(Isolate* isolate,
const ExecutionAccess& lock) {
const uintptr_t kLimitSize = v8_flags.stack_size * KB;
@ -569,23 +535,32 @@ index 563916a4e96..954e9eb242e 100644
real_jslimit_ = SimulatorStack::JsLimitFromCLimit(isolate, limit);
set_jslimit(SimulatorStack::JsLimitFromCLimit(isolate, limit));
real_climit_ = limit;
@@ -383,6 +385,8 @@ Tagged<Object> StackGuard::HandleInterrupts(InterruptLevel level) {
isolate_->counters()->stack_interrupts()->Increment();
+ if (isolate_->has_exception()) return ReadOnlyRoots(isolate_).exception();
+
return ReadOnlyRoots(isolate_).undefined_value();
}
diff --git a/src/heap/factory.cc b/src/heap/factory.cc
index 462a3944e14..ab9ea0f0d3b 100644
index 82ee405ecb5..9a2c4f39170 100644
--- a/src/heap/factory.cc
+++ b/src/heap/factory.cc
@@ -2111,6 +2111,7 @@ Tagged<Map> Factory::InitializeMap(Tagged<Map> map, InstanceType type,
@@ -2129,6 +2129,7 @@ Tagged<Map> Factory::InitializeMap(Tagged<Map> map, InstanceType type,
Map::Bits3::ConstructionCounterBits::encode(Map::kNoSlackTracking) |
Map::Bits3::IsExtensibleBit::encode(true);
map->set_bit_field3(bit_field3);
+ map->set_host_bit_field(0);
map->set_instance_type(type);
ReadOnlyRoots ro_roots(roots);
map->init_prototype_and_constructor_or_back_pointer(ro_roots);
map->init_prototype_and_constructor_or_back_pointer(roots);
map->set_instance_size(instance_size);
diff --git a/src/heap/setup-heap-internal.cc b/src/heap/setup-heap-internal.cc
index 9f51a70c46c..fb2a712c56c 100644
index 243d96b8618..7c1a72627e9 100644
--- a/src/heap/setup-heap-internal.cc
+++ b/src/heap/setup-heap-internal.cc
@@ -298,6 +298,7 @@ AllocationResult Heap::AllocatePartialMap(InstanceType instance_type,
@@ -296,6 +296,7 @@ void InitializePartialMap(Tagged<Map> map, Tagged<Map> meta_map,
Map::Bits3::OwnsDescriptorsBit::encode(true) |
Map::Bits3::ConstructionCounterBits::encode(Map::kNoSlackTracking);
map->set_bit_field3(bit_field3);
@ -594,10 +569,18 @@ index 9f51a70c46c..fb2a712c56c 100644
map->clear_padding();
map->set_elements_kind(TERMINAL_FAST_ELEMENTS_KIND);
diff --git a/src/init/icu_util.cc b/src/init/icu_util.cc
index 67d349557c6..49ffb52386b 100644
index 67d349557c6..cfb7fcefbaf 100644
--- a/src/init/icu_util.cc
+++ b/src/init/icu_util.cc
@@ -98,6 +98,26 @@ bool InitializeICU(const char* icu_data_file) {
@@ -11,6 +11,7 @@
#if defined(V8_INTL_SUPPORT)
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include "src/base/build_config.h"
#include "src/base/file-utils.h"
@@ -98,6 +99,26 @@ bool InitializeICU(const char* icu_data_file) {
#endif
}
@ -646,10 +629,10 @@ index e127e75f10f..b0e4bd2d68e 100644
// Like above, but using the default icudt[lb].dat location if icu_data_file is
// not specified.
diff --git a/src/init/v8.cc b/src/init/v8.cc
index 7200df07078..d98d23f708d 100644
index 15540a75e7e..74ab11151a0 100644
--- a/src/init/v8.cc
+++ b/src/init/v8.cc
@@ -95,7 +95,6 @@ V8_DECLARE_ONCE(init_snapshot_once);
@@ -98,7 +98,6 @@ V8_DECLARE_ONCE(init_snapshot_once);
// static
void V8::InitializePlatform(v8::Platform* platform) {
AdvanceStartupState(V8StartupState::kPlatformInitializing);
@ -657,8 +640,26 @@ index 7200df07078..d98d23f708d 100644
CHECK_NOT_NULL(platform);
platform_ = platform;
v8::base::SetPrintStackTrace(platform_->GetStackTracePrinter());
diff --git a/src/interpreter/bytecode-generator.cc b/src/interpreter/bytecode-generator.cc
index da222bb8c3c..4950acfe588 100644
--- a/src/interpreter/bytecode-generator.cc
+++ b/src/interpreter/bytecode-generator.cc
@@ -6848,10 +6848,13 @@ static bool IsCharU(const AstRawString* str) {
return str->length() == 1 && str->FirstCharacter() == 'u';
}
+static bool disable_literal_compare_typeof_detection = true;
+
static bool IsLiteralCompareTypeof(CompareOperation* expr,
Expression** sub_expr,
TestTypeOfFlags::LiteralFlag* flag,
const AstStringConstants* ast_constants) {
+ if (disable_literal_compare_typeof_detection) return false;
if (IsTypeof(expr->left()) && expr->right()->IsStringLiteral()) {
Literal* right_lit = expr->right()->AsLiteral();
diff --git a/src/libplatform/default-platform.cc b/src/libplatform/default-platform.cc
index 958aa0b9841..1f48b84928b 100644
index 2a8f06a9c09..5476b4c9d3b 100644
--- a/src/libplatform/default-platform.cc
+++ b/src/libplatform/default-platform.cc
@@ -57,6 +57,10 @@ std::unique_ptr<v8::Platform> NewDefaultPlatform(
@ -673,10 +674,10 @@ index 958aa0b9841..1f48b84928b 100644
IdleTaskSupport idle_task_support,
InProcessStackDumping in_process_stack_dumping,
diff --git a/src/objects/js-objects.cc b/src/objects/js-objects.cc
index 6094323ee09..c1d645c631d 100644
index af21b605e3d..62e84834304 100644
--- a/src/objects/js-objects.cc
+++ b/src/objects/js-objects.cc
@@ -5329,6 +5329,13 @@ void JSObject::SetImmutableProto(Handle<JSObject> object) {
@@ -5207,6 +5207,13 @@ void JSObject::SetImmutableProto(Handle<JSObject> object) {
object->set_map(*new_map, kReleaseStore);
}
@ -691,10 +692,10 @@ index 6094323ee09..c1d645c631d 100644
JavaScriptArguments* args,
uint32_t arg_count,
diff --git a/src/objects/js-objects.h b/src/objects/js-objects.h
index 82d367affe3..911b4036f85 100644
index 9fb0613af3a..2340c6ab309 100644
--- a/src/objects/js-objects.h
+++ b/src/objects/js-objects.h
@@ -763,6 +763,8 @@ class JSObject : public TorqueGeneratedJSObject<JSObject, JSReceiver> {
@@ -774,6 +774,8 @@ class JSObject : public TorqueGeneratedJSObject<JSObject, JSReceiver> {
// Never called from JavaScript
static void SetImmutableProto(Handle<JSObject> object);
@ -704,7 +705,7 @@ index 82d367affe3..911b4036f85 100644
// the caller to initialize object header. Fill the pre-allocated fields with
// undefined_value and the rest with filler_map.
diff --git a/src/objects/map-inl.h b/src/objects/map-inl.h
index 4856ecb7a8d..5a148dd3859 100644
index a28034912de..3bba62d3740 100644
--- a/src/objects/map-inl.h
+++ b/src/objects/map-inl.h
@@ -128,6 +128,9 @@ BIT_FIELD_ACCESSORS(Map, bit_field3, may_have_interesting_properties,
@ -718,10 +719,10 @@ index 4856ecb7a8d..5a148dd3859 100644
DCHECK(has_named_interceptor());
Tagged<FunctionTemplateInfo> info = GetFunctionTemplateInfo(cage_base);
diff --git a/src/objects/map.cc b/src/objects/map.cc
index 798c9c59535..975f264363e 100644
index 2c904d398b2..4fe7a01b664 100644
--- a/src/objects/map.cc
+++ b/src/objects/map.cc
@@ -1190,6 +1190,7 @@ Handle<Map> Map::RawCopy(Isolate* isolate, Handle<Map> src_handle,
@@ -1241,6 +1241,7 @@ Handle<Map> Map::RawCopy(Isolate* isolate, Handle<Map> src_handle,
}
// Same as bit_field comment above.
raw->set_bit_field3(new_bit_field3);
@ -729,7 +730,7 @@ index 798c9c59535..975f264363e 100644
raw->clear_padding();
}
Handle<HeapObject> prototype(src_handle->prototype(), isolate);
@@ -1316,6 +1317,12 @@ Handle<Map> Map::TransitionToImmutableProto(Isolate* isolate, Handle<Map> map) {
@@ -1367,6 +1368,12 @@ Handle<Map> Map::TransitionToImmutableProto(Isolate* isolate, Handle<Map> map) {
return new_map;
}
@ -743,10 +744,10 @@ index 798c9c59535..975f264363e 100644
void EnsureInitialMap(Isolate* isolate, Handle<Map> map) {
#ifdef DEBUG
diff --git a/src/objects/map.h b/src/objects/map.h
index 2853bdc738f..88ce6b166db 100644
index 3ddb06d1f99..ebf2a4b3d2c 100644
--- a/src/objects/map.h
+++ b/src/objects/map.h
@@ -327,6 +327,11 @@ class Map : public TorqueGeneratedMap<Map, HeapObject> {
@@ -338,6 +338,11 @@ class Map : public TorqueGeneratedMap<Map, HeapObject> {
static_assert(kSlackTrackingCounterStart <=
Bits3::ConstructionCounterBits::kMax);
@ -758,7 +759,7 @@ index 2853bdc738f..88ce6b166db 100644
// Inobject slack tracking is the way to reclaim unused inobject space.
//
// The instance size is initially determined by adding some slack to
@@ -692,6 +697,8 @@ class Map : public TorqueGeneratedMap<Map, HeapObject> {
@@ -705,6 +710,8 @@ class Map : public TorqueGeneratedMap<Map, HeapObject> {
DECL_BOOLEAN_ACCESSORS(is_immutable_proto)
@ -767,15 +768,15 @@ index 2853bdc738f..88ce6b166db 100644
// This counter is used for in-object slack tracking.
// The in-object slack tracking is considered enabled when the counter is
// non zero. The counter only has a valid count for initial maps. For
@@ -869,6 +876,8 @@ class Map : public TorqueGeneratedMap<Map, HeapObject> {
@@ -885,6 +892,8 @@ class Map : public TorqueGeneratedMap<Map, HeapObject> {
static Handle<Map> TransitionToImmutableProto(Isolate* isolate,
Handle<Map> map);
+ static Handle<Map> TransitionToHostDelegate(Isolate* isolate, Handle<Map> map);
+
static const int kMaxPreAllocatedPropertyFields = 255;
static_assert(kInstanceTypeOffset == Internals::kMapInstanceTypeOffset);
class BodyDescriptor;
diff --git a/src/objects/map.tq b/src/objects/map.tq
index 590fac8d969..dcadae3285c 100644
--- a/src/objects/map.tq
@ -803,10 +804,10 @@ index 590fac8d969..dcadae3285c 100644
prototype: JSReceiver|Null;
constructor_or_back_pointer_or_native_context: Object;
diff --git a/src/objects/objects.cc b/src/objects/objects.cc
index d55f192de84..a7c7f4937bf 100644
index 99446acd540..81c1e64a4e4 100644
--- a/src/objects/objects.cc
+++ b/src/objects/objects.cc
@@ -911,7 +911,12 @@ Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) {
@@ -910,7 +910,12 @@ Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) {
if (IsString(*object)) return isolate->factory()->string_string();
if (IsSymbol(*object)) return isolate->factory()->symbol_string();
if (IsBigInt(*object)) return isolate->factory()->bigint_string();
@ -821,10 +822,20 @@ index d55f192de84..a7c7f4937bf 100644
}
diff --git a/src/objects/source-text-module.cc b/src/objects/source-text-module.cc
index 6d391b2bebc..d14dbc17f7e 100644
index 13890419a01..d25c6cd86b3 100644
--- a/src/objects/source-text-module.cc
+++ b/src/objects/source-text-module.cc
@@ -747,7 +747,7 @@ MaybeHandle<Object> SourceTextModule::Evaluate(
@@ -731,7 +731,8 @@ MaybeHandle<Object> SourceTextModule::Evaluate(
try_catch.SetVerbose(false);
try_catch.SetCaptureMessage(false);
// TODO(verwaest): Return a bool from InnerModuleEvaluation instead?
- if (InnerModuleEvaluation(isolate, module, &stack, &dfs_index).is_null()) {
+ Handle<Object> unused_result;
+ if (!InnerModuleEvaluation(isolate, module, &stack, &dfs_index).ToHandle(&unused_result)) {
if (!module->MaybeHandleEvaluationException(isolate, &stack)) return {};
CHECK(try_catch.HasCaught());
// d. Perform ! Call(capability.[[Reject]], undefined,
@@ -746,7 +747,7 @@ MaybeHandle<Object> SourceTextModule::Evaluate(
if (!module->IsAsyncEvaluating()) {
// i. Perform ! Call(capability.[[Resolve]], undefined,
// «undefined»).
@ -833,7 +844,7 @@ index 6d391b2bebc..d14dbc17f7e 100644
.ToHandleChecked();
}
@@ -760,7 +760,7 @@ MaybeHandle<Object> SourceTextModule::Evaluate(
@@ -759,7 +760,7 @@ MaybeHandle<Object> SourceTextModule::Evaluate(
}
Maybe<bool> SourceTextModule::AsyncModuleExecutionFulfilled(
@ -842,7 +853,7 @@ index 6d391b2bebc..d14dbc17f7e 100644
// 1. If module.[[Status]] is evaluated, then
if (module->status() == kErrored) {
// a. Assert: module.[[EvaluationError]] is not empty.
@@ -784,7 +784,7 @@ Maybe<bool> SourceTextModule::AsyncModuleExecutionFulfilled(
@@ -783,7 +784,7 @@ Maybe<bool> SourceTextModule::AsyncModuleExecutionFulfilled(
// «undefined»).
Handle<JSPromise> capability(
JSPromise::cast(module->top_level_capability()), isolate);
@ -851,7 +862,7 @@ index 6d391b2bebc..d14dbc17f7e 100644
.ToHandleChecked();
}
@@ -850,7 +850,7 @@ Maybe<bool> SourceTextModule::AsyncModuleExecutionFulfilled(
@@ -848,7 +849,7 @@ Maybe<bool> SourceTextModule::AsyncModuleExecutionFulfilled(
// undefined, «undefined»).
Handle<JSPromise> capability(
JSPromise::cast(m->top_level_capability()), isolate);
@ -860,8 +871,16 @@ index 6d391b2bebc..d14dbc17f7e 100644
.ToHandleChecked();
}
}
@@ -1186,7 +1187,6 @@ MaybeHandle<Object> SourceTextModule::InnerModuleEvaluation(
} else {
// 15. Otherwise, perform ? module.ExecuteModule().
MaybeHandle<Object> exception;
- Handle<Object> result;
if (!ExecuteModule(isolate, module, &exception).ToHandle(&result)) {
if (!isolate->is_execution_terminating()) {
isolate->Throw(*exception.ToHandleChecked());
diff --git a/src/objects/source-text-module.h b/src/objects/source-text-module.h
index 55754c0a7d4..09cc31846d2 100644
index 2a3249bf1b3..0e781fbe939 100644
--- a/src/objects/source-text-module.h
+++ b/src/objects/source-text-module.h
@@ -58,7 +58,7 @@ class SourceTextModule
@ -874,10 +893,10 @@ index 55754c0a7d4..09cc31846d2 100644
Handle<SourceTextModule> module,
Handle<Object> exception);
diff --git a/src/objects/templates-inl.h b/src/objects/templates-inl.h
index afa42afc4e6..f8d5e7717cb 100644
index 7bf87e10b82..e6a2457218c 100644
--- a/src/objects/templates-inl.h
+++ b/src/objects/templates-inl.h
@@ -184,6 +184,14 @@ void ObjectTemplateInfo::set_code_like(bool is_code_like) {
@@ -186,6 +186,14 @@ void ObjectTemplateInfo::set_code_like(bool is_code_like) {
return set_data(IsCodeKindBit::update(data(), is_code_like));
}
@ -893,10 +912,10 @@ index afa42afc4e6..f8d5e7717cb 100644
return IsTemplateFor(object->map());
}
diff --git a/src/objects/templates.h b/src/objects/templates.h
index 1683a7cb0bc..dd0c7ac149a 100644
index 7eb35de4caf..be9850bf36e 100644
--- a/src/objects/templates.h
+++ b/src/objects/templates.h
@@ -207,6 +207,7 @@ class ObjectTemplateInfo
@@ -211,6 +211,7 @@ class ObjectTemplateInfo
DECL_INT_ACCESSORS(embedder_field_count)
DECL_BOOLEAN_ACCESSORS(immutable_proto)
DECL_BOOLEAN_ACCESSORS(code_like)
@ -905,7 +924,7 @@ index 1683a7cb0bc..dd0c7ac149a 100644
// Starting from given object template's constructor walk up the inheritance
// chain till a function template that has an instance template is found.
diff --git a/src/objects/templates.tq b/src/objects/templates.tq
index fec43b195e7..17a121316c7 100644
index e8a6c9cf209..786e41527be 100644
--- a/src/objects/templates.tq
+++ b/src/objects/templates.tq
@@ -71,7 +71,8 @@ extern class FunctionTemplateInfo extends TemplateInfo {

Просмотреть файл

@ -1,7 +1,7 @@
@echo off
setlocal
set v8testedrev=11.8.172.15
set v8testedrev=12.3.219.12
set v8testedcommit=
set v8cherrypicks=28a7e2d45fd620fa68fb0678a7246fc8e426d1cc

Просмотреть файл

@ -1,5 +1,5 @@
<#
var version = new Version(7, 4, 4);
var version = new Version(7, 4, 5);
var versionSuffix = string.Empty;
new Random(versionSuffix.Length); // suppress "versionSuffix not used" warning
#>

Просмотреть файл

@ -283,16 +283,14 @@ avoid path length issues.</p>
<p class=MsoNormal style='margin-left:.25in'>The provided project and solution
files support <a href="https://visualstudio.microsoft.com/downloads/">Visual
Studio 2022</a> and <a
href="https://visualstudio.microsoft.com/vs/older-downloads/">Visual Studio 2019</a>
Version 16.4 or later. They produce architecture-neutral managed libraries that
Studio 2022</a>. They produce architecture-neutral managed libraries that
target .NET 5.0+, .NET Framework 4.5+, .NET Core 3.1, and .NET Standard 2.1.
ClearScript does not support older environments. The output directory is <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>bin\[Debug|Release]</span></b>.</p>
<p class=MsoNormal style='margin-left:.25in'><b><span style='color:red'>Important:
</span></b>Ensure that <a
href="https://dotnet.microsoft.com/en-us/download/dotnet/6.0">.NET 6.0 SDK</a>
href="https://dotnet.microsoft.com/en-us/download/dotnet/8.0">.NET 8.0 SDK</a>
is installed before building ClearScript.</p>
<p class=MsoNormal style='margin-left:.25in'>There are two ways to build
@ -307,8 +305,7 @@ support, you must first acquire and build V8:</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='color:red'>Important:</span></b> This procedure currently requires <a
href="https://visualstudio.microsoft.com/downloads/">Visual Studio 2022</a> or <a
href="https://visualstudio.microsoft.com/vs/older-downloads/">Visual Studio 2019</a>.</p>
href="https://visualstudio.microsoft.com/downloads/">Visual Studio 2022</a>.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
@ -320,23 +317,24 @@ style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span
style='color:red'>Important:</span></b> Your Visual Studio installation must
include the <b>.NET desktop development</b>, <b>Desktop development with C++</b>,
and <b>Universal Windows Platform Development</b> workloads, as well as the <b>C++
ARM build tools </b>and<b> C++ ARM64</b> <b>build tools</b> components.</p>
ARM build tools</b>, <b>C++ ARM64</b> <b>build tools</b>, and <b>C++ Clang
Compiler for Windows</b> components.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>4.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><b><span
style='color:red'>Important:</span></b> The V8 build also requires <a
href="https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/"><span
style='font-size:10.5pt;line-height:115%;font-family:"Segoe UI",sans-serif;
background:white'>Windows 10 SDK</span></a><span style='font-size:10.5pt;
background:white'>Windows SDK</span></a><span style='font-size:10.5pt;
line-height:115%;font-family:"Segoe UI",sans-serif;color:#171717;background:
white'> version </span><a href="https://go.microsoft.com/fwlink/?linkid=2164145"><span
white'> version </span><a href="https://go.microsoft.com/fwlink/?linkid=2261842"><span
style='font-size:10.5pt;line-height:115%;font-family:"Segoe UI",sans-serif;
background:white'>2104 (10.0.20348.0)</span></a>. Your Windows SDK installation
must include the <b>Debugging Tools for Windows</b> feature.</p>
background:white'>10.0.22621</span></a>. Your Windows SDK installation must
include the <b>Debugging Tools for Windows</b> feature.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>5.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Open
a Visual Studio 2022 or 2019 developer command prompt and run the <b><span
a Visual Studio 2022 developer command prompt and run the <b><span
style='font-size:10.0pt;line-height:115%;font-family:Consolas'>V8Update</span></b>
script from your ClearScript root directory:</p>
@ -386,7 +384,7 @@ revision history.</p>
<p class=MsoNormal style='margin-left:.25in'>You are now ready to build the full
<b><span style='font-size:10.0pt;line-height:115%;font-family:Consolas'>ClearScript</span></b>
solution using Visual Studio 2022 or 2019.</p>
solution using Visual Studio 2022.</p>
<p class=MsoNormal style='margin-left:.25in'><b><span style='color:#00B050'>Note:</span></b>
The first time you open the solution, Visual Studio may prompt you to upgrade
@ -420,7 +418,7 @@ and ClearScript on Linux:</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Install
the following packages: <a href="https://www.git-scm.com/download/linux">Git</a>,
<a href="https://dotnet.microsoft.com/en-us/download/dotnet/6.0">.NET 6.0 SDK</a>,
<a href="https://dotnet.microsoft.com/en-us/download/dotnet/8.0">.NET 8.0 SDK</a>,
<a href="https://clang.llvm.org/">Clang</a>, <a
href="https://www.gnu.org/software/make/">GNU Make</a>, and <a
href="http://pkgconf.org/">pkgconf</a>. For each of these, check your package
@ -476,7 +474,7 @@ and ClearScript on macOS:</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>1.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Install
<a href="https://developer.apple.com/xcode/">Xcode</a> and <a
href="https://dotnet.microsoft.com/en-us/download/dotnet/6.0">.NET 6.0 SDK</a>.</p>
href="https://dotnet.microsoft.com/en-us/download/dotnet/8.0">.NET 8.0 SDK</a>.</p>
<p class=MsoListParagraph style='margin-left:.75in;text-indent:-.25in'>2.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Use

Просмотреть файл

@ -1,7 +1,7 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.0)
activesupport (7.1.3.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
@ -11,22 +11,21 @@ GEM
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.5)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.1.1)
bigdecimal (3.1.4)
base64 (0.2.0)
bigdecimal (3.1.7)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
coffee-script-source (1.12.2)
colorator (1.1.0)
commonmarker (0.23.10)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
dnsruby (1.70.0)
dnsruby (1.71.0)
simpleidn (~> 0.2.1)
drb (2.1.1)
ruby2_keywords
drb (2.2.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
@ -34,24 +33,24 @@ GEM
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.9.1)
faraday (2.7.11)
faraday (2.8.1)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
ffi (1.16.3)
forwardable-extended (2.6.0)
gemoji (3.0.1)
github-pages (228)
github-pages-health-check (= 1.17.9)
jekyll (= 3.9.3)
jekyll-avatar (= 0.7.0)
jekyll-coffeescript (= 1.1.1)
gemoji (4.1.0)
github-pages (231)
github-pages-health-check (= 1.18.2)
jekyll (= 3.9.5)
jekyll-avatar (= 0.8.0)
jekyll-coffeescript (= 1.2.2)
jekyll-commonmark-ghpages (= 0.4.0)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.15.1)
jekyll-default-layout (= 0.1.5)
jekyll-feed (= 0.17.0)
jekyll-gist (= 1.5.0)
jekyll-github-metadata (= 2.13.0)
jekyll-github-metadata (= 2.16.1)
jekyll-include-cache (= 0.2.1)
jekyll-mentions (= 1.6.0)
jekyll-optional-front-matter (= 0.3.2)
@ -78,28 +77,28 @@ GEM
jekyll-theme-tactile (= 0.2.0)
jekyll-theme-time-machine (= 0.2.0)
jekyll-titles-from-headings (= 0.5.3)
jemoji (= 0.12.0)
kramdown (= 2.3.2)
jemoji (= 0.13.0)
kramdown (= 2.4.0)
kramdown-parser-gfm (= 1.1.0)
liquid (= 4.0.4)
mercenary (~> 0.3)
minima (= 2.5.1)
nokogiri (>= 1.13.6, < 2.0)
rouge (= 3.26.0)
rouge (= 3.30.0)
terminal-table (~> 1.4)
github-pages-health-check (1.17.9)
github-pages-health-check (1.18.2)
addressable (~> 2.3)
dnsruby (~> 1.60)
octokit (~> 4.0)
public_suffix (>= 3.0, < 5.0)
octokit (>= 4, < 8)
public_suffix (>= 3.0, < 6.0)
typhoeus (~> 1.3)
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
i18n (1.14.1)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
jekyll (3.9.3)
jekyll (3.9.5)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
@ -112,11 +111,11 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-avatar (0.7.0)
jekyll-avatar (0.8.0)
jekyll (>= 3.0, < 5.0)
jekyll-coffeescript (1.1.1)
jekyll-coffeescript (1.2.2)
coffee-script (~> 2.2)
coffee-script-source (~> 1.11.1)
coffee-script-source (~> 1.12)
jekyll-commonmark (1.4.0)
commonmarker (~> 0.22)
jekyll-commonmark-ghpages (0.4.0)
@ -124,15 +123,15 @@ GEM
jekyll (~> 3.9.0)
jekyll-commonmark (~> 1.4.0)
rouge (>= 2.0, < 5.0)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.15.1)
jekyll-default-layout (0.1.5)
jekyll (>= 3.0, < 5.0)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-gist (1.5.0)
octokit (~> 4.2)
jekyll-github-metadata (2.13.0)
jekyll-github-metadata (2.16.1)
jekyll (>= 3.4, < 5.0)
octokit (~> 4.0, != 4.4.0)
octokit (>= 4, < 7, != 4.4.0)
jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0)
jekyll-mentions (1.6.0)
@ -203,16 +202,16 @@ GEM
jekyll (>= 3.3, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
jemoji (0.12.0)
gemoji (~> 3.0)
jemoji (0.13.0)
gemoji (>= 3, < 5)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
kramdown (2.3.2)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.8.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
@ -220,22 +219,22 @@ GEM
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.20.0)
mutex_m (0.1.2)
nokogiri (1.16.2-x86_64-linux)
minitest (5.22.3)
mutex_m (0.2.0)
nokogiri (1.15.6-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.7)
public_suffix (5.0.4)
racc (1.7.3)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.6)
rouge (3.26.0)
rouge (3.30.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
safe_yaml (1.0.5)
@ -251,13 +250,13 @@ GEM
unf (~> 0.1.4)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
typhoeus (1.4.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unf_ext (0.0.9.1)
unicode-display_width (1.8.0)
PLATFORMS

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1 +1 @@
{"javascriptobjectflags":[42008577,55640070,56885252],"json":[3538946,21626884,22282243,24969217,29753345,38731778,41811974,55705602,57802754,58851330],"java":[3342337,16711681,18087937,19660801,20578305,20840449,21495809,22020097,22544385,22806529,23527425,24313857,41549825,42008577,56492033,56885249,57409537],"jscript":[5832705,6684673,29818882,30343170,30801921,31064066,31457282,31916034,32178178,32243714,32702466,32768002,32899075,33685506,34340865,34865155,38666246,42074118,44630017,50528257,50921473,54788097,55246849,56360962,59637763,60751879,61603847],"javascript":[2752513,2818049,2949121,3080193,3211265,3342337,3604481,7208961,7733249,7864321,8126466,8585217,8650753,8716289,9306113,9568257,9699329,9764865,9830401,10092545,10158081,10289153,10354689,10420225,10485761,10616833,10747905,10813441,10878977,11141121,11337729,11403265,11599873,11796481,12124161,12255233,12779521,13762561,13893633,15007746,15597570,15859714,16252930,16580610,16646146,16711682,17039362,17498114,17956866,18022402,18087938,18415618,19070978,19660802,19988482,20578306,20840450,21495810,22020098,22544386,22806530,23527426,24313858,31391747,36765699,37683203,38469635,38862849,39780353,40304641,41222147,41549825,41615361,41680899,42008587,42336258,42926082,43712514,44695553,50462723,51118082,51511299,51576833,51707905,52232194,52953090,53477377,53608453,54591490,54919169,55312390,55640067,56360964,56492036,56885251,57409539,57671684,58458113,58851334,60620805,60882948,61014021,61210629],"javascriptobjectkind":[41680902,42008577,57409540],"javascrip":[15663105,18808833,50003969,56426497,61145089],"javascriptextensions":[3342338,16711681,18087937,19660801,20578305,20840449,21495809,22020097,22544385,22806529,23527425,24313857,41549825,42008577,56492038],"jscriptengine":[5832706,6684674,29818885,30343173,30801922,31064069,31457285,31916037,32178181,32243713,32702469,32768001,32899077,33685509,34340866,34865157,38666246,42074118,44630018,50528258,50921474,54788098,59375617,59637762,60751883,61407233,61603851],"just":[59113474,59637761]}
{"javascriptobjectflags":[38535169,45940742,61210628],"json":[3604482,23134212,23724035,27000833,29229057,39780354,44498950,53673986,59899906,61145090],"java":[2949121,16252929,17104897,17825793,18153473,18546689,19005441,19333121,19726337,20054017,20512769,21299201,38535169,38862849,61079553,61210625,61341697],"jscript":[6291457,7536641,30867457,31522818,32112641,32309250,32702466,33161218,33685506,34734083,36503554,37486594,38469634,39059457,39124998,39190531,39976962,40566786,41287686,43909121,53805057,55377922,55967745,58392583,61407239,61472769,61669379],"javascript":[2621441,2686977,2818049,2949121,3145729,3211265,3670017,7143425,8060929,8126465,8257537,8323073,8650753,8912897,9043969,9306113,9437186,9568257,9699329,9830401,10289153,10354689,10420225,10485761,10616833,10682369,10878977,10944513,11075585,11141121,11206657,11337729,11665409,12058625,12189697,12255233,12582913,12910593,13565953,15728642,15794178,16056322,16252930,16449538,16580610,16711682,17104898,17301506,17432578,17498114,17825794,18022402,18153474,18219010,18481154,18546690,19005442,19202050,19333122,19726338,20054018,20512770,21299202,37027843,37421057,37814275,37945345,38535179,38797315,38862849,39321603,39518211,40239107,41156611,41484289,41549825,44040194,44564482,44826626,45350914,45940739,46399491,46989314,47251457,47448066,48037890,52035585,52101121,52428804,55377924,56098817,59375621,59441153,59834372,60162053,60293125,60424197,60751878,60817409,61079556,61145094,61210627,61341699],"javascriptobjectkind":[38535169,46399494,61341700],"javascrip":[13631489,23789569,42336257,45875201,59637761],"javascriptextensions":[2949122,16252929,17104897,17825793,18153473,18546689,19005441,19333121,19726337,20054017,20512769,21299201,38535169,38862849,61079558],"jscriptengine":[6291458,7536642,30867458,31522821,32112642,32309253,32702469,33161221,33685509,34734085,36503557,37486597,38469637,39059458,39124998,39190533,39976961,40566785,41287686,43909122,53805058,55967746,58392587,60882945,61407243,61603841,61669378],"just":[57147394,61669377]}

Просмотреть файл

@ -1 +1 @@
{"kind":[23986178,24182786,24707074,24903682,25034754,25952258,26148866,26542082,26673154,26738690,26935298,27131906,27394050,27590658,27656194,27787266,28049410,28180482,28377090,28442626,28639234,28770306,28901378,29229058,29294594,29491202,29884418,29949954,30146562,30212098,30408706,31195138,31522818,32505858,34471938,35454978,36765698,37683202,38469634,41222146,41680902,50462722,51511298,53608450,55312386,56688641,57409538,58851329,60620802,60882946,61014018,61210626],"keys":[40501249,43450369,44498945,45613063,45875202,57737217,58195969,58982402,59047937],"key":[3276804,16973830,17694726,18939911,19791878,44892166,45481985,45875201,58982405,60555265],"keyword":[15663105,18808833],"keyvaluepair":[3276806,45875202,58982416,59047944],"kinds":[42008577,57409537]}
{"kind":[24444930,24969218,25362434,25493506,25559042,25821186,26017794,26083330,26411010,26542082,26607618,26935298,27066370,27525122,27983874,28049410,28311554,28377090,28573698,28704770,28966914,29294594,29491202,29556738,29949954,30343170,30736386,30998530,31391746,31981570,32178178,33095682,34013186,34930690,35848194,37027842,37814274,37879810,38797314,39518210,40239106,41156610,46399494,59375618,59834370,60162050,60293122,60424194,60620801,60751874,61145089,61341698],"keys":[34537473,42663943,43188225,45809665,46858242,54067201,56426497,57540610,57999361],"key":[2752516,16121862,17039367,17694726,19595270,45744129,46858241,49152006,57540613,58654721],"keyword":[13631489,23789569],"keyvaluepair":[2752518,46858242,56426504,57540624],"kinds":[38535169,61341697]}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1 +1 @@
{"qux":[11599873],"qualified":[1769473,3670017,8126465,9830401,10813441,12189697,13041665,13238273,13893633,14876673,15728641,17170433,17891329,19464193,20119553,21954561,57147393,58720257]}
{"qux":[12255233],"qualified":[1703937,3801089,8126465,9437185,10878977,12124161,12517377,13041665,13500417,13565953,13697025,14286849,19136513,19922945,23199745,24248321,51576833,55902209]}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1 +1 @@
{"www":[8650753],"writeruntimeheapsnapshot":[6619137,29753348,58458113],"writeheapsnapshot":[5046273,24969220,59965441],"windowsscriptengineflags":[30343173,31719429,31916037,32178181,32243713,32899077,33030149,33357829,33685509,34209797,34865157,34930693,36110341,36438021,37093379,37289989,38666243,39452675,42074115,57933827,59637764,60751875,61341699,61603843],"windowsscriptengine":[5832710,6553606,6684678,6815750,9175042,10027016,31653889,32243713,32374785,32768001,33488898,34144257,35061761,36438020,36896769,37289988,37748737,38404102,44630020,46137348,47906818,50921477,51970049,52297733,52428801,53018625,53673985,55967745,57933841,58458113,59375638,60227585,60751887,61341711,61407240,61603857],"writes":[3538945,5046273,6619137,22282241,24969217,29753345,57802753,58458113,59965441],"written":[44302337,49020929,60030977],"webclient":[12779524],"writable":[4980737,5111809,5439489,5570561,17235969,17432577,18219009,19005441,33619970,42139650,57737218,59047938,59310081],"window":[4653057,37355521,48496642,52428801,54198274,61472770],"way":[8126465,15663105,18808833],"write":[3604481,11599873,15597569,17498113,19988485,22282242,24969218,29753346,55312385],"wrapnullresult":[8519682,40632321,45350913,50003969,56426497,61145089],"writeline":[7208961,10092545,12779523],"writer":[3538945,22282247,57802753],"widget":[11141121],"work":[59113474],"webclientt":[12779522],"waited":[56623105],"web":[12779522,39976961,54722561],"waiting":[6619137,29687809,58458113],"wrapping":[8519681,38404097,42401793,44433409,44630017,46137345,47120385,47906817,50003970,50921473,52297729,56426498,57933825,58458113,59375617,59899905,60227585,60751873,61341697,61407233,61603841],"writejson":[3538945,22282244,57802753],"wrapped":[51576833,53477377],"windows":[524289,917505,1376260,2359300,4653057,5177345,5832705,5898241,6422529,6553601,6684673,6815745,7274497,9175042,10027010,15663105,16056321,18087937,18808833,19660801,19726337,22544385,23527425,29818884,30343173,30736388,30801924,30932996,31064068,31457284,31588356,31653893,31719429,31784964,31916037,32112644,32178181,32243719,32309252,32374789,32440324,32702468,32768005,32833540,32899077,33030149,33357829,33488901,33554436,33685509,33816580,34013188,34144261,34209797,34340868,34734084,34865157,34930693,35061765,35520516,35717124,36110341,36175873,36438023,36700164,36896773,37093377,37289991,37355524,37748738,38404098,38666241,38993924,39452673,41484289,42074113,44630017,46137345,47906818,48496641,49283073,50528260,50921473,51249156,51970053,52297729,52428805,53018629,53673989,54198276,54788100,55246854,55574532,55967749,56360966,56623106,56754177,57933832,59375628,59637766,60096517,60227585,60751878,60948486,61341702,61407243,61472773,61538309,61603848],"writebytes":[2752513,2818049,2949121,3211265,3604481,15597572,17498116,53608449,55312385,60620801,60882945,61014017],"wait":[56623105,58851329],"weight":[11141121]}
{"www":[10616833],"writeruntimeheapsnapshot":[7208961,29229060,60817409],"writeheapsnapshot":[4980737,27000836,58261505],"windowsscriptengineflags":[32309253,32833541,33685509,34275333,34734085,35127301,35454981,36044805,36503557,37224453,38207493,38469637,39124995,39190533,39976961,40173571,41287683,41811971,45613061,58392579,60096515,61407235,61538307,61669380],"windowsscriptengine":[6291462,6356998,6553606,7536646,8716290,8978440,36044804,39059461,39976961,40566785,40632325,40763393,41746433,42205190,42467329,43122689,43778050,43909124,44367873,44695553,44957700,45613060,46268418,49676289,50069505,54788097,56819713,57344001,58195969,58392591,60096527,60817409,60882952,61407249,61538321,61603862],"writes":[3604481,4980737,7208961,23724033,27000833,29229057,53673985,58261505,60817409],"written":[47054849,51642369,56492033],"webclient":[12910596],"writable":[4915201,5373953,5898241,6160385,16318465,16973825,17629185,20185089,31719426,41091074,56426498,56950785,57999362],"window":[4718593,30605313,46596098,50397186,57344001,60948482],"way":[9437185,13631489,23789569],"write":[3670017,12255233,17301509,17498113,18219009,23724034,27000834,29229058,60751873],"wrapnullresult":[9175042,42336257,45875201,49610753,50790401,59637761],"writeline":[8650753,9568257,12910595],"writer":[3604481,23724039,53673985],"widget":[10944513],"work":[57147394],"webclientt":[12910594],"waited":[50593793],"web":[12910594,41943041,59572225],"waiting":[7208961,26279937,60817409],"wrapping":[9175041,39059457,40632321,42074113,42205185,42336258,43909121,44957697,45088769,45875202,46268417,47775745,58195969,58327041,58392577,60096513,60817409,60882945,61407233,61538305,61603841],"writejson":[3604481,23724036,53673985],"wrapped":[52035585,56098817],"windows":[786433,851969,1441796,1507332,4718593,4784129,5177345,6291457,6356993,6553601,6881281,7536641,7798785,8716290,8978434,13631489,16187393,16252929,18546689,19333121,21299201,23068673,23789569,30277636,30474244,30605316,30801924,30867460,31195140,31260676,31522820,31588356,31916036,32112644,32243716,32309253,32636932,32702468,32833541,32964612,33161220,33226756,33554436,33685509,33947652,34144260,34275333,34734085,35127301,35454981,35520516,36044807,36306948,36503557,37224453,37486596,38207493,38469637,38600705,39059457,39124993,39190533,39649281,39976967,40173569,40566789,40632321,40763394,41287681,41746437,41811969,42205186,42467333,43122693,43778053,43909121,44367877,44695557,44957697,45613063,46268418,46596097,47120385,49676293,50069509,50397188,50593794,53805060,54329348,54788101,55377926,55967748,56295428,56819717,57016325,57344005,58195969,58392582,58720262,59965441,60096518,60882955,60948485,61014021,61407240,61472774,61538312,61603852,61669382],"writebytes":[2621441,2686977,2818049,3211265,3670017,17498116,18219012,59375617,59834369,60162049,60424193,60751873],"wait":[50593793,61145089],"weight":[10944513]}

Просмотреть файл

@ -1 +1 @@
{"yields":[58851329],"young":[39518209,54132738,60293121],"yield":[7143425,8126465,9830401,13238273,13303809,13828097,13959169,14155777,14614529,14876673,15728641,17170433,17891329,18612225,18677761,19136513,19464193,20119553,21954561,22872065,23658497]}
{"yields":[61145089],"young":[38993921,54263810,58589185],"yield":[8126465,8454145,9437185,12713985,13041665,13500417,13697025,14286849,14483457,15007745,15138817,15269889,19136513,19922945,20709377,21037057,21430273,21889025,23199745,24248321,25100289]}

Просмотреть файл

@ -1 +1 @@
{"zero":[44367873,45547521,47972353,53936129,60162049]}
{"zero":[40501249,48365569,54919169,57081857,58458113]}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,13 +1,13 @@
<html><head><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="Microsoft.Help.SelfBranded" content="true" /><meta name="Language" content="en-us" /><meta name="Microsoft.Help.Locale" content="en-us" /><meta name="Microsoft.Help.TopicLocale" content="en-us" /><link rel="shortcut icon" href="../icons/favicon.ico" /><link rel="stylesheet" type="text/css" href="../styles/branding.css" /><link rel="stylesheet" type="text/css" href="../styles/branding-en-US.css" /><script type="text/javascript" src="../scripts/branding.js"></script><title>PropertyBag.PropertyChanged Event</title><meta name="Title" content="PropertyChanged Event" /><meta name="Microsoft.Help.Id" content="E:Microsoft.ClearScript.PropertyBag.PropertyChanged" /><meta name="Microsoft.Help.ContentType" content="Reference" /><meta name="System.Keywords" content="PropertyBag.PropertyChanged event" /><meta name="System.Keywords" content="PropertyChanged event" /><meta name="Microsoft.Help.F1" content="Microsoft.ClearScript.PropertyBag.PropertyChanged" /><meta name="Microsoft.Help.F1" content="PropertyBag.PropertyChanged" /><meta name="Microsoft.Help.F1" content="PropertyChanged" /><meta name="container" content="Microsoft.ClearScript" /><meta name="file" content="E_Microsoft_ClearScript_PropertyBag_PropertyChanged" /><meta name="guid" content="E_Microsoft_ClearScript_PropertyBag_PropertyChanged" /><meta name="Description" content="Occurs when a property is added or replaced, or when the collection is cleared." /><link rel="stylesheet" type="text/css" href="../styles/branding-Website.css" /><script type="text/javascript" src="../scripts/jquery-3.5.1.min.js"></script><script type="text/javascript" src="../scripts/branding-Website.js"></script><script type="text/javascript" src="../scripts/clipboard.min.js"></script></head><body onload="SetDefaultLanguage('cs');"><input type="hidden" id="userDataCache" class="userDataStyle" /><div id="PageHeader" class="pageHeader">ClearScript Library<form id="SearchForm" method="get" action="#" onsubmit="TransferToSearchPage(); return false;"><input id="SearchTextBox" type="text" maxlength="200" /><button id="SearchButton" type="submit"></button></form></div><div class="pageBody"><div class="leftNav" id="leftNav"><div id="tocNav"><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/R_Project_Reference.htm" title="ClearScript Library" tocid="roottoc">ClearScript Library</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/R_Project_Reference.htm" title="ClearScript Library Reference" tocid="R_Project_Reference">ClearScript Library Reference</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/N_Microsoft_ClearScript.htm" title="Microsoft.ClearScript" tocid="N_Microsoft_ClearScript">Microsoft.ClearScript</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/T_Microsoft_ClearScript_PropertyBag.htm" title="PropertyBag Class" tocid="T_Microsoft_ClearScript_PropertyBag">PropertyBag Class</a></div><div class="toclevel1" data-toclevel="1" data-childrenloaded="true"><a class="tocExpanded" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/Events_T_Microsoft_ClearScript_PropertyBag.htm" title="PropertyBag Events" tocid="Events_T_Microsoft_ClearScript_PropertyBag">PropertyBag Events</a></div><div class="toclevel2 current" data-toclevel="2"><a data-tochassubtree="false" href="../html/E_Microsoft_ClearScript_PropertyBag_PropertyChanged.htm" title="PropertyChanged Event" tocid="E_Microsoft_ClearScript_PropertyBag_PropertyChanged">PropertyChanged Event</a></div></div><div id="tocResizableEW" onmousedown="OnMouseDown(event);"></div><div id="TocResize" class="tocResize"><img id="ResizeImageIncrease" src="../icons/TocOpen.gif" onclick="OnIncreaseToc()" alt="Click or drag to resize" title="Click or drag to resize" /><img id="ResizeImageReset" src="../icons/TocClose.gif" style="display:none" onclick="OnResetToc()" alt="Click or drag to resize" title="Click or drag to resize" /></div></div><div id="TopicContent" class="topicContent"><table class="titleTable"><tr><td class="titleColumn"><h1>Property<wbr />Bag<span id="LSTB9514013_0" data-languageSpecificText="cpp=::|nu=."></span>Property<wbr />Changed Event</h1></td></tr></table><div class="summary">
Occurs when a property is added or replaced, or when the collection is cleared.
</div><br /><strong>Namespace:</strong> <a href="N_Microsoft_ClearScript.htm">Microsoft.ClearScript</a><br /><strong>Assembly:</strong> ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.4<div class="collapsibleAreaRegion"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('IDB')" onkeypress="SectionExpandCollapse_CheckKey('IDB', event)" tabindex="0"><img id="IDBToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />Syntax</span></div><div id="IDBSection" class="collapsibleSection"><div id="IDAB" class="codeSnippetContainer"><div class="codeSnippetContainerTabs"><div id="IDAB_tab1" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cs','1','4');return false;">C#</a></div><div id="IDAB_tab2" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','vb','2','4');return false;">VB</a></div><div id="IDAB_tab3" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cpp','3','4');return false;">C++</a></div><div id="IDAB_tab4" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','fs','4','4');return false;">F#</a></div></div><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetToolBar"><div class="codeSnippetToolBarText"><a id="IDAB_copyCode" href="#" class="copyCodeSnippet" onclick="CopyToClipboard('IDAB');return false;" title="Copy">Copy</a></div></div><div id="IDAB_code_Div1" class="codeSnippetContainerCode" style="display: block"><pre xml:space="preserve"><span class="keyword">public</span> event <span class="identifier">PropertyChangedEventHandler</span> <span class="identifier">PropertyChanged</span></pre></div><div id="IDAB_code_Div2" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">Public</span> Event <span class="identifier">PropertyChanged</span> <span class="keyword">As</span> <span class="identifier">PropertyChangedEventHandler</span></pre></div><div id="IDAB_code_Div3" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">public</span>:
</div><br /><strong>Namespace:</strong> <a href="N_Microsoft_ClearScript.htm">Microsoft.ClearScript</a><br /><strong>Assembly:</strong> ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5<div class="collapsibleAreaRegion"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('IDB')" onkeypress="SectionExpandCollapse_CheckKey('IDB', event)" tabindex="0"><img id="IDBToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />Syntax</span></div><div id="IDBSection" class="collapsibleSection"><div id="IDAB" class="codeSnippetContainer"><div class="codeSnippetContainerTabs"><div id="IDAB_tab1" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cs','1','4');return false;">C#</a></div><div id="IDAB_tab2" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','vb','2','4');return false;">VB</a></div><div id="IDAB_tab3" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cpp','3','4');return false;">C++</a></div><div id="IDAB_tab4" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','fs','4','4');return false;">F#</a></div></div><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetToolBar"><div class="codeSnippetToolBarText"><a id="IDAB_copyCode" href="#" class="copyCodeSnippet" onclick="CopyToClipboard('IDAB');return false;" title="Copy">Copy</a></div></div><div id="IDAB_code_Div1" class="codeSnippetContainerCode" style="display: block"><pre xml:space="preserve"><span class="keyword">public</span> event <span class="identifier">PropertyChangedEventHandler</span> <span class="identifier">PropertyChanged</span></pre></div><div id="IDAB_code_Div2" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">Public</span> Event <span class="identifier">PropertyChanged</span> <span class="keyword">As</span> <span class="identifier">PropertyChangedEventHandler</span></pre></div><div id="IDAB_code_Div3" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">public</span>:
<span class="keyword">virtual</span> <span class="keyword">event</span> <span class="identifier">PropertyChangedEventHandler</span>^ <span class="identifier">PropertyChanged</span> {
<span class="keyword">void</span> <span class="keyword">add</span> (<span class="identifier">PropertyChangedEventHandler</span>^ <span class="parameter">value</span>);
<span class="keyword">void</span> <span class="keyword">remove</span> (<span class="identifier">PropertyChangedEventHandler</span>^ <span class="parameter">value</span>);
}</pre></div><div id="IDAB_code_Div4" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">abstract</span> <span class="identifier">PropertyChanged</span> : <span class="identifier">IEvent</span>&lt;<span class="identifier">PropertyChangedEventHandler</span>,
<span class="identifier">PropertyChangedEventArgs</span>&gt;
<span class="keyword">override</span> <span class="identifier">PropertyChanged</span> : <span class="identifier">IEvent</span>&lt;<span class="identifier">PropertyChangedEventHandler</span>,
<span class="identifier">PropertyChangedEventArgs</span>&gt;</pre></div></div></div><h4>Value</h4><a href="https://docs.microsoft.com/dotnet/api/system.componentmodel.propertychangedeventhandler" target="_blank" rel="noopener noreferrer">PropertyChangedEventHandler</a><h4>Implements</h4><a href="https://docs.microsoft.com/dotnet/api/system.componentmodel.inotifypropertychanged.propertychanged" target="_blank" rel="noopener noreferrer">INotifyPropertyChanged<span id="LSTB9514013_1" data-languageSpecificText="cs=.|vb=.|cpp=::|nu=.|fs=."></span>PropertyChanged</a><br /></div><div class="collapsibleAreaRegion"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('seeAlso')" onkeypress="SectionExpandCollapse_CheckKey('seeAlso', event)" tabindex="0"><img id="seeAlsoToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />See Also</span></div><div id="seeAlsoSection" class="collapsibleSection"><h4>Reference</h4><div><a href="T_Microsoft_ClearScript_PropertyBag.htm">PropertyBag Class</a></div><div><a href="N_Microsoft_ClearScript.htm">Microsoft.ClearScript Namespace</a></div></div></div></div><div id="PageFooter" class="pageFooter"><p>Copyright © Microsoft Corporation. All rights reserved.</p><div class="feedbackLink">Send comments on this topic to
<span class="identifier">PropertyChangedEventArgs</span>&gt;</pre></div></div></div><h4>Value</h4><a href="https://learn.microsoft.com/dotnet/api/system.componentmodel.propertychangedeventhandler" target="_blank" rel="noopener noreferrer">PropertyChangedEventHandler</a><h4>Implements</h4><a href="https://learn.microsoft.com/dotnet/api/system.componentmodel.inotifypropertychanged.propertychanged" target="_blank" rel="noopener noreferrer">INotifyPropertyChanged<span id="LSTB9514013_1" data-languageSpecificText="cs=.|vb=.|cpp=::|nu=.|fs=."></span>PropertyChanged</a><br /></div><div class="collapsibleAreaRegion"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('seeAlso')" onkeypress="SectionExpandCollapse_CheckKey('seeAlso', event)" tabindex="0"><img id="seeAlsoToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />See Also</span></div><div id="seeAlsoSection" class="collapsibleSection"><h4>Reference</h4><div><a href="T_Microsoft_ClearScript_PropertyBag.htm">PropertyBag Class</a></div><div><a href="N_Microsoft_ClearScript.htm">Microsoft.ClearScript Namespace</a></div></div></div></div><div id="PageFooter" class="pageFooter"><p>Copyright © Microsoft Corporation. All rights reserved.</p><div class="feedbackLink">Send comments on this topic to
<a id="HT_MailLink" href="mailto:ClearScript%40microsoft.com?Subject=ClearScript%20Library">Microsoft</a></div>
<script type="text/javascript">
var HT_mailLink = document.getElementById("HT_MailLink");

Просмотреть файл

@ -1,6 +1,6 @@
<html><head><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="Microsoft.Help.SelfBranded" content="true" /><meta name="Language" content="en-us" /><meta name="Microsoft.Help.Locale" content="en-us" /><meta name="Microsoft.Help.TopicLocale" content="en-us" /><link rel="shortcut icon" href="../icons/favicon.ico" /><link rel="stylesheet" type="text/css" href="../styles/branding.css" /><link rel="stylesheet" type="text/css" href="../styles/branding-en-US.css" /><script type="text/javascript" src="../scripts/branding.js"></script><title>V8Runtime.DebuggerConnected Event</title><meta name="Title" content="DebuggerConnected Event" /><meta name="Microsoft.Help.Id" content="E:Microsoft.ClearScript.V8.V8Runtime.DebuggerConnected" /><meta name="Microsoft.Help.ContentType" content="Reference" /><meta name="System.Keywords" content="V8Runtime.DebuggerConnected event" /><meta name="System.Keywords" content="DebuggerConnected event" /><meta name="Microsoft.Help.F1" content="Microsoft.ClearScript.V8.V8Runtime.DebuggerConnected" /><meta name="Microsoft.Help.F1" content="V8Runtime.DebuggerConnected" /><meta name="Microsoft.Help.F1" content="DebuggerConnected" /><meta name="container" content="Microsoft.ClearScript.V8" /><meta name="file" content="E_Microsoft_ClearScript_V8_V8Runtime_DebuggerConnected" /><meta name="guid" content="E_Microsoft_ClearScript_V8_V8Runtime_DebuggerConnected" /><meta name="Description" content="Occurs when a debugger connects to a V8 runtime." /><link rel="stylesheet" type="text/css" href="../styles/branding-Website.css" /><script type="text/javascript" src="../scripts/jquery-3.5.1.min.js"></script><script type="text/javascript" src="../scripts/branding-Website.js"></script><script type="text/javascript" src="../scripts/clipboard.min.js"></script></head><body onload="SetDefaultLanguage('cs');"><input type="hidden" id="userDataCache" class="userDataStyle" /><div id="PageHeader" class="pageHeader">ClearScript Library<form id="SearchForm" method="get" action="#" onsubmit="TransferToSearchPage(); return false;"><input id="SearchTextBox" type="text" maxlength="200" /><button id="SearchButton" type="submit"></button></form></div><div class="pageBody"><div class="leftNav" id="leftNav"><div id="tocNav"><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/R_Project_Reference.htm" title="ClearScript Library" tocid="roottoc">ClearScript Library</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/R_Project_Reference.htm" title="ClearScript Library Reference" tocid="R_Project_Reference">ClearScript Library Reference</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/N_Microsoft_ClearScript_V8.htm" title="Microsoft.ClearScript.V8" tocid="N_Microsoft_ClearScript_V8">Microsoft.ClearScript.V8</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/T_Microsoft_ClearScript_V8_V8Runtime.htm" title="V8Runtime Class" tocid="T_Microsoft_ClearScript_V8_V8Runtime">V8Runtime Class</a></div><div class="toclevel1" data-toclevel="1" data-childrenloaded="true"><a class="tocExpanded" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/Events_T_Microsoft_ClearScript_V8_V8Runtime.htm" title="V8Runtime Events" tocid="Events_T_Microsoft_ClearScript_V8_V8Runtime">V8Runtime Events</a></div><div class="toclevel2 current" data-toclevel="2"><a data-tochassubtree="false" href="../html/E_Microsoft_ClearScript_V8_V8Runtime_DebuggerConnected.htm" title="DebuggerConnected Event" tocid="E_Microsoft_ClearScript_V8_V8Runtime_DebuggerConnected">DebuggerConnected Event</a></div><div class="toclevel2" data-toclevel="2"><a data-tochassubtree="false" href="../html/E_Microsoft_ClearScript_V8_V8Runtime_DebuggerDisconnected.htm" title="DebuggerDisconnected Event" tocid="E_Microsoft_ClearScript_V8_V8Runtime_DebuggerDisconnected">DebuggerDisconnected Event</a></div></div><div id="tocResizableEW" onmousedown="OnMouseDown(event);"></div><div id="TocResize" class="tocResize"><img id="ResizeImageIncrease" src="../icons/TocOpen.gif" onclick="OnIncreaseToc()" alt="Click or drag to resize" title="Click or drag to resize" /><img id="ResizeImageReset" src="../icons/TocClose.gif" style="display:none" onclick="OnResetToc()" alt="Click or drag to resize" title="Click or drag to resize" /></div></div><div id="TopicContent" class="topicContent"><table class="titleTable"><tr><td class="titleColumn"><h1>V8Runtime<span id="LSTC4DB887C_0" data-languageSpecificText="cpp=::|nu=."></span>Debugger<wbr />Connected Event</h1></td></tr></table><div class="summary">
Occurs when a debugger connects to a V8 runtime.
</div><br /><strong>Namespace:</strong> <a href="N_Microsoft_ClearScript_V8.htm">Microsoft.ClearScript.V8</a><br /><strong>Assembly:</strong> ClearScript.V8 (in ClearScript.V8.dll) Version: 7.4.4<div class="collapsibleAreaRegion"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('IDB')" onkeypress="SectionExpandCollapse_CheckKey('IDB', event)" tabindex="0"><img id="IDBToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />Syntax</span></div><div id="IDBSection" class="collapsibleSection"><div id="IDAB" class="codeSnippetContainer"><div class="codeSnippetContainerTabs"><div id="IDAB_tab1" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cs','1','4');return false;">C#</a></div><div id="IDAB_tab2" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','vb','2','4');return false;">VB</a></div><div id="IDAB_tab3" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cpp','3','4');return false;">C++</a></div><div id="IDAB_tab4" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','fs','4','4');return false;">F#</a></div></div><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetToolBar"><div class="codeSnippetToolBarText"><a id="IDAB_copyCode" href="#" class="copyCodeSnippet" onclick="CopyToClipboard('IDAB');return false;" title="Copy">Copy</a></div></div><div id="IDAB_code_Div1" class="codeSnippetContainerCode" style="display: block"><pre xml:space="preserve"><span class="keyword">public</span> <span class="keyword">static</span> event <span class="identifier">EventHandler</span>&lt;<span class="identifier">V8RuntimeDebuggerEventArgs</span>&gt; <span class="identifier">DebuggerConnected</span></pre></div><div id="IDAB_code_Div2" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">Public</span> <span class="keyword">Shared</span> Event <span class="identifier">DebuggerConnected</span> <span class="keyword">As</span> <span class="identifier">EventHandler</span>(<span class="keyword">Of</span> <span class="identifier">V8RuntimeDebuggerEventArgs</span>)</pre></div><div id="IDAB_code_Div3" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">public</span>:
</div><br /><strong>Namespace:</strong> <a href="N_Microsoft_ClearScript_V8.htm">Microsoft.ClearScript.V8</a><br /><strong>Assembly:</strong> ClearScript.V8 (in ClearScript.V8.dll) Version: 7.4.5<div class="collapsibleAreaRegion"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('IDB')" onkeypress="SectionExpandCollapse_CheckKey('IDB', event)" tabindex="0"><img id="IDBToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />Syntax</span></div><div id="IDBSection" class="collapsibleSection"><div id="IDAB" class="codeSnippetContainer"><div class="codeSnippetContainerTabs"><div id="IDAB_tab1" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cs','1','4');return false;">C#</a></div><div id="IDAB_tab2" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','vb','2','4');return false;">VB</a></div><div id="IDAB_tab3" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cpp','3','4');return false;">C++</a></div><div id="IDAB_tab4" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','fs','4','4');return false;">F#</a></div></div><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetToolBar"><div class="codeSnippetToolBarText"><a id="IDAB_copyCode" href="#" class="copyCodeSnippet" onclick="CopyToClipboard('IDAB');return false;" title="Copy">Copy</a></div></div><div id="IDAB_code_Div1" class="codeSnippetContainerCode" style="display: block"><pre xml:space="preserve"><span class="keyword">public</span> <span class="keyword">static</span> event <span class="identifier">EventHandler</span>&lt;<span class="identifier">V8RuntimeDebuggerEventArgs</span>&gt; <span class="identifier">DebuggerConnected</span></pre></div><div id="IDAB_code_Div2" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">Public</span> <span class="keyword">Shared</span> Event <span class="identifier">DebuggerConnected</span> <span class="keyword">As</span> <span class="identifier">EventHandler</span>(<span class="keyword">Of</span> <span class="identifier">V8RuntimeDebuggerEventArgs</span>)</pre></div><div id="IDAB_code_Div3" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">public</span>:
<span class="keyword">static</span> <span class="keyword">event</span> <span class="identifier">EventHandler</span>&lt;<span class="identifier">V8RuntimeDebuggerEventArgs</span>^&gt;^ <span class="identifier">DebuggerConnected</span> {
<span class="keyword">void</span> <span class="keyword">add</span> (<span class="identifier">EventHandler</span>&lt;<span class="identifier">V8RuntimeDebuggerEventArgs</span>^&gt;^ <span class="parameter">value</span>);
<span class="keyword">void</span> <span class="keyword">remove</span> (<span class="identifier">EventHandler</span>&lt;<span class="identifier">V8RuntimeDebuggerEventArgs</span>^&gt;^ <span class="parameter">value</span>);

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,6 +1,6 @@
<html><head><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="Microsoft.Help.SelfBranded" content="true" /><meta name="Language" content="en-us" /><meta name="Microsoft.Help.Locale" content="en-us" /><meta name="Microsoft.Help.TopicLocale" content="en-us" /><link rel="shortcut icon" href="../icons/favicon.ico" /><link rel="stylesheet" type="text/css" href="../styles/branding.css" /><link rel="stylesheet" type="text/css" href="../styles/branding-en-US.css" /><script type="text/javascript" src="../scripts/branding.js"></script><title>Undefined.Value Field</title><meta name="Title" content="Value Field" /><meta name="Microsoft.Help.Id" content="F:Microsoft.ClearScript.Undefined.Value" /><meta name="Microsoft.Help.ContentType" content="Reference" /><meta name="System.Keywords" content="Undefined.Value field" /><meta name="System.Keywords" content="Value field" /><meta name="Microsoft.Help.F1" content="Microsoft.ClearScript.Undefined.Value" /><meta name="Microsoft.Help.F1" content="Undefined.Value" /><meta name="Microsoft.Help.F1" content="Value" /><meta name="container" content="Microsoft.ClearScript" /><meta name="file" content="F_Microsoft_ClearScript_Undefined_Value" /><meta name="guid" content="F_Microsoft_ClearScript_Undefined_Value" /><meta name="Description" content="The sole instance of the class." /><link rel="stylesheet" type="text/css" href="../styles/branding-Website.css" /><script type="text/javascript" src="../scripts/jquery-3.5.1.min.js"></script><script type="text/javascript" src="../scripts/branding-Website.js"></script><script type="text/javascript" src="../scripts/clipboard.min.js"></script></head><body onload="SetDefaultLanguage('cs');"><input type="hidden" id="userDataCache" class="userDataStyle" /><div id="PageHeader" class="pageHeader">ClearScript Library<form id="SearchForm" method="get" action="#" onsubmit="TransferToSearchPage(); return false;"><input id="SearchTextBox" type="text" maxlength="200" /><button id="SearchButton" type="submit"></button></form></div><div class="pageBody"><div class="leftNav" id="leftNav"><div id="tocNav"><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/R_Project_Reference.htm" title="ClearScript Library" tocid="roottoc">ClearScript Library</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/R_Project_Reference.htm" title="ClearScript Library Reference" tocid="R_Project_Reference">ClearScript Library Reference</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/N_Microsoft_ClearScript.htm" title="Microsoft.ClearScript" tocid="N_Microsoft_ClearScript">Microsoft.ClearScript</a></div><div class="toclevel0" data-toclevel="0"><a class="tocCollapsed" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/T_Microsoft_ClearScript_Undefined.htm" title="Undefined Class" tocid="T_Microsoft_ClearScript_Undefined">Undefined Class</a></div><div class="toclevel1" data-toclevel="1" data-childrenloaded="true"><a class="tocExpanded" onclick="Toggle(this);" href="#!" /><a data-tochassubtree="true" href="../html/Fields_T_Microsoft_ClearScript_Undefined.htm" title="Undefined Fields" tocid="Fields_T_Microsoft_ClearScript_Undefined">Undefined Fields</a></div><div class="toclevel2 current" data-toclevel="2"><a data-tochassubtree="false" href="../html/F_Microsoft_ClearScript_Undefined_Value.htm" title="Value Field" tocid="F_Microsoft_ClearScript_Undefined_Value">Value Field</a></div></div><div id="tocResizableEW" onmousedown="OnMouseDown(event);"></div><div id="TocResize" class="tocResize"><img id="ResizeImageIncrease" src="../icons/TocOpen.gif" onclick="OnIncreaseToc()" alt="Click or drag to resize" title="Click or drag to resize" /><img id="ResizeImageReset" src="../icons/TocClose.gif" style="display:none" onclick="OnResetToc()" alt="Click or drag to resize" title="Click or drag to resize" /></div></div><div id="TopicContent" class="topicContent"><table class="titleTable"><tr><td class="titleColumn"><h1>Undefined<span id="LST300E21CC_0" data-languageSpecificText="cpp=::|nu=."></span>Value Field</h1></td></tr></table><div class="summary">
The sole instance of the <span class="code"><a href="T_Microsoft_ClearScript_Undefined.htm">Undefined</a></span> class.
</div><br /><strong>Namespace:</strong> <a href="N_Microsoft_ClearScript.htm">Microsoft.ClearScript</a><br /><strong>Assembly:</strong> ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.4<div class="collapsibleAreaRegion"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('IDB')" onkeypress="SectionExpandCollapse_CheckKey('IDB', event)" tabindex="0"><img id="IDBToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />Syntax</span></div><div id="IDBSection" class="collapsibleSection"><div id="IDAB" class="codeSnippetContainer"><div class="codeSnippetContainerTabs"><div id="IDAB_tab1" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cs','1','4');return false;">C#</a></div><div id="IDAB_tab2" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','vb','2','4');return false;">VB</a></div><div id="IDAB_tab3" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cpp','3','4');return false;">C++</a></div><div id="IDAB_tab4" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','fs','4','4');return false;">F#</a></div></div><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetToolBar"><div class="codeSnippetToolBarText"><a id="IDAB_copyCode" href="#" class="copyCodeSnippet" onclick="CopyToClipboard('IDAB');return false;" title="Copy">Copy</a></div></div><div id="IDAB_code_Div1" class="codeSnippetContainerCode" style="display: block"><pre xml:space="preserve"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">readonly</span> <span class="identifier">Undefined</span> <span class="identifier">Value</span></pre></div><div id="IDAB_code_Div2" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">Public</span> <span class="keyword">Shared</span> <span class="keyword">ReadOnly</span> <span class="identifier">Value</span> <span class="keyword">As</span> <span class="identifier">Undefined</span></pre></div><div id="IDAB_code_Div3" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">public</span>:
</div><br /><strong>Namespace:</strong> <a href="N_Microsoft_ClearScript.htm">Microsoft.ClearScript</a><br /><strong>Assembly:</strong> ClearScript.Core (in ClearScript.Core.dll) Version: 7.4.5<div class="collapsibleAreaRegion"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('IDB')" onkeypress="SectionExpandCollapse_CheckKey('IDB', event)" tabindex="0"><img id="IDBToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />Syntax</span></div><div id="IDBSection" class="collapsibleSection"><div id="IDAB" class="codeSnippetContainer"><div class="codeSnippetContainerTabs"><div id="IDAB_tab1" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cs','1','4');return false;">C#</a></div><div id="IDAB_tab2" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','vb','2','4');return false;">VB</a></div><div id="IDAB_tab3" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','cpp','3','4');return false;">C++</a></div><div id="IDAB_tab4" class="codeSnippetContainerTab"><a href="#" onclick="ChangeTab('IDAB','fs','4','4');return false;">F#</a></div></div><div class="codeSnippetContainerCodeContainer"><div class="codeSnippetToolBar"><div class="codeSnippetToolBarText"><a id="IDAB_copyCode" href="#" class="copyCodeSnippet" onclick="CopyToClipboard('IDAB');return false;" title="Copy">Copy</a></div></div><div id="IDAB_code_Div1" class="codeSnippetContainerCode" style="display: block"><pre xml:space="preserve"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">readonly</span> <span class="identifier">Undefined</span> <span class="identifier">Value</span></pre></div><div id="IDAB_code_Div2" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">Public</span> <span class="keyword">Shared</span> <span class="keyword">ReadOnly</span> <span class="identifier">Value</span> <span class="keyword">As</span> <span class="identifier">Undefined</span></pre></div><div id="IDAB_code_Div3" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">public</span>:
<span class="keyword">static</span> <span class="keyword">initonly</span> <span class="identifier">Undefined</span>^ <span class="identifier">Value</span></pre></div><div id="IDAB_code_Div4" class="codeSnippetContainerCode" style="display: none"><pre xml:space="preserve"><span class="keyword">static</span> <span class="keyword">val</span> <span class="identifier">Value</span>: <span class="identifier">Undefined</span></pre></div></div></div><h4>Field Value</h4><a href="T_Microsoft_ClearScript_Undefined.htm">Undefined</a></div><div class="collapsibleAreaRegion"><span class="collapsibleRegionTitle" onclick="SectionExpandCollapse('seeAlso')" onkeypress="SectionExpandCollapse_CheckKey('seeAlso', event)" tabindex="0"><img id="seeAlsoToggle" class="collapseToggle" src="../icons/SectionExpanded.png" />See Also</span></div><div id="seeAlsoSection" class="collapsibleSection"><h4>Reference</h4><div><a href="T_Microsoft_ClearScript_Undefined.htm">Undefined Class</a></div><div><a href="N_Microsoft_ClearScript.htm">Microsoft.ClearScript Namespace</a></div></div></div></div><div id="PageFooter" class="pageFooter"><p>Copyright © Microsoft Corporation. All rights reserved.</p><div class="feedbackLink">Send comments on this topic to
<a id="HT_MailLink" href="mailto:ClearScript%40microsoft.com?Subject=ClearScript%20Library">Microsoft</a></div>
<script type="text/javascript">

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше