diff --git a/mozilla/modules/plugin/base/src/nsJSNPRuntime.cpp b/mozilla/modules/plugin/base/src/nsJSNPRuntime.cpp index 89817a64498..7dd2983ca2c 100644 --- a/mozilla/modules/plugin/base/src/nsJSNPRuntime.cpp +++ b/mozilla/modules/plugin/base/src/nsJSNPRuntime.cpp @@ -1409,10 +1409,11 @@ nsJSNPRuntime::OnPluginDestroy(NPP npp) return; } - nsCOMPtr holder; - xpc->WrapNative(cx, ::JS_GetGlobalObject(cx), element, - NS_GET_IID(nsIDOMElement), - getter_AddRefs(holder)); + nsCOMPtr supp(do_QueryInterface(element)); + nsCOMPtr holder; + xpc->GetWrappedNativeOfNativeObject(cx, ::JS_GetGlobalObject(cx), supp, + NS_GET_IID(nsISupports), + getter_AddRefs(holder)); if (!holder) { return; }