Index: chrome/common/extensions/extension_messages.cc |
diff --git a/chrome/common/extensions/extension_messages.cc b/chrome/common/extensions/extension_messages.cc |
index 7ebee77c8f0cc216e420540f8b03809ba101a475..6f4413499fe4eb9a615bc799348e79c9886dd23d 100644 |
--- a/chrome/common/extensions/extension_messages.cc |
+++ b/chrome/common/extensions/extension_messages.cc |
@@ -15,14 +15,32 @@ ExtensionMsg_Loaded_Params::~ExtensionMsg_Loaded_Params() {} |
ExtensionMsg_Loaded_Params::ExtensionMsg_Loaded_Params( |
const ExtensionMsg_Loaded_Params& other) |
- : manifest(other.manifest->DeepCopy()), |
- location(other.location), |
+ : location(other.location), |
path(other.path), |
apis(other.apis), |
explicit_hosts(other.explicit_hosts), |
scriptable_hosts(other.scriptable_hosts), |
id(other.id), |
- creation_flags(other.creation_flags) {} |
+ creation_flags(other.creation_flags) { |
+ // ipc_message_utils.h calls resize() on vector, which might briefly |
+ // construct a struct missing a valid manifest. |
+ if (other.manifest.get()) { |
+ manifest.reset(other.manifest->DeepCopy()); |
+ } |
+} |
+ |
+ExtensionMsg_Loaded_Params& ExtensionMsg_Loaded_Params::operator=( |
Aaron Boodman
2011/11/14 22:48:07
Hm, yeah, it does seem weird/unfortunate to need b
miket_OOO
2011/11/14 23:48:51
See #crx. mpcomplete suggested using linked_ptr, a
|
+ const ExtensionMsg_Loaded_Params& other) { |
+ manifest.reset(other.manifest->DeepCopy()); |
+ location = other.location; |
+ path = other.path; |
+ apis = other.apis; |
+ explicit_hosts = other.explicit_hosts; |
+ scriptable_hosts = other.scriptable_hosts; |
+ id = other.id; |
+ creation_flags = other.creation_flags; |
+ return *this; |
+} |
ExtensionMsg_Loaded_Params::ExtensionMsg_Loaded_Params( |
const Extension* extension) |
@@ -37,15 +55,16 @@ ExtensionMsg_Loaded_Params::ExtensionMsg_Loaded_Params( |
// As we need more bits of extension data in the renderer, add more keys to |
// this list. |
const char* kRendererExtensionKeys[] = { |
- extension_manifest_keys::kPublicKey, |
- extension_manifest_keys::kName, |
- extension_manifest_keys::kVersion, |
+ extension_manifest_keys::kApp, |
+ extension_manifest_keys::kContentScripts, |
extension_manifest_keys::kIcons, |
+ extension_manifest_keys::kName, |
extension_manifest_keys::kPageAction, |
extension_manifest_keys::kPageActions, |
extension_manifest_keys::kPermissions, |
- extension_manifest_keys::kApp, |
- extension_manifest_keys::kContentScripts |
+ extension_manifest_keys::kPlatformApp, |
+ extension_manifest_keys::kPublicKey, |
+ extension_manifest_keys::kVersion, |
}; |
// Copy only the data we need. |