Bug 1276292. Remove the unused nsNPAPIPluginInstance::GetJSContext function. r=mccr8
This commit is contained in:
@@ -1547,35 +1547,6 @@ nsNPAPIPluginInstance::GetMIMEType(const char* *result)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsNPAPIPluginInstance::GetJSContext(JSContext* *outContext)
|
||||
{
|
||||
if (!mOwner)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
RefPtr<nsPluginInstanceOwner> deathGrip(mOwner);
|
||||
|
||||
*outContext = nullptr;
|
||||
nsCOMPtr<nsIDocument> document;
|
||||
|
||||
nsresult rv = mOwner->GetDocument(getter_AddRefs(document));
|
||||
|
||||
if (NS_SUCCEEDED(rv) && document) {
|
||||
nsCOMPtr<nsIScriptGlobalObject> global =
|
||||
do_QueryInterface(document->GetWindow());
|
||||
|
||||
if (global) {
|
||||
nsIScriptContext *context = global->GetContext();
|
||||
|
||||
if (context) {
|
||||
*outContext = context->GetNativeContext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsPluginInstanceOwner*
|
||||
nsNPAPIPluginInstance::GetOwner()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user