Beispiel #1
0
int CNetProcessThread::Run()
{
        while (m_nRunFlag)
        {
                //首先监听网络事件
                HandleProcess();
                int ii=0;
                while (ii < PROCESSMSGNUM) //每次最多拿出20条消息出来处理
                {
                    //处理消息
                    CMsg *pMsg =  m_inputList.get();
                    if (pMsg != NULL)
                    {
                            Process(pMsg);
                            delete pMsg;
                    }
                    else
                    {
                        break;
                    }
					ii++;
                }
                //检查超时的链接
                CheckTaskTimeOut();

                OtherProcess();
        }
        return 0;
}
void
CrashReporterParent::ActorDestroy(ActorDestroyReason why)
{
#if defined(__ANDROID__) && defined(MOZ_CRASHREPORTER)
  CrashReporter::RemoveLibraryMappingsForChild(ProcessId(OtherProcess()));
#endif
}
Beispiel #3
0
void
TestHangsParent::CleanUp()
{
    if (!KillProcess(OtherProcess(), 0, false))
        fail("terminating child process");
    Close();
}
bool
CrashReporterParent::RecvAddLibraryMappings(const InfallibleTArray<Mapping>& mappings)
{
#if defined(__ANDROID__) && defined(MOZ_CRASHREPORTER)
  for (PRUint32 i = 0; i < mappings.Length(); i++) {
    const Mapping& m = mappings[i];
    CrashReporter::AddLibraryMappingForChild(ProcessId(OtherProcess()),
                                             m.library_name().get(),
                                             m.file_id().get(),
                                             m.start_address(),
                                             m.mapping_length(),
                                             m.file_offset());
  }
#endif
  return true;
}
bool
TestDataStructuresChild::RecvStart()
{
    puts("[TestDataStructuresChild] starting");

    Test1();
    Test2();
    Test3();
    Test4();
    Test5();
    Test6();
    Test7_0();
    Test7();
    Test8();
    Test9();
    Test10();
    Test11();
    Test12();
    Test13();
    Test14();
    Test15();
    Test16();
    Test17();
    if (OtherProcess() != 0) {
        //FIXME/bug 703317 allocation of nsIntRegion uses a global
        //region pool which breaks threads
        Test18();
    }

    for (uint32_t i = 0; i < nactors; ++i)
        if (!PTestDataStructuresSubChild::Send__delete__(mKids[i]))
            fail("can't send dtor");

    Close();

    return true;
}
void
TestFailedCtorChild::ProcessingError(Result aCode, const char* aReason)
{
    if (OtherProcess() != 0) // thread-mode
        _exit(0);
}
bool LayerTransactionParent::IsSameProcess() const
{
  return OtherProcess() == ipc::kInvalidProcessHandle;
}
Beispiel #8
0
bool ImageBridgeParent::IsSameProcess() const
{
    return OtherProcess() == ipc::kInvalidProcessHandle;
}
Beispiel #9
0
void
TestFailedCtorChild::ProcessingError(Result what)
{
    if (OtherProcess() != 0) // thread-mode
        _exit(0);
}