Bug 645049 - Remove [deprecated] methods on mozIStorageBaseStatement.idl. r=asuth

MozReview-Commit-ID: AB1VBuhxi8

--HG--
extra : rebase_source : e5062b532370ab4d82fb33a258e447fc66cf09f6
This commit is contained in:
Masatoshi Kimura 2017-08-06 09:17:50 +09:00
Родитель 74e263bd4c
Коммит 12ab2931a7
3 изменённых файлов: 4 добавлений и 80 удалений

Просмотреть файл

@ -201,7 +201,7 @@ NS_DEFINE_STATIC_IID_ACCESSOR(StorageBaseStatementInternal,
/**
* 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
@ -216,7 +216,7 @@ NS_DEFINE_STATIC_IID_ACCESSOR(StorageBaseStatementInternal,
* @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.
*/
@ -234,14 +234,6 @@ NS_DEFINE_STATIC_IID_ACCESSOR(StorageBaseStatementInternal,
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; \
}
/**
@ -269,8 +261,8 @@ NS_DEFINE_STATIC_IID_ACCESSOR(StorageBaseStatementInternal,
}
/**
* 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) \

Просмотреть файл

@ -40,45 +40,6 @@ interface mozIStorageBaseStatement : mozIStorageBindingParams {
*/
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.

Просмотреть файл

@ -209,33 +209,4 @@ protected:
// 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 */