/** * B2G Loader is responsible for loading the b2g process and the * Nuwa process. It forks into the parent process, for the b2g * process, and the child process, for the Nuwa process. * * The loader loads libxul and performs initialization of static data * before forking, so relocation of libxul and static data can be * shared between the b2g process, the Nuwa process, and the content * processes. */ int main(int argc, const char* argv[]) { const char *program = argv[0]; /* * Before fork(), libxul and static data of Gecko are loaded for * sharing. */ bool ok = LoadStaticData(argc, argv); if (!ok) { return 255; } return RunProcesses(argc, argv); }
//-------------------------------------------------------------------------------------------------- // Name: ReloadStaticData // Desc: Reloads static data //-------------------------------------------------------------------------------------------------- void CExplosionGameEffect::ReloadStaticData(IItemParamsNode* pRootNode) { ReleaseStaticData(); LoadStaticData(pRootNode); #if DEBUG_GAME_FX_SYSTEM // Data has been reloaded, so re-initialse debug effect with new data CExplosionGameEffect* pDebugEffect = (CExplosionGameEffect*)GAME_FX_SYSTEM.GetDebugEffect("Explosion"); if(pDebugEffect && pDebugEffect->IsFlagSet(GAME_EFFECT_REGISTERED)) { pDebugEffect->Initialise(); // Re-activate effect if currently active, so it will register correctly if(pDebugEffect->IsFlagSet(GAME_EFFECT_ACTIVE)) { pDebugEffect->SetActive(false); pDebugEffect->SetActive(true); } } #endif }
/** * B2G Loader is responsible for loading the b2g process and the * Nuwa process. It forks into the parent process, for the b2g * process, and the child process, for the Nuwa process. * * The loader loads libxul and performs initialization of static data * before forking, so relocation of libxul and static data can be * shared between the b2g process, the Nuwa process, and the content * processes. */ int main(int argc, const char* argv[]) { /** * Reserve file descriptors before loading static data. */ FdArray reservedFds; ReserveFileDescriptors(reservedFds); /* * Before fork(), libxul and static data of Gecko are loaded for * sharing. */ bool ok = LoadStaticData(argc, argv); if (!ok) { return 255; } return RunProcesses(argc, argv, reservedFds); }