Bug 645049 - Remove [deprecated] methods on mozIStorageBaseStatement.idl. r?asuth
MozReview-Commit-ID: AB1VBuhxi8
--- a/storage/StorageBaseStatementInternal.h
+++ b/storage/StorageBaseStatementInternal.h
@@ -196,32 +196,32 @@ NS_DEFINE_STATIC_IID_ACCESSOR(StorageBas
/**
* Name-building helper for BIND_GEN_IMPL.
*/
#define BIND_NAME_CONCAT(_nameBit, _concatBit) \
Bind##_nameBit##_concatBit
/**
* We have type-specific convenience methods for C++ implementations in
- * 3 different forms; 2 by index, 1 by name. The following macro allows
+ * two different forms; by index and by name. The following macro allows
* us to avoid having to define repetitive things by hand.
*
* Because of limitations of macros and our desire to avoid requiring special
* permutations for the null and blob cases (whose argument count varies),
* we require that the argument declarations and corresponding invocation
* usages are passed in.
*
* @param _class
* The class name.
* @param _guard
* The guard clause to inject.
* @param _declName
* The argument list (with parens) for the ByName variants.
* @param _declIndex
- * The argument list (with parens) for the index variants.
+ * The argument list (with parens) for the ByIndex variants.
* @param _invArgs
* The invocation argumment list.
*/
#define BIND_GEN_IMPL(_class, _guard, _name, _declName, _declIndex, _invArgs) \
NS_IMETHODIMP _class::BIND_NAME_CONCAT(_name, ByName) _declName \
{ \
_guard \
mozIStorageBindingParams *params = getParams(); \
@@ -229,24 +229,16 @@ NS_DEFINE_STATIC_IID_ACCESSOR(StorageBas
return params->BIND_NAME_CONCAT(_name, ByName) _invArgs; \
} \
NS_IMETHODIMP _class::BIND_NAME_CONCAT(_name, ByIndex) _declIndex \
{ \
_guard \
mozIStorageBindingParams *params = getParams(); \
NS_ENSURE_TRUE(params, NS_ERROR_OUT_OF_MEMORY); \
return params->BIND_NAME_CONCAT(_name, ByIndex) _invArgs; \
- } \
- NS_IMETHODIMP _class::BIND_NAME_CONCAT(_name, Parameter) _declIndex \
- { \
- WARN_DEPRECATED(); \
- _guard \
- mozIStorageBindingParams *params = getParams(); \
- NS_ENSURE_TRUE(params, NS_ERROR_OUT_OF_MEMORY); \
- return params->BIND_NAME_CONCAT(_name, ByIndex) _invArgs; \
}
/**
* Implement BindByName/BindByIndex for the given class.
*
* @param _class The class name.
* @param _optionalGuard The guard clause to inject.
*/
@@ -264,18 +256,18 @@ NS_DEFINE_STATIC_IID_ACCESSOR(StorageBas
{ \
_optionalGuard \
mozIStorageBindingParams *params = getParams(); \
NS_ENSURE_TRUE(params, NS_ERROR_OUT_OF_MEMORY); \
return params->BindByIndex(aIndex, aValue); \
}
/**
- * Define the various Bind*Parameter, Bind*ByIndex, Bind*ByName stubs that just
- * end up proxying to the params object.
+ * Define the various Bind*ByIndex, Bind*ByName stubs that just end up proxying
+ * to the params object.
*/
#define BOILERPLATE_BIND_PROXIES(_class, _optionalGuard) \
BIND_BASE_IMPLS(_class, _optionalGuard) \
BIND_GEN_IMPL(_class, _optionalGuard, \
UTF8String, \
(const nsACString &aWhere, \
const nsACString &aValue), \
(uint32_t aWhere, \
--- a/storage/mozIStorageBaseStatement.idl
+++ b/storage/mozIStorageBaseStatement.idl
@@ -36,55 +36,16 @@ interface mozIStorageBaseStatement : moz
* whether the statement has actually been executed by the asynchronous
* thread; you just need to call finalize after your last call to executeAsync
* involving the statement. However, you do need to use asyncClose instead of
* close on the connection if any statements have been used asynchronously.
*/
void finalize();
/**
- * Bind the given value at the given numeric index.
- *
- * @param aParamIndex
- * 0-based index, 0 corresponding to the first numbered argument or
- * "?1".
- * @param aValue
- * Argument value.
- * @param aValueSize
- * Length of aValue in bytes.
- * @{
- */
- [deprecated] void bindUTF8StringParameter(in unsigned long aParamIndex,
- in AUTF8String aValue);
- [deprecated] void bindStringParameter(in unsigned long aParamIndex,
- in AString aValue);
- [deprecated] void bindDoubleParameter(in unsigned long aParamIndex,
- in double aValue);
- [deprecated] void bindInt32Parameter(in unsigned long aParamIndex,
- in long aValue);
- [deprecated] void bindInt64Parameter(in unsigned long aParamIndex,
- in long long aValue);
- [deprecated] void bindNullParameter(in unsigned long aParamIndex);
- [deprecated] void bindBlobParameter(
- in unsigned long aParamIndex,
- [array,const,size_is(aValueSize)] in octet aValue,
- in unsigned long aValueSize);
- [deprecated] void bindStringAsBlobParameter(
- in unsigned long aParamIndex,
- in AString aValue);
- [deprecated] void bindUTF8StringAsBlobParameter(
- in unsigned long aParamIndex,
- in AUTF8String aValue);
- [deprecated] void bindAdoptedBlobParameter(
- in unsigned long aParamIndex,
- [array,size_is(aValueSize)] in octet aValue,
- in unsigned long aValueSize);
- /**@}*/
-
- /**
* Binds the array of parameters to the statement. When executeAsync is
* called, all the parameters in aParameters are bound and then executed.
*
* @param aParameters
* The array of parameters to bind to the statement upon execution.
*
* @note This is only works on statements being used asynchronously.
*/
--- a/storage/mozStorageHelper.h
+++ b/storage/mozStorageHelper.h
@@ -204,38 +204,9 @@ protected:
nsCOMPtr<mozIStorageStatement> mStatement;
};
// Use this to make queries uniquely identifiable in telemetry
// statistics, especially PRAGMAs. We don't include __LINE__ so that
// queries are stable in the face of source code changes.
#define MOZ_STORAGE_UNIQUIFY_QUERY_STR "/* " __FILE__ " */ "
-// Use this to show a console warning when using deprecated methods.
-#define WARN_DEPRECATED() \
- PR_BEGIN_MACRO \
- \
- if (NS_IsMainThread()) { \
- nsCOMPtr<nsIConsoleService> cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID); \
- \
- if (cs) { \
- nsCString msg(__FUNCTION__); \
- msg.AppendLiteral(" is deprecated and will be removed soon."); \
- \
- nsCOMPtr<nsIScriptError> e = do_CreateInstance(NS_SCRIPTERROR_CONTRACTID); \
- if (e && NS_SUCCEEDED(e->Init(NS_ConvertUTF8toUTF16(msg), EmptyString(), \
- EmptyString(), 0, 0, \
- nsIScriptError::errorFlag, "Storage"))) { \
- cs->LogMessage(e); \
- } \
- } \
- } \
- if (NS_IsMainThread()) { \
- nsCOMPtr<nsIXPConnect> xpc = do_GetService(nsIXPConnect::GetCID()); \
- if (xpc) { \
- mozilla::Unused << xpc->DebugDumpJSStack(false, false, false); \
- } \
- } \
- MOZ_ASSERT(false, "You are trying to use a deprecated mozStorage method. " \
- "Check error message in console to identify the method name.");\
- PR_END_MACRO
-
#endif /* MOZSTORAGEHELPER_H */