Skip to content

Commit 11e134b

Browse files
committed
Merge branch 'master' of https://github.com/ncsoft/Unreal.js
2 parents 5e6cbf8 + 87838e7 commit 11e134b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Plugins/UnrealJS/Source/V8/Private/JavascriptContext_Private.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,9 @@ class FJavascriptContextImplementation : public FJavascriptContext
11901190
auto inner = [&](const FString& script_path)
11911191
{
11921192
auto full_path = IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead(*script_path);
1193+
#if PLATFORM_WINDOWS
1194+
full_path = full_path.Replace(TEXT("/"), TEXT("\\"));
1195+
#endif
11931196
auto it = Self->Modules.Find(full_path);
11941197
if (it)
11951198
{
@@ -1202,9 +1205,6 @@ class FJavascriptContextImplementation : public FJavascriptContext
12021205
if (FFileHelper::LoadFileToString(Text, *script_path))
12031206
{
12041207
Text = FString::Printf(TEXT("(function (global,__dirname) {\nvar module = { exports : {}, filename : __dirname }, exports = module.exports;\n(function () { \n%s\n })()\n;return module.exports;}(this,'%s'));"), *Text, *script_path);
1205-
#if PLATFORM_WINDOWS
1206-
full_path = full_path.Replace(TEXT("/"), TEXT("\\"));
1207-
#endif
12081208
auto exports = Self->RunScript(full_path, Text, 3);
12091209
if (exports.IsEmpty())
12101210
{

Plugins/UnrealJS/Source/V8/Private/JavascriptIsolate_Private.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,6 +1684,10 @@ class FJavascriptIsolateImplementation : public FJavascriptIsolate
16841684
{
16851685
Outer = value;
16861686
}
1687+
if (info.Length() > 1)
1688+
{
1689+
Name = FName(*StringFromV8(info[1]));
1690+
}
16871691
}
16881692

16891693
PreCreate();

0 commit comments

Comments
 (0)