mirror of
https://github.com/lubosz/overte.git
synced 2025-04-10 04:28:59 +02:00
Re-enabled script module cache creation
This commit is contained in:
parent
e72bf600ce
commit
076349a488
2 changed files with 3 additions and 4 deletions
|
@ -683,15 +683,14 @@ void ScriptManager::init() {
|
|||
|
||||
scriptEngine->registerGlobalObject("Script", this);
|
||||
|
||||
//V8TODO: V8 has no such global object?
|
||||
/*{
|
||||
{
|
||||
// set up Script.require.resolve and Script.require.cache
|
||||
auto Script = scriptEngine->globalObject().property("Script");
|
||||
auto require = Script.property("require");
|
||||
auto resolve = Script.property("_requireResolve");
|
||||
require.setProperty("resolve", resolve, READONLY_PROP_FLAGS);
|
||||
resetModuleCache();
|
||||
}*/
|
||||
}
|
||||
|
||||
scriptEngine->registerEnum("Script.ExternalPaths", QMetaEnum::fromType<ExternalResource::Bucket>());
|
||||
|
||||
|
|
|
@ -547,7 +547,7 @@ bool ScriptEngineV8::castValueToVariant(const V8ScriptValue& v8Val, QVariant& de
|
|||
bool ScriptEngineV8::convertJSObjectToVariant(v8::Local<v8::Object> object, QVariant &dest) {
|
||||
auto context = getContext();
|
||||
v8::Local<v8::Array> names;
|
||||
if(object->GetPropertyNames(context).ToLocal(&names)) {
|
||||
if(!object->GetPropertyNames(context).ToLocal(&names)) {
|
||||
qDebug() << "ScriptEngineV8::convertJSObjectToVariant could not get property names";
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue