mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-05 03:26:07 +00:00
Second (main) commit for the SpiderMonkey upgrade.
This commit contains all the required changes to our source files and build scripts (hopefully). A next commit will remove the old stuff of SpiderMonkey 1.8.5. Spcial thanks to: - H4writer who helped a lot mainly with the performance issues we had/have, but also with other problems or questions. - Leper for the review. - Historic_bruno for implementing the build scripts on Mac OS X and testing on the Mac. - The people from the #jsapi channel and from mozilla.dev.tech.js-engine who answered a lot of questions and helped solving problems. - All the other people who helped Refs #1886 Fixes #2442 Fixes #2416 This was SVN commit r14877.
This commit is contained in:
@@ -69,7 +69,6 @@
|
||||
#include "soundmanager/SoundManager.h"
|
||||
#include "soundmanager/scripting/JSInterface_Sound.h"
|
||||
|
||||
#include "js/jsapi.h"
|
||||
/*
|
||||
* This file defines a set of functions that are available to GUI scripts, to allow
|
||||
* interaction with the rest of the engine.
|
||||
@@ -88,10 +87,7 @@ namespace {
|
||||
// TODO: Use LOGERROR to print a friendly error message when the requirements aren't met instead of failing with debug_warn when cloning.
|
||||
void PushGuiPage(ScriptInterface::CxPrivate* pCxPrivate, std::wstring name, CScriptVal initData)
|
||||
{
|
||||
// TODO: Check the comment in CGUIManager::SwitchPage for a detailed explanation of this hack.
|
||||
CScriptVal cloneSaveInitData;
|
||||
cloneSaveInitData = g_GUI->GetScriptInterface()->CloneValueFromOtherContext(*(pCxPrivate->pScriptInterface), initData.get());
|
||||
g_GUI->PushPage(name, g_GUI->GetScriptInterface()->WriteStructuredClone(cloneSaveInitData.get()));
|
||||
g_GUI->PushPage(name, pCxPrivate->pScriptInterface->WriteStructuredClone(initData.get()));
|
||||
}
|
||||
|
||||
void SwitchGuiPage(ScriptInterface::CxPrivate* pCxPrivate, std::wstring name, CScriptVal initData)
|
||||
@@ -557,7 +553,7 @@ void DebugWarn(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
||||
void ForceGC(ScriptInterface::CxPrivate* pCxPrivate)
|
||||
{
|
||||
double time = timer_Time();
|
||||
JS_GC(pCxPrivate->pScriptInterface->GetContext());
|
||||
JS_GC(pCxPrivate->pScriptInterface->GetJSRuntime());
|
||||
time = timer_Time() - time;
|
||||
g_Console->InsertMessage(L"Garbage collection completed in: %f", time);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user