X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fnet%2Fbase%2Fnet_log.cc;h=36c94ca9441734cc887c5085f48357066cf31a59;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=6016d0de026d44d2b92a1c8654f45ef02420a1ba;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/net/base/net_log.cc b/src/net/base/net_log.cc index 6016d0d..36c94ca 100644 --- a/src/net/base/net_log.cc +++ b/src/net/base/net_log.cc @@ -101,10 +101,10 @@ NetLog::ParametersCallback NetLog::Source::ToEventParametersCallback() const { // static bool NetLog::Source::FromEventParameters(base::Value* event_params, Source* source) { - base::DictionaryValue* dict; - base::DictionaryValue* source_dict; - int source_id; - int source_type; + base::DictionaryValue* dict = NULL; + base::DictionaryValue* source_dict = NULL; + int source_id = -1; + int source_type = NetLog::SOURCE_COUNT; if (!event_params || !event_params->GetAsDictionary(&dict) || !dict->GetDictionary("source_dependency", &source_dict) || @@ -114,7 +114,7 @@ bool NetLog::Source::FromEventParameters(base::Value* event_params, return false; } - DCHECK_LE(0, source_id); + DCHECK_GE(source_id, 0); DCHECK_LT(source_type, NetLog::SOURCE_COUNT); *source = Source(static_cast(source_type), source_id); return true;