Skip to content

Commit

Permalink
updating standalone dependency resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Oct 14, 2024
1 parent d7047f1 commit 798410b
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 24 deletions.
Binary file modified lib/native/win32/ia32/16/edge_coreclr.node
Binary file not shown.
Binary file modified lib/native/win32/ia32/16/edge_nativeclr.node
Binary file not shown.
Binary file modified lib/native/win32/ia32/18/edge_coreclr.node
Binary file not shown.
Binary file modified lib/native/win32/ia32/18/edge_nativeclr.node
Binary file not shown.
Binary file modified lib/native/win32/x64/16/edge_coreclr.node
Binary file not shown.
Binary file modified lib/native/win32/x64/16/edge_nativeclr.node
Binary file not shown.
Binary file modified lib/native/win32/x64/18/edge_coreclr.node
Binary file not shown.
Binary file modified lib/native/win32/x64/18/edge_nativeclr.node
Binary file not shown.
15 changes: 8 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"license": "MIT",
"dependencies": {
"edge-cs": "npm:@agracio/edge-cs@^1.3.7",
"nan": "^2.20.0"
"nan": "^2.22.0"
},
"devDependencies": {
"follow-redirects": "^1.15.9",
Expand Down
25 changes: 9 additions & 16 deletions src/double/Edge.js/dotnetcore/coreclrembedding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using System.Threading.Tasks;
using System.IO;
using Microsoft.Extensions.DependencyModel;
// ReSharper disable InconsistentNaming

[StructLayout(LayoutKind.Sequential)]
// ReSharper disable once CheckNamespace
Expand Down Expand Up @@ -474,7 +475,7 @@ private void AddCompileDependencies(DependencyContext dependencyContext, bool st
{
assemblyPath = Path.Combine(RuntimeEnvironment.ApplicationDirectory, "refs", Path.GetFileName(compileLibrary.Assemblies[0].Replace('/', Path.DirectorySeparatorChar)));
}
else if(File.Exists(Path.Combine(runtimePath, Path.GetFileName(compileLibrary.Assemblies[0].Replace('/', Path.DirectorySeparatorChar)))))
else if(!string.IsNullOrEmpty(runtimePath) && File.Exists(Path.Combine(runtimePath, Path.GetFileName(compileLibrary.Assemblies[0].Replace('/', Path.DirectorySeparatorChar)))))
{
assemblyPath = Path.Combine(runtimePath, Path.GetFileName(compileLibrary.Assemblies[0].Replace('/', Path.DirectorySeparatorChar)));
}
Expand Down Expand Up @@ -636,8 +637,7 @@ public static void Initialize(IntPtr context, IntPtr exception)
{
DebugMessage("CoreCLREmbedding::Initialize (CLR) - Exception was thrown: {0}{1}{2}", e.Message, Environment.NewLine, e.StackTrace);

V8Type v8Type;
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out v8Type));
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out _));
}
}

Expand Down Expand Up @@ -704,8 +704,7 @@ public static IntPtr GetFunc(string assemblyFile, string typeName, string method
{
DebugMessage("CoreCLREmbedding::GetFunc (CLR) - Exception was thrown: {0}{1}{2}", e.Message, Environment.NewLine, e.StackTrace);

V8Type v8Type;
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out v8Type));
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out _));

return IntPtr.Zero;
}
Expand Down Expand Up @@ -815,8 +814,7 @@ public static IntPtr CompileFunc(IntPtr v8Options, int payloadType, IntPtr excep
{
DebugMessage("CoreCLREmbedding::CompileFunc (CLR) - Exception was thrown: {0}\n{1}", e.InnerException.Message, e.InnerException.StackTrace);

V8Type v8Type;
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out v8Type));
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out _));

return IntPtr.Zero;
}
Expand All @@ -825,8 +823,7 @@ public static IntPtr CompileFunc(IntPtr v8Options, int payloadType, IntPtr excep
{
DebugMessage("CoreCLREmbedding::CompileFunc (CLR) - Exception was thrown: {0}{1}{2}", e.Message, Environment.NewLine, e.StackTrace);

V8Type v8Type;
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out v8Type));
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out _));

return IntPtr.Zero;
}
Expand Down Expand Up @@ -863,9 +860,7 @@ public static void CallFunc(IntPtr function, IntPtr payload, int payloadType, In
{
DebugMessage("CoreCLREmbedding::CallFunc (CLR) - .NET method ran synchronously and faulted, marshalling exception data for V8");

V8Type taskExceptionType;

Marshal.WriteIntPtr(result, MarshalCLRToV8(functionTask.Exception, out taskExceptionType));
Marshal.WriteIntPtr(result, MarshalCLRToV8(functionTask.Exception, out _));
Marshal.WriteInt32(resultType, (int)V8Type.Exception);
break;
}
Expand Down Expand Up @@ -978,8 +973,7 @@ public static void ContinueTask(IntPtr task, IntPtr context, IntPtr callback, In
{
DebugMessage("CoreCLREmbedding::ContinueTask (CLR) - Exception was thrown: {0}{1}{2}", e.Message, Environment.NewLine, e.StackTrace);

V8Type v8Type;
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out v8Type));
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out _));
}
}

Expand All @@ -996,8 +990,7 @@ public static void SetCallV8FunctionDelegate(IntPtr callV8Function, IntPtr excep
{
DebugMessage("CoreCLREmbedding::SetCallV8FunctionDelegate (CLR) - Exception was thrown: {0}{1}{2}", e.Message, Environment.NewLine, e.StackTrace);

V8Type v8Type;
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out v8Type));
Marshal.WriteIntPtr(exception, MarshalCLRToV8(e, out _));
}
}

Expand Down

0 comments on commit 798410b

Please sign in to comment.