History

update code to support libnode24

RTUnreal committed 4 months ago

Commit f8fb2101 parent 26a7de46 files · +29 −22Browse files

Showing the changes to libraries/script-engine/src/v8/ScriptEngineV8.cpp (1 of 6 files). Show all

Unified · Split

libraries/script-engine/src/v8/ScriptEngineV8.cpp+2−2
@@ -769,7 +769,7 @@ ScriptValue ScriptEngineV8::evaluate(const QString& sourceCode, const QString& f · 768 unmodified lines
769 v8::HandleScope handleScope(_v8Isolate);769 v8::HandleScope handleScope(_v8Isolate);
770 auto context = getContext();770 auto context = getContext();
771 v8::Context::Scope contextScope(context);771 v8::Context::Scope contextScope(context);
772 v8::ScriptOrigin scriptOrigin(getIsolate(), v8::String::NewFromUtf8(getIsolate(), fileName.toStdString().c_str()).ToLocalChecked());772 v8::ScriptOrigin scriptOrigin(v8::String::NewFromUtf8(getIsolate(), fileName.toStdString().c_str()).ToLocalChecked());
773 v8::Local<v8::Script> script;773 v8::Local<v8::Script> script;
774 {774 {
775 v8::TryCatch tryCatch(getIsolate());775 v8::TryCatch tryCatch(getIsolate());
@@ -1421,7 +1421,7 @@ void ScriptEngineV8::compileTest() { · 645 unmodified lines
1421 auto context = getContext();1421 auto context = getContext();
1422 v8::Context::Scope contextScope(context);1422 v8::Context::Scope contextScope(context);
1423 v8::Local<v8::Script> script;1423 v8::Local<v8::Script> script;
1424 v8::ScriptOrigin scriptOrigin(getIsolate(), v8::String::NewFromUtf8(getIsolate(),"test").ToLocalChecked());1424 v8::ScriptOrigin scriptOrigin(v8::String::NewFromUtf8(getIsolate(),"test").ToLocalChecked());
1425 if (v8::Script::Compile(context, v8::String::NewFromUtf8(getIsolate(), "print(\"hello world\");").ToLocalChecked(), &scriptOrigin).ToLocal(&script)) {1425 if (v8::Script::Compile(context, v8::String::NewFromUtf8(getIsolate(), "print(\"hello world\");").ToLocalChecked(), &scriptOrigin).ToLocal(&script)) {
1426 qCDebug(scriptengine_v8) << "Compile test successful";1426 qCDebug(scriptengine_v8) << "Compile test successful";
1427 } else {1427 } else {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t