Quantcast
Channel: ClearScript
Viewing all 2297 articles
Browse latest View live

New Post: Performance Implications of Multiple V8ScriptEngines tied to single V8Runtime.

0
0
I am looking into V8 as a server side script engine and have some questions about the V8Runtime. Namely, what is the performance implications in having multiple script engines running concurrently from the same V8Runtime? Can two V8ScriptEngines execute compiled scripts on different threads concurrently (e.g. two ASP.NET web requests) without interfering with each other or blocking? Also what is the max number of engines that can be spawned from a single runtime? Is this simply limited by memory and cpu or is there some other internal limitations?

Any other insights you can provide on the the relationship between the runtime and the individual script engine is also much appreciated.

Thanks.

New Post: Performance Implications of Multiple V8ScriptEngines tied to single V8Runtime.

0
0
Greetings!

V8 runtimes do not support concurrent access; in fact, they block it. Multiple threads may access different runtimes concurrently.

Within a runtime, multiple engines support data separation, not concurrency. Creating a new engine within an existing runtime is a relatively cheap way to get a pristine script execution environment.

We're not aware of any limits on the number of engines within a runtime, but runtimes themselves are quite expensive, especially in 32-bit processes. For multithreaded applications we recommend that runtimes be managed similarly to worker threads (and in similar quantities).

When you use the V8ScriptEngine constructor, you get a new engine within a private runtime. Use the V8Runtime constructor and V8Runtime.CreateScriptEngine() to set up shared runtimes.

Good luck, and please feel free to send any additional questions our way!

Source code checked in, #ba8bf459e44aab693d58c6df4a80bb481319e04f

0
0
Version 5.4.3: Added support for Visual Studio 2015; changed V8Update to use installed Python 2.x; fixed hangs in V8 proxy finalizers during script execution (Issue #86); fixed V8 weak handle callback context leak (Issue #90); fixed dynamic method invocation with value-typed arguments (Issue #89); improved V8ScriptEngine::Interrupt() latency and reliability; added tests for bug fixes. Tested with V8 4.4.63.29.

New Post: Debug script

0
0
Hi,

I am using V8ScriptEngine java script engine for execution.
V8ScriptEngine scriptEngine = new V8ScriptEngine(V8ScriptEngineFlags.DisableGlobalMembers | V8ScriptEngineFlags.EnableDebugging, debuggingPort)
Debug point is set through V8 DebuggerProtocol(DebuggerProtocol ). I am not setting any break point to dynamically generated script. breakpoint is set to main script.

main script:-
var a=10;
var b=20
var c=a+b;
ScriptLib.LoadScript("sample.js");
var d=a+b+c;
dynamically loaded script("sample.js") :-
var d=25;
var e=35;
var f=d*e;
ScriptLib is a HostObject added to an engine, executes script on same engine.


Thank you.

New Post: Could not load file or assembly 'ClearScriptV8-32' or one of its dependencies. An attempt was made to load a program with an incorrect format.

0
0
If you application is 64-bit - remove 32-bit version!

New Post: Debug script

0
0
Hi again,

I am not setting any break point to dynamically generated script.

The script debugger cannot step into a .NET method. However, you can force it to stop within the "sample.js" code by adding a debugger statement:
debugger;
var d=25;
var e=35;
var f=d*e;
The debugger statement will cause the script debugger to break in at that location. It does nothing when no script debugger is attached. You can add it to the script file or insert it programmatically at runtime.

Good luck!

Released: ClearScript 5.4 (Oct 22, 2014)

0
0
5.4.3
  • Added support for Visual Studio 2015.
  • Changed V8Update to use installed Python 2.x.
  • Fixed hangs in V8 proxy finalizers during script execution (Issue #86).
  • Fixed V8 weak handle callback context leak (Issue #90).
  • Fixed dynamic method invocation with value-typed arguments (Issue #89).
  • Added tests for bug fixes.
  • Tested with V8 4.4.63.29.

5.4.2.1
  • Fixed unnecessary assembly table construction (Issue #84).

5.4.2
  • Updated ClearScriptBenchmarks to use SunSpider 1.0.2.
  • Host methods and delegates in V8ScriptEngine now supporttoFunction(), which creates a native JavaScript function wrapper.
  • Fixed syntax error reporting in nested WindowsScriptEngine invocations.
  • Added defensive code to tolerate IProcessDebugManager::AddApplication() failure (Issue #76).
  • Added ScriptEngine.AddHostType() overloads that derive the script item name from the type name.
  • Implemented host item data sharing and other optimizations, boosting memory efficiency in many scenarios.
  • Added default ScriptAccess settings at the type, assembly, and engine levels.
  • Enhanced support for default properties, fixing Issue #74.
  • Added IHostWindow and WindowsScriptEngine.HostWindow (Issue #73).
  • V8RuntimeConstraints limits are now specified inMiB. For compatibility with hosts that predate an inadvertent breaking change in Version 5.4.1, values greater than 1048576 (1TiB) are still interpreted as bytes.
  • Fixed V8 debug agent in ASP.NET and eliminated excessive thread usage (Issue #75).
  • Added ScriptMemberFlags.WrapNullResult, ScriptEngine.EnableNullResultWrapping, and HostFunctions.isNull() (Issue #72).
  • Added enforcement of restricted access to non-public accessors of public properties (Issue #71).
  • (Andrey Taritsyn) Switched assembly targets to .NET 4 Client Profile.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 4.2.77.18.

5.4.1
  • Fixed several issues affecting GlobalMembers on V8.
  • Implemented a V8 debug agent to compensate for removed V8 API.
  • V8Update now fetches V8 source and dependencies from Git repositories.
  • Fixed V8 assembly unloading and patched V8 to tolerate redundant initialization (Issue #60).
  • Added ScriptEngine.EnableAutoHostVariables.
  • Fixed by-reference arguments to VBScript functions (Issue #58).
  • Removed support for Visual Studio 2012 (V8 build now requires at least Visual Studio 2013).
  • Added explicit loading of primary interop assemblies to fix Issue #68.
  • Added host exception marshaling for V8.
  • Fixed V8ScriptEngine crash when script code calls theHostObject constructor.
  • Fixed host item caching for host variables.
  • Added non-generic overloads of newArr() andfunc() to HostFunctions.
  • Added ScriptEngine.Current.
  • HostFunctions instances can now be exposed in multiple script engines.
  • Added a GetDynamicMemberNames() override toMetaScriptItem (Issue #64).
  • Fixed indexed property binding ambiguity for inherited interfaces (Issue #69).
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.30.33.16.

5.4.0
  • Added COM object projection (Issue #38):
    • New ScriptEngine methods: AddCOMObject() and AddCOMType().
    • New ExtendedHostFunctions methods: newComObj() and comType().
  • Improved performance and memory usage:
    • Host methods, events, and const/readonly fields are now cached as direct V8 object properties.
    • Added shared bind cache for improved performance and enhanced binder leak mitigation.
    • Made V8ScriptEngine.CollectGarbage() much more aggressive.
    • Switched to weak context/isolate bindings for V8 script objects and compiled scripts, fixingIssue #44.
    • Bypassed reflection for Windows script item property and method access, fixingIssue #47.
    • Added explicit disposal of cached V8 objects to fix Issue #48.
  • Enhanced support for legacy scripts:
    • Added null, decimal, and array marshaling options to WindowsScriptEngine.
    • Added ScriptEngine.UseReflectionBindFallback.
    • VBScript's For Each ... Next and JScript's Enumerator now operate on IEnumerable instances.
  • Other enhancements:
    • Added optional heap size monitoring to V8ScriptEngine andV8Runtime (experimental).
    • Added HostFunctions.tryCatch().
    • Added ScriptEngine.Invoke() and V8ScriptEngine.Execute(V8Script).
    • Added ScriptEngine.DisableTypeRestriction.
    • Enhanced error reporting for V8 assembly load failures (Issue #39).
    • V8Update now supports branched V8 revisions.
  • Miscellaneous fixes:
    • Added a V8 array buffer allocator, fixing Issue #46.
    • Overhauled ClearScriptV8 string usage to fix Issue #42 and improve performance.
    • Hardened ClearScriptV8 smart pointers.
    • Changed ActiveScript sites to return the current thread culture.
    • Added defensive code to make V8-related API objects resurrection-safe, fixingIssue #51.
    • Fixed exception when using WindowsScriptEngineFlags.EnableDebugging with no suitable script debugger installed (Issue #36).
  • Updates for breaking V8 API changes.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.26.31.15.

Updated Release: ClearScript 5.4 (Oct 22, 2014)

0
0
5.4.3
  • Added support for Visual Studio 2015.
  • Changed V8Update to use installed Python 2.x.
  • Fixed hangs in V8 proxy finalizers during script execution (Issue #86).
  • Fixed V8 weak handle callback context leak (Issue #90).
  • Fixed dynamic method invocation with value-typed arguments (Issue #89).
  • Added tests for bug fixes.
  • Tested with V8 4.4.63.29.

5.4.2.1
  • Fixed unnecessary assembly table construction (Issue #84).

5.4.2
  • Updated ClearScriptBenchmarks to use SunSpider 1.0.2.
  • Host methods and delegates in V8ScriptEngine now support toFunction(), which creates a native JavaScript function wrapper.
  • Fixed syntax error reporting in nested WindowsScriptEngine invocations.
  • Added defensive code to tolerate IProcessDebugManager::AddApplication() failure (Issue #76).
  • Added ScriptEngine.AddHostType() overloads that derive the script item name from the type name.
  • Implemented host item data sharing and other optimizations, boosting memory efficiency in many scenarios.
  • Added default ScriptAccess settings at the type, assembly, and engine levels.
  • Enhanced support for default properties, fixing Issue #74.
  • Added IHostWindow and WindowsScriptEngine.HostWindow (Issue #73).
  • V8RuntimeConstraints limits are now specified in MiB. For compatibility with hosts that predate an inadvertent breaking change in Version 5.4.1, values greater than 1048576 (1 TiB) are still interpreted as bytes.
  • Fixed V8 debug agent in ASP.NET and eliminated excessive thread usage (Issue #75).
  • Added ScriptMemberFlags.WrapNullResult, ScriptEngine.EnableNullResultWrapping, and HostFunctions.isNull() (Issue #72).
  • Added enforcement of restricted access to non-public accessors of public properties (Issue #71).
  • (Andrey Taritsyn) Switched assembly targets to .NET 4 Client Profile.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 4.2.77.18.

5.4.1
  • Fixed several issues affecting GlobalMembers on V8.
  • Implemented a V8 debug agent to compensate for removed V8 API.
  • V8Update now fetches V8 source and dependencies from Git repositories.
  • Fixed V8 assembly unloading and patched V8 to tolerate redundant initialization (Issue #60).
  • Added ScriptEngine.EnableAutoHostVariables.
  • Fixed by-reference arguments to VBScript functions (Issue #58).
  • Removed support for Visual Studio 2012 (V8 build now requires at least Visual Studio 2013).
  • Added explicit loading of primary interop assemblies to fix Issue #68.
  • Added host exception marshaling for V8.
  • Fixed V8ScriptEngine crash when script code calls the HostObject constructor.
  • Fixed host item caching for host variables.
  • Added non-generic overloads of newArr() and func() to HostFunctions.
  • Added ScriptEngine.Current.
  • HostFunctions instances can now be exposed in multiple script engines.
  • Added a GetDynamicMemberNames() override to MetaScriptItem (Issue #64).
  • Fixed indexed property binding ambiguity for inherited interfaces (Issue #69).
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.30.33.16.

5.4.0
  • Added COM object projection (Issue #38):
    • New ScriptEngine methods: AddCOMObject() and AddCOMType().
    • New ExtendedHostFunctions methods: newComObj() and comType().
  • Improved performance and memory usage:
    • Host methods, events, and const/readonly fields are now cached as direct V8 object properties.
    • Added shared bind cache for improved performance and enhanced binder leak mitigation.
    • Made V8ScriptEngine.CollectGarbage() much more aggressive.
    • Switched to weak context/isolate bindings for V8 script objects and compiled scripts, fixing Issue #44.
    • Bypassed reflection for Windows script item property and method access, fixing Issue #47.
    • Added explicit disposal of cached V8 objects to fix Issue #48.
  • Enhanced support for legacy scripts:
    • Added null, decimal, and array marshaling options to WindowsScriptEngine.
    • Added ScriptEngine.UseReflectionBindFallback.
    • VBScript's For Each ... Next and JScript's Enumerator now operate on IEnumerable instances.
  • Other enhancements:
    • Added optional heap size monitoring to V8ScriptEngine and V8Runtime (experimental).
    • Added HostFunctions.tryCatch().
    • Added ScriptEngine.Invoke() and V8ScriptEngine.Execute(V8Script).
    • Added ScriptEngine.DisableTypeRestriction.
    • Enhanced error reporting for V8 assembly load failures (Issue #39).
    • V8Update now supports branched V8 revisions.
  • Miscellaneous fixes:
    • Added a V8 array buffer allocator, fixing Issue #46.
    • Overhauled ClearScriptV8 string usage to fix Issue #42 and improve performance.
    • Hardened ClearScriptV8 smart pointers.
    • Changed ActiveScript sites to return the current thread culture.
    • Added defensive code to make V8-related API objects resurrection-safe, fixing Issue #51.
    • Fixed exception when using WindowsScriptEngineFlags.EnableDebugging with no suitable script debugger installed (Issue #36).
  • Updates for breaking V8 API changes.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.26.31.15.

Updated Wiki: Announcements

0
0

8/17/2015: Version 5.4.3 released.

View the release notes and download the source code here. Note: This release adds support for Visual Studio 2015 and updates the procedure for downloading and building V8. See the ClearScript ReadMe for the latest information.

6/30/2015: Version 5.4.2.1 released.

View the release notes and download the source code here. This is a bug fix release only.

5/10/2015: Version 5.4.2 released.

View the release notes and download the source code here.

2/8/2015: Version 5.4.1 released.

View the release notes and download the source code here. Note: This release removes support for Visual Studio 2012 and updates the procedure for downloading and building V8. See the ClearScript ReadMe for the latest information.

10/22/2014: ClearScript 5.4 released.

View the release notes and download the source code here.

1/16/2014: Version 5.3.11 released.

View the release notes and download the source code here.

11/28/2013: Version 5.3.10 released.

View the release notes and download the source code here.

10/29/2013: Version 5.3.9 released.

View the release notes and download the source code here.

10/14/2013: Version 5.3.8 released.

View the release notes and download the source code here.

8/22/2013: Version 5.3.7 released.

View the release notes and download the source code here.

8/14/2013: Version 5.3.6 released.

View the release notes and download the source code here.

8/2/2013: Version 5.3.5 released.

View the release notes and download the source code here.

7/10/2013: Version 5.3.4 released.

View the release notes and download the source code here.

7/2/2013: Version 5.3.3 released.

View the release notes and download the source code here.

6/6/2013: Version 5.3.2 released.

View the release notes and download the source code here. Due to issues with several recent V8 trunk releases (build failures, breaking API changes, etc.), and because more breaking changes are coming soon, this release modifies V8Update so that it fetches a tested, known-good V8 revision by default. See the ClearScript ReadMe for more information.

5/31/2013: Version 5.3.1 released.

View the release notes and download the source code here.

5/21/2013: ClearScript 5.3 released.

View the release notes and download the source code here.

5/15/2013: Version 5.2.2 released.

View the release notes and download the source code here. This release addresses the build issue reported yesterday and can be used with the latest V8 version. Here's how to update your copy of V8:
C:\ClearScript> set V8REV=
C:\ClearScript> V8Update

5/14/2013: ClearScript build failure due to API deprecation in V8 3.19.1.

We are aware of a ClearScript build issue with the latest version of V8. Until this issue is resolved we recommend that you explicitly use V8 3.19.0:
C:\ClearScript> set V8REV=14604
C:\ClearScript> V8Update

5/2/2013: Version 5.2.1 released.

View the release notes and download the source code here.

4/18/2013: V8Update failure resolved by V8 3.18.1.

The V8Update issue reported yesterday has been fixed by a new version of V8 released today. Here's how to update to the latest V8 version:
C:\ClearScript> set V8REV=
C:\ClearScript> V8Update

4/17/2013: V8Update failure with V8 3.18.0.

We are aware of a V8Update issue with the latest version of V8. Until this issue is resolved we recommend that you explicitly use V8 3.17.16:
C:\ClearScript> set V8REV=14138
C:\ClearScript> V8Update

3/27/2013: ClearScript 5.2 released.

View the release notes and download the source code here.

3/8/2013: Version 5.1.3 released.

View the release notes and download the source code here.

3/4/2013: V8Update failure resolved by V8 3.17.7.

The V8Update issue reported earlier has been fixed by a new version of V8 released today. Here's how to update to the latest V8 version:
C:\ClearScript> set V8REV=
C:\ClearScript> V8Update

3/4/2013: V8Update failure with V8 3.17.6.

We are aware of a V8Update issue with the latest version of V8. The issue affects the "Building 64-bit V8" step. The V8 team appears to have already submitted a fix, but the fix has not yet been merged into the trunk. In the meantime, we recommend that you explicitly use V8 3.17.5:
C:\ClearScript> set V8REV=13745
C:\ClearScript> V8Update

Updated Wiki: Home

0
0
InfoIcon.jpg Version 5.4.3 released. More...

Description

ClearScript is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8 and JScript) and VBScript.

Features

  • Simple usage; create a script engine, add your objects and/or types, run scripts
  • Support for several script engines: Google's V8, Microsoft's JScript and VBScript
  • Exposed resources require no modification, decoration, or special coding of any kind
  • Scripts get simple access to most of the features of exposed objects and types:
    • Methods, properties, fields, events
    • (Objects) Indexers, extension methods, conversion operators, explicitly implemented interfaces
    • (Types) Constructors, nested types
  • Full support for generic types and methods, including C#-like type inference and explicit type arguments
  • Scripts can invoke methods with output parameters, optional parameters, and parameter arrays
  • Script delegates enable callbacks into script code
  • Support for exposing all the types defined in one or more assemblies in one step
  • Optional support for importing types and assemblies from script code
  • The host can invoke script functions and access script objects directly
  • Full support for script debugging

Examples

using System;
using Microsoft.ClearScript;
using Microsoft.ClearScript.V8;

// create a script engineusing (var engine = new V8ScriptEngine())
{
    // expose a host type
    engine.AddHostType("Console", typeof(Console));
    engine.Execute("Console.WriteLine('{0} is an interesting number.', Math.PI)");

    // expose a host object
    engine.AddHostObject("random", new Random());
    engine.Execute("Console.WriteLine(random.NextDouble())");

    // expose entire assemblies
    engine.AddHostObject("lib", new HostTypeCollection("mscorlib", "System.Core"));
    engine.Execute("Console.WriteLine(lib.System.DateTime.Now)");

    // create a host object from script
    engine.Execute(@"
        birthday = new lib.System.DateTime(2007, 5, 22);
        Console.WriteLine(birthday.ToLongDateString());
    ");

    // use a generic class from script
    engine.Execute(@"
        Dictionary = lib.System.Collections.Generic.Dictionary;
        dict = new Dictionary(lib.System.String, lib.System.Int32);
        dict.Add('foo', 123);
    ");

    // call a host method with an output parameter
    engine.AddHostObject("host", new HostFunctions());
    engine.Execute(@"
        intVar = host.newVar(lib.System.Int32);
        found = dict.TryGetValue('foo', intVar.out);
        Console.WriteLine('{0} {1}', found, intVar);
    ");

    // create and populate a host array
    engine.Execute(@"
        numbers = host.newArr(lib.System.Int32, 20);
        for (var i = 0; i < numbers.Length; i++) { numbers[i] = i; }
        Console.WriteLine(lib.System.String.Join(', ', numbers));
    ");

    // create a script delegate
    engine.Execute(@"
        Filter = lib.System.Func(lib.System.Int32, lib.System.Boolean);
        oddFilter = new Filter(function(value) {
            return (value & 1) ? true : false;
        });
    ");

    // use LINQ from script
    engine.Execute(@"
        oddNumbers = numbers.Where(oddFilter);
        Console.WriteLine(lib.System.String.Join(', ', oddNumbers));
    ");

    // use a dynamic host object
    engine.Execute(@"
        expando = new lib.System.Dynamic.ExpandoObject();
        expando.foo = 123;
        expando.bar = 'qux';
        delete expando.foo;
    ");

    // call a script function
    engine.Execute("function print(x) { Console.WriteLine(x); }");
    engine.Script.print(DateTime.Now.DayOfWeek);

    // examine a script object
    engine.Execute("person = { name: 'Fred', age: 5 }");
    Console.WriteLine(engine.Script.person.name);
}

New Post: US-CERT: Vulnerability in the V8 JavaScript engine...

New Post: Debug script

0
0
Hi,

Thank you its working.
 I am writing custom debugger using debugger protocol. How can I get values of variables, i am using lookup request[Look Up](https://code.google.com/p/v8-wiki/wiki/DebuggerProtocol#Request_lookup), but it does not return any values and complex objects are not serialized. Is there any alternative for debugging other than Debugger protocol?
Thank you.

New Post: Debug script

0
0
Hello,

How can I get values of variables

To retrieve the value of a variable, Eclipse seems to use the evaluate request. Here's a sample from Eclipse's debugger console:
> Sent to Chrome:
Content-Length:132

{"seq":25,"type":"request","command":"evaluate","arguments":{"disable_break":true,"expression":"value","inlineRefs":true,"frame":0}}
> end of message

> Received from Chrome:
Content-Length:789

{"seq":31,"request_seq":25,"type":"response","command":"evaluate","success":true,"body":{"handle":5,"type":"object","className":"Object","constructorFunction":{"ref":2,"type":"function","name":"Object","inferredName":"","scriptId":4},"protoObject":{"ref":4,"type":"object","className":"Object"},"prototypeObject":{"ref":3,"type":"undefined"},"properties":[{"name":"foo","value":{"ref":20,"type":"number","value":123}},{"name":"bar","value":{"ref":21,"type":"number","value":456.789}},{"name":"baz","value":{"ref":22,"type":"string","value":"foobar"}}],"text":"#<Object>"},"refs":[{"handle":20,"type":"number","value":123,"text":"123"},{"handle":21,"type":"number","value":456.789,"text":"456.789"},{"handle":22,"type":"string","value":"foobar","length":6,"text":"foobar"}],"running":false}
> end of message
Eclipse sent this request to retrieve a value for display in a tooltip. When the expression evaluates to an object, V8 appears to return information about immediate child properties only (as opposed to full serialization).

Is there any alternative for debugging other than Debugger protocol?

We're not aware of any other way to debug scripts running in V8.

Cheers!

Released: ClearScript 5.4 (Oct 22, 2014)

0
0
5.4.3
  • Added support for Visual Studio 2015.
  • Changed V8Update to use installed Python 2.x.
  • Fixed hangs in V8 proxy finalizers during script execution (Issue #86).
  • Fixed V8 weak handle callback context leak (Issue #90).
  • Fixed dynamic method invocation with value-typed arguments (Issue #89).
  • Improved V8ScriptEngine::Interrupt() latency and reliability.
  • Added tests for bug fixes.
  • Tested with V8 4.4.63.29.

5.4.2.1
  • Fixed unnecessary assembly table construction (Issue #84).

5.4.2
  • Updated ClearScriptBenchmarks to use SunSpider 1.0.2.
  • Host methods and delegates in V8ScriptEngine now supporttoFunction(), which creates a native JavaScript function wrapper.
  • Fixed syntax error reporting in nested WindowsScriptEngine invocations.
  • Added defensive code to tolerate IProcessDebugManager::AddApplication() failure (Issue #76).
  • Added ScriptEngine.AddHostType() overloads that derive the script item name from the type name.
  • Implemented host item data sharing and other optimizations, boosting memory efficiency in many scenarios.
  • Added default ScriptAccess settings at the type, assembly, and engine levels.
  • Enhanced support for default properties, fixing Issue #74.
  • Added IHostWindow and WindowsScriptEngine.HostWindow (Issue #73).
  • V8RuntimeConstraints limits are now specified inMiB. For compatibility with hosts that predate an inadvertent breaking change in Version 5.4.1, values greater than 1048576 (1TiB) are still interpreted as bytes.
  • Fixed V8 debug agent in ASP.NET and eliminated excessive thread usage (Issue #75).
  • Added ScriptMemberFlags.WrapNullResult, ScriptEngine.EnableNullResultWrapping, and HostFunctions.isNull() (Issue #72).
  • Added enforcement of restricted access to non-public accessors of public properties (Issue #71).
  • (Andrey Taritsyn) Switched assembly targets to .NET 4 Client Profile.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 4.2.77.18.

5.4.1
  • Fixed several issues affecting GlobalMembers on V8.
  • Implemented a V8 debug agent to compensate for removed V8 API.
  • V8Update now fetches V8 source and dependencies from Git repositories.
  • Fixed V8 assembly unloading and patched V8 to tolerate redundant initialization (Issue #60).
  • Added ScriptEngine.EnableAutoHostVariables.
  • Fixed by-reference arguments to VBScript functions (Issue #58).
  • Removed support for Visual Studio 2012 (V8 build now requires at least Visual Studio 2013).
  • Added explicit loading of primary interop assemblies to fix Issue #68.
  • Added host exception marshaling for V8.
  • Fixed V8ScriptEngine crash when script code calls theHostObject constructor.
  • Fixed host item caching for host variables.
  • Added non-generic overloads of newArr() andfunc() to HostFunctions.
  • Added ScriptEngine.Current.
  • HostFunctions instances can now be exposed in multiple script engines.
  • Added a GetDynamicMemberNames() override toMetaScriptItem (Issue #64).
  • Fixed indexed property binding ambiguity for inherited interfaces (Issue #69).
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.30.33.16.

5.4.0
  • Added COM object projection (Issue #38):
    • New ScriptEngine methods: AddCOMObject() and AddCOMType().
    • New ExtendedHostFunctions methods: newComObj() and comType().
  • Improved performance and memory usage:
    • Host methods, events, and const/readonly fields are now cached as direct V8 object properties.
    • Added shared bind cache for improved performance and enhanced binder leak mitigation.
    • Made V8ScriptEngine.CollectGarbage() much more aggressive.
    • Switched to weak context/isolate bindings for V8 script objects and compiled scripts, fixingIssue #44.
    • Bypassed reflection for Windows script item property and method access, fixingIssue #47.
    • Added explicit disposal of cached V8 objects to fix Issue #48.
  • Enhanced support for legacy scripts:
    • Added null, decimal, and array marshaling options to WindowsScriptEngine.
    • Added ScriptEngine.UseReflectionBindFallback.
    • VBScript's For Each ... Next and JScript's Enumerator now operate on IEnumerable instances.
  • Other enhancements:
    • Added optional heap size monitoring to V8ScriptEngine andV8Runtime (experimental).
    • Added HostFunctions.tryCatch().
    • Added ScriptEngine.Invoke() and V8ScriptEngine.Execute(V8Script).
    • Added ScriptEngine.DisableTypeRestriction.
    • Enhanced error reporting for V8 assembly load failures (Issue #39).
    • V8Update now supports branched V8 revisions.
  • Miscellaneous fixes:
    • Added a V8 array buffer allocator, fixing Issue #46.
    • Overhauled ClearScriptV8 string usage to fix Issue #42 and improve performance.
    • Hardened ClearScriptV8 smart pointers.
    • Changed ActiveScript sites to return the current thread culture.
    • Added defensive code to make V8-related API objects resurrection-safe, fixingIssue #51.
    • Fixed exception when using WindowsScriptEngineFlags.EnableDebugging with no suitable script debugger installed (Issue #36).
  • Updates for breaking V8 API changes.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.26.31.15.

Updated Release: ClearScript 5.4 (Oct 22, 2014)

0
0
5.4.3
  • Added support for Visual Studio 2015.
  • Changed V8Update to use installed Python 2.x.
  • Fixed hangs in V8 proxy finalizers during script execution (Issue #86).
  • Fixed V8 weak handle callback context leak (Issue #90).
  • Fixed dynamic method invocation with value-typed arguments (Issue #89).
  • Improved V8ScriptEngine::Interrupt() latency and reliability.
  • Added tests for bug fixes.
  • Tested with V8 4.4.63.29.

5.4.2.1
  • Fixed unnecessary assembly table construction (Issue #84).

5.4.2
  • Updated ClearScriptBenchmarks to use SunSpider 1.0.2.
  • Host methods and delegates in V8ScriptEngine now support toFunction(), which creates a native JavaScript function wrapper.
  • Fixed syntax error reporting in nested WindowsScriptEngine invocations.
  • Added defensive code to tolerate IProcessDebugManager::AddApplication() failure (Issue #76).
  • Added ScriptEngine.AddHostType() overloads that derive the script item name from the type name.
  • Implemented host item data sharing and other optimizations, boosting memory efficiency in many scenarios.
  • Added default ScriptAccess settings at the type, assembly, and engine levels.
  • Enhanced support for default properties, fixing Issue #74.
  • Added IHostWindow and WindowsScriptEngine.HostWindow (Issue #73).
  • V8RuntimeConstraints limits are now specified in MiB. For compatibility with hosts that predate an inadvertent breaking change in Version 5.4.1, values greater than 1048576 (1 TiB) are still interpreted as bytes.
  • Fixed V8 debug agent in ASP.NET and eliminated excessive thread usage (Issue #75).
  • Added ScriptMemberFlags.WrapNullResult, ScriptEngine.EnableNullResultWrapping, and HostFunctions.isNull() (Issue #72).
  • Added enforcement of restricted access to non-public accessors of public properties (Issue #71).
  • (Andrey Taritsyn) Switched assembly targets to .NET 4 Client Profile.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 4.2.77.18.

5.4.1
  • Fixed several issues affecting GlobalMembers on V8.
  • Implemented a V8 debug agent to compensate for removed V8 API.
  • V8Update now fetches V8 source and dependencies from Git repositories.
  • Fixed V8 assembly unloading and patched V8 to tolerate redundant initialization (Issue #60).
  • Added ScriptEngine.EnableAutoHostVariables.
  • Fixed by-reference arguments to VBScript functions (Issue #58).
  • Removed support for Visual Studio 2012 (V8 build now requires at least Visual Studio 2013).
  • Added explicit loading of primary interop assemblies to fix Issue #68.
  • Added host exception marshaling for V8.
  • Fixed V8ScriptEngine crash when script code calls the HostObject constructor.
  • Fixed host item caching for host variables.
  • Added non-generic overloads of newArr() and func() to HostFunctions.
  • Added ScriptEngine.Current.
  • HostFunctions instances can now be exposed in multiple script engines.
  • Added a GetDynamicMemberNames() override to MetaScriptItem (Issue #64).
  • Fixed indexed property binding ambiguity for inherited interfaces (Issue #69).
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.30.33.16.

5.4.0
  • Added COM object projection (Issue #38):
    • New ScriptEngine methods: AddCOMObject() and AddCOMType().
    • New ExtendedHostFunctions methods: newComObj() and comType().
  • Improved performance and memory usage:
    • Host methods, events, and const/readonly fields are now cached as direct V8 object properties.
    • Added shared bind cache for improved performance and enhanced binder leak mitigation.
    • Made V8ScriptEngine.CollectGarbage() much more aggressive.
    • Switched to weak context/isolate bindings for V8 script objects and compiled scripts, fixing Issue #44.
    • Bypassed reflection for Windows script item property and method access, fixing Issue #47.
    • Added explicit disposal of cached V8 objects to fix Issue #48.
  • Enhanced support for legacy scripts:
    • Added null, decimal, and array marshaling options to WindowsScriptEngine.
    • Added ScriptEngine.UseReflectionBindFallback.
    • VBScript's For Each ... Next and JScript's Enumerator now operate on IEnumerable instances.
  • Other enhancements:
    • Added optional heap size monitoring to V8ScriptEngine and V8Runtime (experimental).
    • Added HostFunctions.tryCatch().
    • Added ScriptEngine.Invoke() and V8ScriptEngine.Execute(V8Script).
    • Added ScriptEngine.DisableTypeRestriction.
    • Enhanced error reporting for V8 assembly load failures (Issue #39).
    • V8Update now supports branched V8 revisions.
  • Miscellaneous fixes:
    • Added a V8 array buffer allocator, fixing Issue #46.
    • Overhauled ClearScriptV8 string usage to fix Issue #42 and improve performance.
    • Hardened ClearScriptV8 smart pointers.
    • Changed ActiveScript sites to return the current thread culture.
    • Added defensive code to make V8-related API objects resurrection-safe, fixing Issue #51.
    • Fixed exception when using WindowsScriptEngineFlags.EnableDebugging with no suitable script debugger installed (Issue #36).
  • Updates for breaking V8 API changes.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.26.31.15.

Released: ClearScript 5.4 (Oct 22, 2014)

0
0
5.4.3
  • Added support for Visual Studio 2015.
  • Changed V8Update to use installed Python 2.x.
  • Fixed hangs in V8 proxy finalizers during script execution (Issue #86).
  • Fixed V8 weak handle callback context leak (Issue #90).
  • Fixed dynamic method invocation with value-typed arguments (Issue #89).
  • Improved V8ScriptEngine::Interrupt() latency and reliability.
  • Added tests for bug fixes.
  • Tested with V8 4.4.63.29.

5.4.2.1
  • Fixed unnecessary assembly table construction (Issue #84).

5.4.2
  • Updated ClearScriptBenchmarks to use SunSpider 1.0.2.
  • Host methods and delegates in V8ScriptEngine now supporttoFunction(), which creates a native JavaScript function wrapper.
  • Fixed syntax error reporting in nested WindowsScriptEngine invocations.
  • Added defensive code to tolerate IProcessDebugManager::AddApplication() failure (Issue #76).
  • Added ScriptEngine.AddHostType() overloads that derive the script item name from the type name.
  • Implemented host item data sharing and other optimizations, boosting memory efficiency in many scenarios.
  • Added default ScriptAccess settings at the type, assembly, and engine levels.
  • Enhanced support for default properties, fixing Issue #74.
  • Added IHostWindow and WindowsScriptEngine.HostWindow (Issue #73).
  • V8RuntimeConstraints limits are now specified inMiB. For compatibility with hosts that predate an inadvertent breaking change in Version 5.4.1, values greater than 1048576 (1TiB) are still interpreted as bytes.
  • Fixed V8 debug agent in ASP.NET and eliminated excessive thread usage (Issue #75).
  • Added ScriptMemberFlags.WrapNullResult, ScriptEngine.EnableNullResultWrapping, and HostFunctions.isNull() (Issue #72).
  • Added enforcement of restricted access to non-public accessors of public properties (Issue #71).
  • (Andrey Taritsyn) Switched assembly targets to .NET 4 Client Profile.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 4.2.77.18.

5.4.1
  • Fixed several issues affecting GlobalMembers on V8.
  • Implemented a V8 debug agent to compensate for removed V8 API.
  • V8Update now fetches V8 source and dependencies from Git repositories.
  • Fixed V8 assembly unloading and patched V8 to tolerate redundant initialization (Issue #60).
  • Added ScriptEngine.EnableAutoHostVariables.
  • Fixed by-reference arguments to VBScript functions (Issue #58).
  • Removed support for Visual Studio 2012 (V8 build now requires at least Visual Studio 2013).
  • Added explicit loading of primary interop assemblies to fix Issue #68.
  • Added host exception marshaling for V8.
  • Fixed V8ScriptEngine crash when script code calls theHostObject constructor.
  • Fixed host item caching for host variables.
  • Added non-generic overloads of newArr() andfunc() to HostFunctions.
  • Added ScriptEngine.Current.
  • HostFunctions instances can now be exposed in multiple script engines.
  • Added a GetDynamicMemberNames() override toMetaScriptItem (Issue #64).
  • Fixed indexed property binding ambiguity for inherited interfaces (Issue #69).
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.30.33.16.

5.4.0
  • Added COM object projection (Issue #38):
    • New ScriptEngine methods: AddCOMObject() and AddCOMType().
    • New ExtendedHostFunctions methods: newComObj() and comType().
  • Improved performance and memory usage:
    • Host methods, events, and const/readonly fields are now cached as direct V8 object properties.
    • Added shared bind cache for improved performance and enhanced binder leak mitigation.
    • Made V8ScriptEngine.CollectGarbage() much more aggressive.
    • Switched to weak context/isolate bindings for V8 script objects and compiled scripts, fixingIssue #44.
    • Bypassed reflection for Windows script item property and method access, fixingIssue #47.
    • Added explicit disposal of cached V8 objects to fix Issue #48.
  • Enhanced support for legacy scripts:
    • Added null, decimal, and array marshaling options to WindowsScriptEngine.
    • Added ScriptEngine.UseReflectionBindFallback.
    • VBScript's For Each ... Next and JScript's Enumerator now operate on IEnumerable instances.
  • Other enhancements:
    • Added optional heap size monitoring to V8ScriptEngine andV8Runtime (experimental).
    • Added HostFunctions.tryCatch().
    • Added ScriptEngine.Invoke() and V8ScriptEngine.Execute(V8Script).
    • Added ScriptEngine.DisableTypeRestriction.
    • Enhanced error reporting for V8 assembly load failures (Issue #39).
    • V8Update now supports branched V8 revisions.
  • Miscellaneous fixes:
    • Added a V8 array buffer allocator, fixing Issue #46.
    • Overhauled ClearScriptV8 string usage to fix Issue #42 and improve performance.
    • Hardened ClearScriptV8 smart pointers.
    • Changed ActiveScript sites to return the current thread culture.
    • Added defensive code to make V8-related API objects resurrection-safe, fixingIssue #51.
    • Fixed exception when using WindowsScriptEngineFlags.EnableDebugging with no suitable script debugger installed (Issue #36).
  • Updates for breaking V8 API changes.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.26.31.15.

Updated Release: ClearScript 5.4 (Oct 22, 2014)

0
0
5.4.3
  • Added support for Visual Studio 2015.
  • Changed V8Update to use installed Python 2.x.
  • Fixed hangs in V8 proxy finalizers during script execution (Issue #86).
  • Fixed V8 weak handle callback context leak (Issue #90).
  • Fixed dynamic method invocation with value-typed arguments (Issue #89).
  • Improved V8ScriptEngine::Interrupt() latency and reliability.
  • Added tests for bug fixes.
  • Tested with V8 4.4.63.29.

5.4.2.1
  • Fixed unnecessary assembly table construction (Issue #84).

5.4.2
  • Updated ClearScriptBenchmarks to use SunSpider 1.0.2.
  • Host methods and delegates in V8ScriptEngine now support toFunction(), which creates a native JavaScript function wrapper.
  • Fixed syntax error reporting in nested WindowsScriptEngine invocations.
  • Added defensive code to tolerate IProcessDebugManager::AddApplication() failure (Issue #76).
  • Added ScriptEngine.AddHostType() overloads that derive the script item name from the type name.
  • Implemented host item data sharing and other optimizations, boosting memory efficiency in many scenarios.
  • Added default ScriptAccess settings at the type, assembly, and engine levels.
  • Enhanced support for default properties, fixing Issue #74.
  • Added IHostWindow and WindowsScriptEngine.HostWindow (Issue #73).
  • V8RuntimeConstraints limits are now specified in MiB. For compatibility with hosts that predate an inadvertent breaking change in Version 5.4.1, values greater than 1048576 (1 TiB) are still interpreted as bytes.
  • Fixed V8 debug agent in ASP.NET and eliminated excessive thread usage (Issue #75).
  • Added ScriptMemberFlags.WrapNullResult, ScriptEngine.EnableNullResultWrapping, and HostFunctions.isNull() (Issue #72).
  • Added enforcement of restricted access to non-public accessors of public properties (Issue #71).
  • (Andrey Taritsyn) Switched assembly targets to .NET 4 Client Profile.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 4.2.77.18.

5.4.1
  • Fixed several issues affecting GlobalMembers on V8.
  • Implemented a V8 debug agent to compensate for removed V8 API.
  • V8Update now fetches V8 source and dependencies from Git repositories.
  • Fixed V8 assembly unloading and patched V8 to tolerate redundant initialization (Issue #60).
  • Added ScriptEngine.EnableAutoHostVariables.
  • Fixed by-reference arguments to VBScript functions (Issue #58).
  • Removed support for Visual Studio 2012 (V8 build now requires at least Visual Studio 2013).
  • Added explicit loading of primary interop assemblies to fix Issue #68.
  • Added host exception marshaling for V8.
  • Fixed V8ScriptEngine crash when script code calls the HostObject constructor.
  • Fixed host item caching for host variables.
  • Added non-generic overloads of newArr() and func() to HostFunctions.
  • Added ScriptEngine.Current.
  • HostFunctions instances can now be exposed in multiple script engines.
  • Added a GetDynamicMemberNames() override to MetaScriptItem (Issue #64).
  • Fixed indexed property binding ambiguity for inherited interfaces (Issue #69).
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.30.33.16.

5.4.0
  • Added COM object projection (Issue #38):
    • New ScriptEngine methods: AddCOMObject() and AddCOMType().
    • New ExtendedHostFunctions methods: newComObj() and comType().
  • Improved performance and memory usage:
    • Host methods, events, and const/readonly fields are now cached as direct V8 object properties.
    • Added shared bind cache for improved performance and enhanced binder leak mitigation.
    • Made V8ScriptEngine.CollectGarbage() much more aggressive.
    • Switched to weak context/isolate bindings for V8 script objects and compiled scripts, fixing Issue #44.
    • Bypassed reflection for Windows script item property and method access, fixing Issue #47.
    • Added explicit disposal of cached V8 objects to fix Issue #48.
  • Enhanced support for legacy scripts:
    • Added null, decimal, and array marshaling options to WindowsScriptEngine.
    • Added ScriptEngine.UseReflectionBindFallback.
    • VBScript's For Each ... Next and JScript's Enumerator now operate on IEnumerable instances.
  • Other enhancements:
    • Added optional heap size monitoring to V8ScriptEngine and V8Runtime (experimental).
    • Added HostFunctions.tryCatch().
    • Added ScriptEngine.Invoke() and V8ScriptEngine.Execute(V8Script).
    • Added ScriptEngine.DisableTypeRestriction.
    • Enhanced error reporting for V8 assembly load failures (Issue #39).
    • V8Update now supports branched V8 revisions.
  • Miscellaneous fixes:
    • Added a V8 array buffer allocator, fixing Issue #46.
    • Overhauled ClearScriptV8 string usage to fix Issue #42 and improve performance.
    • Hardened ClearScriptV8 smart pointers.
    • Changed ActiveScript sites to return the current thread culture.
    • Added defensive code to make V8-related API objects resurrection-safe, fixing Issue #51.
    • Fixed exception when using WindowsScriptEngineFlags.EnableDebugging with no suitable script debugger installed (Issue #36).
  • Updates for breaking V8 API changes.
  • Added tests for bug fixes and new APIs.
  • Tested with V8 3.26.31.15.

Edited Issue: [BUG] Script execution blocks V8 script item finalization [86]

0
0
The V8 script item finalizer currently requires a V8 runtime lock. If the runtime is executing a long-running script, it can block the finalization thread and cause out-of-control memory consumption and frequent garbage collection.

Commented Issue: [BUG] Script execution blocks V8 script item finalization [86]

0
0
The V8 script item finalizer currently requires a V8 runtime lock. If the runtime is executing a long-running script, it can block the finalization thread and cause out-of-control memory consumption and frequent garbage collection.
Comments: Fixed in [Version 5.4.3](https://clearscript.codeplex.com/SourceControl/changeset/ba8bf459e44aab693d58c6df4a80bb481319e04f).

Edited Issue: [BUG] Weak handle contexts are leaked during explicit disposal of cached V8 objects [90]

0
0
When cached V8 objects are explicitly disposed during V8 context destruction, the weak states of their handles must be cleared and the associated weak callback contexts deleted.
Viewing all 2297 articles
Browse latest View live




Latest Images