Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: webkit/plugins/ppapi/ppb_flash_menu_impl.cc

Issue 6432001: Implement proxy for FlashMenu and Run/QuitMessageLoop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Handle NULL menus more gracefully Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/ppb_flash_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_flash_menu_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_flash_menu_impl.cc b/webkit/plugins/ppapi/ppb_flash_menu_impl.cc
index f41e9417df8c0953c88ab7b4aa4ff65c90fff2e9..52f81b66e0db2c24dc9083cee7a051187d8a50fd 100644
--- a/webkit/plugins/ppapi/ppb_flash_menu_impl.cc
+++ b/webkit/plugins/ppapi/ppb_flash_menu_impl.cc
@@ -72,13 +72,13 @@ bool ConvertMenuData(const PP_Flash_Menu* in_menu,
size_t depth,
PPB_Flash_Menu_Impl::MenuData* out_menu,
std::vector<int32_t>* menu_id_map) {
- if (depth > kMaxMenuDepth)
+ if (depth > kMaxMenuDepth || !in_menu)
return false;
// Clear the output, just in case.
out_menu->clear();
- if (!in_menu || !in_menu->count)
+ if (!in_menu->count)
return true; // Nothing else to do.
if (!in_menu->items || in_menu->count > kMaxMenuEntries)
« no previous file with comments | « webkit/plugins/ppapi/ppb_flash_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698