summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_function.h
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 21:23:05 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 21:23:05 +0000
commit24f57133d4cf6da4c4122a609c6d1fd7262d6f06 (patch)
treef7f60e0d9c45638921fd33a330d29a750a373fc6 /chrome/browser/extensions/extension_function.h
parent434ff6a6e51ac0c1853c6b0ade3af6cfea8092de (diff)
downloadchromium_src-24f57133d4cf6da4c4122a609c6d1fd7262d6f06.zip
chromium_src-24f57133d4cf6da4c4122a609c6d1fd7262d6f06.tar.gz
chromium_src-24f57133d4cf6da4c4122a609c6d1fd7262d6f06.tar.bz2
Fix a crash in the extension system when sending response back to extension with no results. Also found an UMR causing DCHECKs to hit repeatedly (in AsyncExtensionFunction::SetArgs).
BUG=None TEST=Basically, use any extension that calls an API function that returns no results (such as PageAction) and Chrome should not crash. Review URL: http://codereview.chromium.org/114033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_function.h')
-rw-r--r--chrome/browser/extensions/extension_function.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_function.h b/chrome/browser/extensions/extension_function.h
index cbe85b9..5d0ddb0 100644
--- a/chrome/browser/extensions/extension_function.h
+++ b/chrome/browser/extensions/extension_function.h
@@ -28,6 +28,7 @@ class Profile;
class ExtensionFunction {
public:
ExtensionFunction() : request_id_(-1), has_callback_(false) {}
+ virtual ~ExtensionFunction() {}
// Specifies the name of the function.
virtual void SetName(const std::string& name) { }
@@ -79,7 +80,7 @@ class ExtensionFunction {
// parsing JSON (and instead uses custom serialization of Value objects).
class AsyncExtensionFunction : public ExtensionFunction {
public:
- AsyncExtensionFunction() : bad_message_(false) {}
+ AsyncExtensionFunction() : args_(NULL), bad_message_(false) {}
virtual ~AsyncExtensionFunction() {}
virtual void SetArgs(const std::string& args);
@@ -94,7 +95,7 @@ class AsyncExtensionFunction : public ExtensionFunction {
Profile* profile();
- // The arguments to the API. Only non-null if argument were specfied.
+ // The arguments to the API. Only non-null if argument were specified.
Value* args_;
// The result of the API. This should be populated by the derived class before