mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-27 20:51:36 +00:00
# Various networking code cleanups.
Don't flush network queue after every message. Desingletonify CGameAttributes to allow testing. Make network server/client basically testable. Add very basic tests for network server/client. Fix FsmActionCtx memory leak. Split CNetHost into a separate file. Convert CNetHost, CNetSession to a more conventional coding style. Delete CNetLogger, since it's a lot of complexity and is barely used and is redundant with CLogger. Other minor simplifications. This was SVN commit r7623.
This commit is contained in:
@@ -334,6 +334,9 @@ void ScriptingHost::ErrorReporter(JSContext* UNUSED(cx), const char* pmessage, J
|
||||
void* ScriptingHost::jshook_script( JSContext* UNUSED(cx), JSStackFrame* UNUSED(fp),
|
||||
JSBool before, JSBool* UNUSED(ok), void* closure )
|
||||
{
|
||||
if (!CProfileManager::IsInitialised())
|
||||
return closure;
|
||||
|
||||
if( before )
|
||||
{
|
||||
g_Profiler.StartScript( "script invocation" );
|
||||
@@ -346,6 +349,9 @@ void* ScriptingHost::jshook_script( JSContext* UNUSED(cx), JSStackFrame* UNUSED(
|
||||
|
||||
void* ScriptingHost::jshook_function( JSContext* cx, JSStackFrame* fp, JSBool before, JSBool* UNUSED(ok), void* closure )
|
||||
{
|
||||
if (!CProfileManager::IsInitialised())
|
||||
return closure;
|
||||
|
||||
JSFunction* fn = JS_GetFrameFunction( cx, fp );
|
||||
if( before )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user