Fix regression calling unique methods for the first time on plugin objects. b=536116 r=josh

This commit is contained in:
Johnny Stenback 2009-12-25 13:16:57 -05:00
parent 19af9d4ec0
commit 059765dea4
2 changed files with 19 additions and 0 deletions

View File

@ -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<nsIPluginInstance> 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

View File

@ -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,