Fixing bug 233307. deCOMtaminating nsIScript* and related interfaces. r+sr=bryner@brianryner.com.
git-svn-id: svn://10.0.0.236/trunk@152565 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -5642,10 +5642,7 @@ NS_IMETHODIMP nsPluginHostImpl::NewPluginURLStream(const nsString& aURL,
|
||||
|
||||
if (global)
|
||||
{
|
||||
nsCOMPtr<nsIScriptGlobalObjectOwner> owner;
|
||||
global->GetGlobalObjectOwner(getter_AddRefs(owner));
|
||||
|
||||
callbacks = do_QueryInterface(owner);
|
||||
callbacks = do_QueryInterface(global->GetGlobalObjectOwner());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -773,13 +773,10 @@ NS_IMETHODIMP nsPluginInstancePeerImpl::GetJSContext(JSContext* *outContext)
|
||||
nsIScriptGlobalObject *global = document->GetScriptGlobalObject();
|
||||
|
||||
if (global) {
|
||||
nsCOMPtr<nsIScriptContext> context;
|
||||
nsIScriptContext *context = global->GetContext();
|
||||
|
||||
if (global->GetContext(getter_AddRefs(context)) == NS_OK) {
|
||||
if (context) {
|
||||
*outContext = (JSContext*) context->GetNativeContext();
|
||||
rv = NS_OK;
|
||||
}
|
||||
if (context) {
|
||||
*outContext = (JSContext*) context->GetNativeContext();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user