From 487cdb981acfce9c2bfca41f6bdd20718da22010 Mon Sep 17 00:00:00 2001 From: "tschmelcher@chromium.org" Date: Wed, 24 Nov 2010 19:51:34 +0000 Subject: Fix IE crash regression from r66344. TEST=pending: build and load in IE BUG=none Review URL: http://codereview.chromium.org/5325002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67296 0039d316-1c4b-4281-b951-d872f2087c98 --- o3d/plugin/cross/main.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'o3d') diff --git a/o3d/plugin/cross/main.cc b/o3d/plugin/cross/main.cc index 575d524..98b12b8 100644 --- a/o3d/plugin/cross/main.cc +++ b/o3d/plugin/cross/main.cc @@ -177,6 +177,11 @@ void NPP_URLNotify(NPP instance, const char *url, NPReason reason, NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) { HANDLE_CRASHES; + if (!instance) { + // Our ActiveX wrapper calls us like this as a way of saying that what it + // really wants to call is NP_GetValue(). :/ + return o3d::NP_GetValue(variable, value); + } PluginObject *obj = static_cast(instance->pdata); if (!obj) { return NPERR_INVALID_PARAM; @@ -195,6 +200,8 @@ NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) { default: { NPError ret = PlatformNPPGetValue(obj, variable, value); if (ret == NPERR_INVALID_PARAM) + // TODO(tschmelcher): Do we still need to fall back to this now that we + // have the ActiveX special case above? ret = o3d::NP_GetValue(variable, value); return ret; } -- cgit v1.1