Skip to content

Commit a1be190

Browse files
Taritsyndustinsoftware
authored andcommitted
Remove remaining engine-specific code (#647)
1 parent bd8f5cf commit a1be190

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

src/React.Core/JavaScriptEngineUtils.cs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -18,47 +18,6 @@ namespace React
1818
/// </summary>
1919
public static class JavaScriptEngineUtils
2020
{
21-
/// <summary>
22-
/// Determines if the current environment supports the ClearScript V8 engine
23-
/// </summary>
24-
/// <returns><c>true</c> if ClearScript is supported</returns>
25-
public static bool EnvironmentSupportsClearScript()
26-
{
27-
#if NET40
28-
return Environment.OSVersion.Platform == PlatformID.Win32NT;
29-
#else
30-
return false;
31-
#endif
32-
}
33-
34-
/// <summary>
35-
/// Attempts to use the specified engine and throws an exception if it doesn't work.
36-
/// </summary>
37-
public static void EnsureEngineFunctional<TEngine, TException>(
38-
Func<Exception, TException> exceptionFactory
39-
)
40-
where TEngine : IJsEngine, new()
41-
where TException : Exception
42-
{
43-
int result;
44-
try
45-
{
46-
using (var engine = new TEngine())
47-
{
48-
result = engine.Evaluate<int>("1 + 1");
49-
}
50-
}
51-
catch (Exception ex)
52-
{
53-
throw exceptionFactory(ex);
54-
}
55-
56-
if (result != 2)
57-
{
58-
throw new ReactException("Mathematics is broken. 1 + 1 = " + result);
59-
}
60-
}
61-
6221
/// <summary>
6322
/// Executes a code from JavaScript file.
6423
/// </summary>

0 commit comments

Comments
 (0)