From 12ab2931a7bc6038ac9dcbab32c1c0850633df0a Mon Sep 17 00:00:00 2001 From: Masatoshi Kimura Date: Sun, 6 Aug 2017 09:17:50 +0900 Subject: [PATCH] Bug 645049 - Remove [deprecated] methods on mozIStorageBaseStatement.idl. r=asuth MozReview-Commit-ID: AB1VBuhxi8 --HG-- extra : rebase_source : e5062b532370ab4d82fb33a258e447fc66cf09f6 --- storage/StorageBaseStatementInternal.h | 16 +++-------- storage/mozIStorageBaseStatement.idl | 39 -------------------------- storage/mozStorageHelper.h | 29 ------------------- 3 files changed, 4 insertions(+), 80 deletions(-) diff --git a/storage/StorageBaseStatementInternal.h b/storage/StorageBaseStatementInternal.h index d7de4dbaf77d..9e66be140b1d 100644 --- a/storage/StorageBaseStatementInternal.h +++ b/storage/StorageBaseStatementInternal.h @@ -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) \ diff --git a/storage/mozIStorageBaseStatement.idl b/storage/mozIStorageBaseStatement.idl index 52cd30500155..deba800e2bf7 100644 --- a/storage/mozIStorageBaseStatement.idl +++ b/storage/mozIStorageBaseStatement.idl @@ -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. diff --git a/storage/mozStorageHelper.h b/storage/mozStorageHelper.h index d374ff14cb0e..ecf1df4fc16f 100644 --- a/storage/mozStorageHelper.h +++ b/storage/mozStorageHelper.h @@ -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 cs = do_GetService(NS_CONSOLESERVICE_CONTRACTID); \ - \ - if (cs) { \ - nsCString msg(__FUNCTION__); \ - msg.AppendLiteral(" is deprecated and will be removed soon."); \ - \ - nsCOMPtr 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 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 */