[webkit-help] Help: how to implement CFRunLoop logic on Windows Webkit version 157099
houzhe at sohu.com
houzhe at sohu.com
Wed Oct 9 05:28:25 PDT 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20131009/b5656a47/attachment.html>
More information about the webkit-help
mailing list