I am trying to add some CFRunLoop logic in WinLauncher.cpp on Windows Webkit 
version 157099. There always are exceptions raised. My codes look like 
this: // callback functionvoid tick(CFRunLoopTimerRef timer, void *info) { 
    Logger::Instance()->WriteLog("I am going to dump DOM tree now. 
Tick...");}extern "C" __declspec(dllexport) int WINAPI 
dllLauncherEntryPoint(HINSTANCE, HINSTANCE, LPTSTR, int nCmdShow){// no change 
until around following line// Main message loop:    __try {#if 
USE(CF)                // my codes start               CFRunLoopTimerContext 
ctx;                                      CFRunLoopTimerRef timer =        
          CFRunLoopTimerCreate(NULL,                                       
   CFAbsoluteTimeGetCurrent() + 10.0,                                      
0,                                         0,                         
                0,                                         tick,           
                        &ctx);             
CFRunLoopAddTimer(CFRunLoopGetMain(), timer, kCFRunLoopCommonModes);            
// my codes end#endif        while (GetMessage(&msg, 0, 
0, 0)) {#if USE(CF)            
CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true);#endif      
      if (!TranslateAccelerator(msg.hwnd, hAccelTable, 
&msg)) {                
TranslateMessage(&msg);              
  DispatchMessage(&msg);            
}        }    } 
__except(createCrashReport(GetExceptionInformation()), 
EXCEPTION_EXECUTE_HANDLER) { }exit:    
gPrintDelegate->Release();    // other codes without 
change}Everytime, when 'tick' function is called, there is an exception raised. 
As no debug information is in WebKitSystemInterface.lib, I cannot trace 
the program line by line either. Can anybody let me know how shall I implement 
the logic? Thanks, Zhe
_______________________________________________
webkit-help mailing list
webkit-help@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-help

Reply via email to