diff options
Diffstat (limited to 'content/browser/webui')
-rw-r--r-- | content/browser/webui/web_ui.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/content/browser/webui/web_ui.cc b/content/browser/webui/web_ui.cc index 38e9839..202e755 100644 --- a/content/browser/webui/web_ui.cc +++ b/content/browser/webui/web_ui.cc @@ -224,6 +224,11 @@ bool WebUIMessageHandler::ExtractIntegerValue(const ListValue* value, std::string string_value; if (value->GetString(0, &string_value)) return base::StringToInt(string_value, out_int); + double double_value; + if (value->GetDouble(0, &double_value)) { + *out_int = static_cast<int>(double_value); + return true; + } NOTREACHED(); return false; } |