Skip to content

Commit 589e2fb

Browse files
Version 5.2.1: Restored .NET 4.0 source compatibility, updated build and
deployment info in Readme.txt.
1 parent e12345e commit 589e2fb

13 files changed

Lines changed: 69 additions & 36 deletions

File tree

ClearScript/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@
7373
[assembly: InternalsVisibleTo("ClearScriptTest")]
7474

7575
[assembly: ComVisible(false)]
76-
[assembly: AssemblyVersion("5.2.0.0")]
77-
[assembly: AssemblyFileVersion("5.2.0.0")]
76+
[assembly: AssemblyVersion("5.2.1.0")]
77+
[assembly: AssemblyFileVersion("5.2.1.0")]

ClearScript/ScriptEngineException.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ internal ScriptEngineException(string engineName, string message, string errorDe
132132

133133
#region IScriptEngineException implementation
134134

135+
/// <summary>
136+
/// Gets an <see href="http://en.wikipedia.org/wiki/HRESULT">HRESULT</see> error code if one is available, zero otherwise.
137+
/// </summary>
138+
int IScriptEngineException.HResult
139+
{
140+
get { return HResult; }
141+
}
142+
135143
/// <summary>
136144
/// Gets the name associated with the script engine instance.
137145
/// </summary>

ClearScript/ScriptInterruptedException.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,14 @@ internal ScriptInterruptedException(string engineName, string message, string er
132132

133133
#region IScriptEngineException implementation
134134

135+
/// <summary>
136+
/// Gets an <see href="http://en.wikipedia.org/wiki/HRESULT">HRESULT</see> error code if one is available, zero otherwise.
137+
/// </summary>
138+
int IScriptEngineException.HResult
139+
{
140+
get { return HResult; }
141+
}
142+
135143
/// <summary>
136144
/// Gets the name associated with the script engine instance.
137145
/// </summary>

ClearScript/V8/V8/V8Patch.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Index: tools/gyp/v8.gyp
22
===================================================================
3-
--- tools/gyp/v8.gyp (revision 14077)
3+
--- tools/gyp/v8.gyp (revision 14518)
44
+++ tools/gyp/v8.gyp (working copy)
55
@@ -32,6 +32,7 @@
66
'targets': [

ClearScript/VersionSymbols.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@
6161

6262

6363

64-
#define CLEARSCRIPT_VERSION_STRING "5.2.0.0"
65-
#define CLEARSCRIPT_VERSION_COMMA_SEPARATED 5,2,0,0
64+
#define CLEARSCRIPT_VERSION_STRING "5.2.1.0"
65+
#define CLEARSCRIPT_VERSION_COMMA_SEPARATED 5,2,1,0

ClearScript/Windows/WindowsScriptEngine.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,14 +511,15 @@ internal override T ScriptInvoke<T>(Func<T> func)
511511

512512
private void ThrowScriptError(Exception exception)
513513
{
514-
if (exception is COMException)
514+
var comException = exception as COMException;
515+
if (comException != null)
515516
{
516-
if (exception.HResult == RawCOMHelpers.HResult.SCRIPT_E_REPORTED)
517+
if (comException.ErrorCode == RawCOMHelpers.HResult.SCRIPT_E_REPORTED)
517518
{
518519
// a script error was reported; the corresponding exception should be in the script frame
519520
ThrowScriptError(CurrentScriptFrame.ScriptError ?? CurrentScriptFrame.PendingScriptError);
520521
}
521-
else if (exception.HResult == RawCOMHelpers.HResult.CLEARSCRIPT_E_HOSTEXCEPTION)
522+
else if (comException.ErrorCode == RawCOMHelpers.HResult.CLEARSCRIPT_E_HOSTEXCEPTION)
522523
{
523524
// A host exception surrogate passed through the COM boundary; this happens
524525
// when some script engines are invoked via script item access rather than

ClearScript/Windows/WindowsScriptItem.cs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
using System.Globalization;
6666
using System.Linq;
6767
using System.Reflection;
68+
using System.Runtime.InteropServices;
6869
using System.Runtime.InteropServices.Expando;
6970
using Microsoft.ClearScript.Util;
7071

@@ -127,9 +128,10 @@ private bool TryGetScriptError(Exception exception, out IScriptEngineException s
127128
return true;
128129
}
129130

130-
if (exception != null)
131+
var comException = exception as COMException;
132+
if (comException != null)
131133
{
132-
var hr = exception.HResult;
134+
var hr = comException.ErrorCode;
133135
if ((hr == RawCOMHelpers.HResult.SCRIPT_E_REPORTED) && (engine.CurrentScriptFrame != null))
134136
{
135137
scriptError = engine.CurrentScriptFrame.ScriptError ?? engine.CurrentScriptFrame.PendingScriptError;
@@ -156,15 +158,15 @@ private bool TryGetScriptError(Exception exception, out IScriptEngineException s
156158
scriptError = new ScriptEngineException(engine.Name, "Invalid object or property access", null, RawCOMHelpers.HResult.CLEARSCRIPT_E_SCRIPTITEMEXCEPTION, exception.InnerException);
157159
return true;
158160
}
159-
else if (hr == RawCOMHelpers.HResult.E_INVALIDARG)
161+
}
162+
else
163+
{
164+
var argumentException = exception as ArgumentException;
165+
if ((argumentException != null) && (argumentException.ParamName == null))
160166
{
161-
var argumentException = exception as ArgumentException;
162-
if ((argumentException != null) && (argumentException.ParamName == null))
163-
{
164-
// this usually indicates invalid object or property access in VBScript
165-
scriptError = new ScriptEngineException(engine.Name, "Invalid object or property access", null, RawCOMHelpers.HResult.CLEARSCRIPT_E_SCRIPTITEMEXCEPTION, exception.InnerException);
166-
return true;
167-
}
167+
// this usually indicates invalid object or property access in VBScript
168+
scriptError = new ScriptEngineException(engine.Name, "Invalid object or property access", null, RawCOMHelpers.HResult.CLEARSCRIPT_E_SCRIPTITEMEXCEPTION, exception.InnerException);
169+
return true;
168170
}
169171
}
170172

ClearScriptBenchmarks/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@
6969
[assembly: AssemblyCopyright("© Microsoft Corporation")]
7070

7171
[assembly: ComVisible(false)]
72-
[assembly: AssemblyVersion("5.2.0.0")]
73-
[assembly: AssemblyFileVersion("5.2.0.0")]
72+
[assembly: AssemblyVersion("5.2.1.0")]
73+
[assembly: AssemblyFileVersion("5.2.1.0")]

ClearScriptConsole/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@
6969
[assembly: AssemblyCopyright("© Microsoft Corporation")]
7070

7171
[assembly: ComVisible(false)]
72-
[assembly: AssemblyVersion("5.2.0.0")]
73-
[assembly: AssemblyFileVersion("5.2.0.0")]
72+
[assembly: AssemblyVersion("5.2.1.0")]
73+
[assembly: AssemblyFileVersion("5.2.1.0")]

ClearScriptTest/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@
6969
[assembly: AssemblyCopyright("© Microsoft Corporation")]
7070

7171
[assembly: ComVisible(false)]
72-
[assembly: AssemblyVersion("5.2.0.0")]
73-
[assembly: AssemblyFileVersion("5.2.0.0")]
72+
[assembly: AssemblyVersion("5.2.1.0")]
73+
[assembly: AssemblyFileVersion("5.2.1.0")]

0 commit comments

Comments
 (0)