#include "browser_config.h"
#include <string>
-#if !defined(NDEBUG) || PLATFORM(TIZEN)
+#ifdef NDEBUG
#include "Logger/Logger.h"
std::string Logger::timeStamp() {
struct tm b;
struct timeval detail_time;
+ memset(&b, 0, sizeof(b));
gettimeofday(&detail_time, NULL);
char buf[80];
try {
p = new char[size];
- } catch (std::bad_alloc) {
+ } catch (const std::bad_alloc& e) {
Logger::getInstance().log("Error while allocating memory!!");
return std::string();
}
std::copy(p, p + old_size, np);
delete [] p;
p = np;
- } catch (std::bad_alloc) {
+ } catch (const std::bad_alloc& e) {
delete [] p;
Logger::getInstance().log("Error while allocating memory!!");
return std::string();
void WebEngineMin::_register_service_worker_result_cb(
Ewk_Context*, const char* scope_url, const char* script_url, Eina_Bool result, void*)
{
- BROWSER_LOGD("[PWE-SHUB][%s:%d] scope_url: %s, script_url: %s, result: %s",
+ if(scope_url||script_url||result)
+ BROWSER_LOGD("[PWE-SHUB][%s:%d] scope_url: %s, script_url: %s, result: %s",
__PRETTY_FUNCTION__, __LINE__, scope_url, script_url, result ? "true" : "false");
}
#endif
if (newAdaptorId < 0)
return TabId(TabId::NONE);
}
- newTabId = TabId(newAdaptorId);
+ newTabId == TabId(newAdaptorId);
} else {
++m_tabIdSecret;
- newTabId = TabId(m_tabIdSecret);
+ newTabId == TabId(m_tabIdSecret);
}
if (!m_webViewCacheInitialized) {
closeFindOnPage();
m_currentWebView = m_stateStruct->tabs[newTabId];
- m_stateStruct->currentTabId = newTabId;
+ m_stateStruct->currentTabId == newTabId;
m_stateStruct->mostRecentTab.erase(
std::remove(m_stateStruct->mostRecentTab.begin(),
m_stateStruct->mostRecentTab.end(),
m_stateStruct->mostRecentTab.end());
if (m_stateStruct->tabs.size() == 0) {
- m_stateStruct->currentTabId = TabId::NONE;
+ m_stateStruct->currentTabId == TabId::NONE;
if (m_currentWebView) {
disconnectSignals(m_currentWebView);
m_currentWebView.reset();
if (m_webEngine->tabsCount() >= tabLimit + 1)
return;
- if (currentTabId != (id = m_webEngine->addTab(std::string(),
+ if (currentTabId != (id == m_webEngine->addTab(std::string(),
boost::none,
std::string(),
self->isDesktopMode(),
WebView *self = reinterpret_cast<WebView*>(data);
Ewk_Error *error = reinterpret_cast<Ewk_Error*>(ewkError);
- Ewk_Error_Type errorType = ewk_error_type_get(error);
-
- BROWSER_LOGD("[%s:%d] ewk_error_type: %d ",
- __PRETTY_FUNCTION__, __LINE__, errorType);
-
+
BROWSER_LOGD("[%s:%d] emiting signal ", __PRETTY_FUNCTION__, __LINE__);
int errorCode = ewk_error_code_get(error);
if (errorCode == EWK_ERROR_NETWORK_STATUS_CANCELLED) {
void WebView::searchOnWebsite(const std::string & searchString, int flags)
{
///\todo: it should be "0" instead of "1024" for unlimited match count but it doesn't work properly in WebKit
- Eina_Bool result = ewk_view_text_find(m_ewkView, searchString.c_str(), static_cast<Ewk_Find_Options>(flags), 1024);
- BROWSER_LOGD("Ewk search; word: %s, result: %d", searchString.c_str(), result);
+ ewk_view_text_find(m_ewkView, searchString.c_str(), static_cast<Ewk_Find_Options>(flags), 1024);
}
void WebView::switchToDesktopMode() {