Skip to end of metadata
Go to start of metadata

static void FB::BrowserHost::AsyncHtmlLog ( void *  data  )  [static]

Don't call this; it is a helper function used by htmlLog.

This method is as the callback on a call to SchedulAsyncCall by htmlLog.

Parameters:
data an AsyncLogRequest object in a void*

Definition at line 113 of file BrowserHost.cpp.

References FB::variant_list_of().

Referenced by htmlLog().

00114 {
00115     FB::AsyncLogRequest *req = (FB::AsyncLogRequest*)logReq;
00116     try {
00117         FB::DOM::WindowPtr window = req->m_host->getDOMWindow();
00118 
00119         if (window && window->getJSObject()->HasProperty("console")) {
00120             FB::JSObjectPtr obj = window->getProperty<FB::JSObjectPtr>("console");
00121             printf("Logging: %s\n", req->m_msg.c_str());
00122             if (obj)
00123                 obj->Invoke("log", FB::variant_list_of(req->m_msg));
00124         }
00125     } catch (const std::exception &) {
00126         // printf("Exception: %s\n", e.what());
00127         // Fail silently; logging should not require success.
00128         FBLOG_TRACE("BrowserHost", "Logging to browser console failed");
00129         return;
00130     }
00131     delete req;
00132 }

Here is the call graph for this function:


Generated on 24 May 2013 for FireBreath by  doxygen 1.6.1
Labels
  • None