diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index 0cef1b5d23dc..21064b4d13d3 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -9802,7 +9802,23 @@ nsHTMLPluginObjElementSH::GetPluginJSObject(JSContext *cx, JSObject *obj, return NS_OK; } +NS_IMETHODIMP +nsHTMLPluginObjElementSH::NewResolve(nsIXPConnectWrappedNative *wrapper, + JSContext *cx, JSObject *obj, jsval id, + PRUint32 flags, JSObject **objp, + PRBool *_retval) +{ + // Make sure the plugin instance is loaded and instantiated, if + // possible. + nsCOMPtr pi; + nsresult rv = GetPluginInstanceIfSafe(wrapper, obj, getter_AddRefs(pi)); + NS_ENSURE_SUCCESS(rv, rv); + + return nsElementSH::NewResolve(wrapper, cx, obj, id, flags, objp, + _retval); +} + // HTMLOptionsCollection helper NS_IMETHODIMP diff --git a/dom/base/nsDOMClassInfo.h b/dom/base/nsDOMClassInfo.h index 205d761fc8fb..9d46b1143bda 100644 --- a/dom/base/nsDOMClassInfo.h +++ b/dom/base/nsDOMClassInfo.h @@ -1112,6 +1112,9 @@ protected: JSObject **plugin_proto); public: + NS_IMETHOD NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx, + JSObject *obj, jsval id, PRUint32 flags, + JSObject **objp, PRBool *_retval); NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx, JSObject *globalObj, JSObject **parentObj); NS_IMETHOD PostCreate(nsIXPConnectWrappedNative *wrapper, JSContext *cx,