Add vector prototype to vector-like return values from C++ to JS. Fixes #2394.

This was SVN commit r14645.
This commit is contained in:
sanderd17
2014-01-23 11:32:08 +00:00
parent d677033c4c
commit fd187f466f
5 changed files with 246 additions and 145 deletions
+5 -2
View File
@@ -627,7 +627,11 @@ bool ScriptInterface::LoadGlobalScripts()
return false;
}
}
jsval proto;
if (JS_GetProperty(m->m_cx, JS_GetGlobalObject(m->m_cx), "Vector2Dprototype", &proto))
vector2Dprototype = CScriptValRooted(m->m_cx, proto);
if (JS_GetProperty(m->m_cx, JS_GetGlobalObject(m->m_cx), "Vector3Dprototype", &proto))
vector3Dprototype = CScriptValRooted(m->m_cx, proto);
return true;
}
@@ -1033,7 +1037,6 @@ bool ScriptInterface::LoadGlobalScriptFile(const VfsPath& path)
return ok ? true : false;
}
bool ScriptInterface::Eval(const char* code)
{
jsval rval;