Index: chrome/browser/extensions/menu_manager.cc |
diff --git a/chrome/browser/extensions/menu_manager.cc b/chrome/browser/extensions/menu_manager.cc |
index 7f4d3250282b31aaa96459c8b56e6e2f40184b3c..9e29835393017c08436e27a6680804e6c361bcb9 100644 |
--- a/chrome/browser/extensions/menu_manager.cc |
+++ b/chrome/browser/extensions/menu_manager.cc |
@@ -640,11 +640,14 @@ void MenuManager::ExecuteCommand(Profile* profile, |
args->Append(properties); |
// Add the tab info to the argument list. |
- // Note: web_contents only NULL in unit tests :( |
- if (web_contents) |
- args->Append(ExtensionTabUtil::CreateTabValue(web_contents)); |
- else |
- args->Append(new DictionaryValue()); |
+ // No tab info in a platform app. |
+ if (!extension || !extension->is_platform_app()) { |
+ // Note: web_contents only NULL in unit tests :( |
+ if (web_contents) |
+ args->Append(ExtensionTabUtil::CreateTabValue(web_contents)); |
+ else |
+ args->Append(new DictionaryValue()); |
+ } |
if (item->type() == MenuItem::CHECKBOX || |
item->type() == MenuItem::RADIO) { |