diff options
-rw-r--r-- | chrome/browser/plugin_finder.cc | 4 | ||||
-rw-r--r-- | chrome/browser/printing/print_view_manager.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/webui/history_ui.cc | 3 | ||||
-rw-r--r-- | content/browser/accessibility/browser_accessibility.cc | 6 | ||||
-rw-r--r-- | content/browser/gamepad/gamepad_provider.cc | 3 | ||||
-rw-r--r-- | content/common/gpu/image_transport_surface_linux.cc | 3 |
6 files changed, 14 insertions, 9 deletions
diff --git a/chrome/browser/plugin_finder.cc b/chrome/browser/plugin_finder.cc index 59777de..9227ff8 100644 --- a/chrome/browser/plugin_finder.cc +++ b/chrome/browser/plugin_finder.cc @@ -39,7 +39,8 @@ PluginFinder::PluginFinder() { base::DictionaryValue* dict = static_cast<base::DictionaryValue*>(value.get()); base::ListValue* list = NULL; - dict->GetList("plugins", &list); + bool success = dict->GetList("plugins", &list); + DCHECK(success); plugin_list_.reset(list->DeepCopy()); } DCHECK(plugin_list_.get()); @@ -113,4 +114,3 @@ void PluginFinder::FindPlugin( } MessageLoop::current()->PostTask(FROM_HERE, not_found_callback); } - diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc index 68ddc3b..4a77e50 100644 --- a/chrome/browser/printing/print_view_manager.cc +++ b/chrome/browser/printing/print_view_manager.cc @@ -123,7 +123,7 @@ bool PrintViewManager::PrintPreviewNow() { } void PrintViewManager::PrintPreviewDone() { - BrowserThread::CurrentlyOn(BrowserThread::UI); + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK_NE(NOT_PREVIEWING, print_preview_state_); if (print_preview_state_ == SCRIPTED_PREVIEW) { @@ -303,7 +303,7 @@ void PrintViewManager::OnScriptedPrintPreview(bool source_is_modifiable, } void PrintViewManager::OnScriptedPrintPreviewReply(IPC::Message* reply_msg) { - BrowserThread::CurrentlyOn(BrowserThread::UI); + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); Send(reply_msg); } diff --git a/chrome/browser/ui/webui/history_ui.cc b/chrome/browser/ui/webui/history_ui.cc index a1a6845..b4ade06 100644 --- a/chrome/browser/ui/webui/history_ui.cc +++ b/chrome/browser/ui/webui/history_ui.cc @@ -170,7 +170,8 @@ void BrowsingHistoryHandler::HandleGetHistory(const ListValue* args) { // Get arguments (if any). int day = 0; - ExtractIntegerValue(args, &day); + bool res = ExtractIntegerValue(args, &day); + DCHECK(res); // Set our query options. history::QueryOptions options; diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc index 3940d4a..e7e5728 100644 --- a/content/browser/accessibility/browser_accessibility.cc +++ b/content/browser/accessibility/browser_accessibility.cc @@ -129,8 +129,10 @@ gfx::Rect BrowserAccessibility::GetLocalBoundsRect() { BrowserAccessibility* root = manager_->GetRoot(); int scroll_x = 0; int scroll_y = 0; - root->GetIntAttribute(WebAccessibility::ATTR_SCROLL_X, &scroll_x); - root->GetIntAttribute(WebAccessibility::ATTR_SCROLL_Y, &scroll_y); + if (!root->GetIntAttribute(WebAccessibility::ATTR_SCROLL_X, &scroll_x) || + !root->GetIntAttribute(WebAccessibility::ATTR_SCROLL_Y, &scroll_y)) { + return bounds; + } bounds.Offset(-scroll_x, -scroll_y); return bounds; diff --git a/content/browser/gamepad/gamepad_provider.cc b/content/browser/gamepad/gamepad_provider.cc index 54d38a5..6af245c 100644 --- a/content/browser/gamepad/gamepad_provider.cc +++ b/content/browser/gamepad/gamepad_provider.cc @@ -56,7 +56,8 @@ GamepadProvider::GamepadProvider(GamepadDataFetcher* fetcher) base::SystemMonitor* monitor = base::SystemMonitor::Get(); if (monitor) monitor->AddDevicesChangedObserver(this); - gamepad_shared_memory_.CreateAndMapAnonymous(data_size); + bool res = gamepad_shared_memory_.CreateAndMapAnonymous(data_size); + DCHECK(res); GamepadHardwareBuffer* hwbuf = SharedMemoryAsHardwareBuffer(); memset(hwbuf, 0, sizeof(GamepadHardwareBuffer)); diff --git a/content/common/gpu/image_transport_surface_linux.cc b/content/common/gpu/image_transport_surface_linux.cc index 95903ef..240629a 100644 --- a/content/common/gpu/image_transport_surface_linux.cc +++ b/content/common/gpu/image_transport_surface_linux.cc @@ -212,7 +212,8 @@ EGLAcceleratedSurface::EGLAcceleratedSurface(const gfx::Size& size) XID window = XDefaultRootWindow(dpy); XWindowAttributes gwa; - XGetWindowAttributes(dpy, window, &gwa); + bool success = XGetWindowAttributes(dpy, window, &gwa); + DCHECK(success); pixmap_ = XCreatePixmap( dpy, window, size_.width(), size_.height(), gwa.depth); |