зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1381921, part 2 - Remove nsAXPCNativeCallContext. r=mrbkap
This class is no longer used. MozReview-Commit-ID: Lv9AAd3OjIl --HG-- extra : rebase_source : b37abc2c70a2a08b176d0504163c246b6ff3b8cf
This commit is contained in:
Родитель
c00d64f6c6
Коммит
c77f1723be
|
@ -62,7 +62,6 @@
|
|||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/ErrorEvent.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#include "nsAXPCNativeCallContext.h"
|
||||
#include "mozilla/CycleCollectedJSRuntime.h"
|
||||
#include "mozilla/SystemGroup.h"
|
||||
#include "nsRefreshDriver.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "mozilla/Likely.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/dom/FunctionBinding.h"
|
||||
#include "nsAXPCNativeCallContext.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsError.h"
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
EXPORTS += [
|
||||
'nsAXPCNativeCallContext.h',
|
||||
'nsTArrayHelpers.h',
|
||||
'xpc_make_class.h',
|
||||
'xpc_map_end.h',
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* vim: set ts=8 sts=4 et sw=4 tw=99: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef nsAXPCNativeCallContext_h__
|
||||
#define nsAXPCNativeCallContext_h__
|
||||
|
||||
/**
|
||||
* A native call context is allocated on the stack when XPConnect calls a
|
||||
* native method. Holding a pointer to this object beyond the currently
|
||||
* executing stack frame is not permitted.
|
||||
*/
|
||||
class nsAXPCNativeCallContext
|
||||
{
|
||||
public:
|
||||
NS_IMETHOD GetCallee(nsISupports** aResult) = 0;
|
||||
NS_IMETHOD GetCalleeMethodIndex(uint16_t* aResult) = 0;
|
||||
NS_IMETHOD GetJSContext(JSContext** aResult) = 0;
|
||||
NS_IMETHOD GetArgc(uint32_t* aResult) = 0;
|
||||
NS_IMETHOD GetArgvPtr(JS::Value** aResult) = 0;
|
||||
|
||||
// Methods added since mozilla 0.6....
|
||||
|
||||
NS_IMETHOD GetCalleeInterface(nsIInterfaceInfo** aResult) = 0;
|
||||
NS_IMETHOD GetCalleeClassInfo(nsIClassInfo** aResult) = 0;
|
||||
|
||||
NS_IMETHOD GetPreviousCallContext(nsAXPCNativeCallContext** aResult) = 0;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -213,64 +213,3 @@ XPCCallContext::~XPCCallContext()
|
|||
MOZ_ASSERT(old == this, "bad pop from per thread data");
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::GetCallee(nsISupports * *aCallee)
|
||||
{
|
||||
nsCOMPtr<nsISupports> rval = mWrapper ? mWrapper->GetIdentityObject() : nullptr;
|
||||
rval.forget(aCallee);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::GetCalleeMethodIndex(uint16_t* aCalleeMethodIndex)
|
||||
{
|
||||
*aCalleeMethodIndex = mMethodIndex;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::GetCalleeInterface(nsIInterfaceInfo * *aCalleeInterface)
|
||||
{
|
||||
nsCOMPtr<nsIInterfaceInfo> rval = mInterface->GetInterfaceInfo();
|
||||
rval.forget(aCalleeInterface);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::GetCalleeClassInfo(nsIClassInfo * *aCalleeClassInfo)
|
||||
{
|
||||
nsCOMPtr<nsIClassInfo> rval = mWrapper ? mWrapper->GetClassInfo() : nullptr;
|
||||
rval.forget(aCalleeClassInfo);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::GetJSContext(JSContext * *aJSContext)
|
||||
{
|
||||
JS_AbortIfWrongThread(mJSContext);
|
||||
*aJSContext = mJSContext;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::GetArgc(uint32_t* aArgc)
|
||||
{
|
||||
*aArgc = (uint32_t) mArgc;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::GetArgvPtr(Value** aArgvPtr)
|
||||
{
|
||||
*aArgvPtr = mArgv;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
XPCCallContext::GetPreviousCallContext(nsAXPCNativeCallContext** aResult)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aResult);
|
||||
*aResult = GetPrevCallContext();
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -151,7 +151,6 @@
|
|||
|
||||
#include "SandboxPrivate.h"
|
||||
#include "BackstagePass.h"
|
||||
#include "nsAXPCNativeCallContext.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
// Nasty MS defines
|
||||
|
@ -704,18 +703,9 @@ XPCJSContext::GetStringName(unsigned index) const
|
|||
//
|
||||
// Note that most accessors are inlined.
|
||||
|
||||
class MOZ_STACK_CLASS XPCCallContext final : public nsAXPCNativeCallContext
|
||||
class MOZ_STACK_CLASS XPCCallContext final
|
||||
{
|
||||
public:
|
||||
NS_IMETHOD GetCallee(nsISupports** aResult);
|
||||
NS_IMETHOD GetCalleeMethodIndex(uint16_t* aResult);
|
||||
NS_IMETHOD GetJSContext(JSContext** aResult);
|
||||
NS_IMETHOD GetArgc(uint32_t* aResult);
|
||||
NS_IMETHOD GetArgvPtr(JS::Value** aResult);
|
||||
NS_IMETHOD GetCalleeInterface(nsIInterfaceInfo** aResult);
|
||||
NS_IMETHOD GetCalleeClassInfo(nsIClassInfo** aResult);
|
||||
NS_IMETHOD GetPreviousCallContext(nsAXPCNativeCallContext** aResult);
|
||||
|
||||
enum {NO_ARGS = (unsigned) -1};
|
||||
|
||||
explicit XPCCallContext(JSContext* cx,
|
||||
|
|
Загрузка…
Ссылка в новой задаче