From 6dd76b804786ec760bb04b137a6bf017064226dc Mon Sep 17 00:00:00 2001 From: Steve Block Date: Mon, 9 Jan 2012 18:34:42 +0000 Subject: Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE See https://android-git.corp.google.com/g/157519 Bug: 5449033 Change-Id: Icaed25ccf4d689b533101e966e8303810b61b0d4 --- .../android/WebCoreSupport/ChromiumIncludes.h | 22 +--- .../android/WebCoreSupport/WebUrlLoaderClient.cpp | 4 +- Source/WebKit/android/jni/CacheManager.cpp | 2 +- Source/WebKit/android/jni/CookieManager.cpp | 2 +- .../jni/DeviceMotionAndOrientationManager.cpp | 2 +- .../android/jni/GeolocationPermissionsBridge.cpp | 2 +- Source/WebKit/android/jni/JavaBridge.cpp | 22 ++-- Source/WebKit/android/jni/JniUtil.cpp | 2 +- Source/WebKit/android/jni/MIMETypeRegistry.cpp | 4 +- Source/WebKit/android/jni/MockGeolocation.cpp | 2 +- Source/WebKit/android/jni/WebCoreFrameBridge.cpp | 132 ++++++++++----------- Source/WebKit/android/jni/WebCoreJni.cpp | 2 +- Source/WebKit/android/jni/WebCoreJniOnLoad.cpp | 2 +- .../WebKit/android/jni/WebCoreResourceLoader.cpp | 24 ++-- Source/WebKit/android/jni/WebHistory.cpp | 68 +++++------ Source/WebKit/android/jni/WebIconDatabase.cpp | 10 +- Source/WebKit/android/jni/WebSettings.cpp | 74 ++++++------ Source/WebKit/android/jni/WebStorage.cpp | 2 +- Source/WebKit/android/jni/WebViewCore.cpp | 126 ++++++++++---------- Source/WebKit/android/nav/WebView.cpp | 78 ++++++------ Source/WebKit/android/smoke/MessageThread.cpp | 2 +- Source/WebKit/android/wds/client/AdbConnection.cpp | 4 +- 22 files changed, 289 insertions(+), 299 deletions(-) diff --git a/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h b/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h index e59fe09..171434b 100644 --- a/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h +++ b/Source/WebKit/android/WebCoreSupport/ChromiumIncludes.h @@ -23,28 +23,23 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +// All source files wishing to include Chromium headers must include this file +// and must not incude Chromium headers directly. + #ifndef ChromiumIncludes_h #define ChromiumIncludes_h #include "config.h" -// Include all external/chromium files in this file so the problems with the LOG -// and LOG_ASSERT defines can be handled in one place. - -// Undefine LOG and LOG_ASSERT before including chrome code, and if they were -// defined attempt to set the macros to the Android logging macros (which are -// the only ones that actually log). +// Undefine LOG before including chrome code, and if it was defined attempt to +// set the macro to the Android logging macro (which is the only one that +// actually logs). #ifdef LOG #define LOG_WAS_DEFINED LOG #undef LOG #endif -#ifdef LOG_ASSERT -#define LOG_ASSERT_WAS_DEFINED LOG_ASSERT -#undef LOG_ASSERT -#endif - // Chromium won't build without NDEBUG set, so we set it for all source files // that use Chromium code. This means that if NDEBUG was previously unset, we // have to redefine ASSERT() to a no-op, as this is enabled in debug builds. @@ -115,9 +110,4 @@ #define LOG(priority, tag, ...) LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__) #endif -#undef LOG_ASSERT -#if defined(LOG_ASSERT_WAS_DEFINED) && defined(LOG_FATAL_IF) -#define LOG_ASSERT(cond, ...) LOG_FATAL_IF(!(cond), ## __VA_ARGS__) -#endif - #endif diff --git a/Source/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp b/Source/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp index 9de9314..5df0ed2 100644 --- a/Source/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp +++ b/Source/WebKit/android/WebCoreSupport/WebUrlLoaderClient.cpp @@ -157,11 +157,11 @@ WebUrlLoaderClient::WebUrlLoaderClient(WebFrame* webFrame, WebCore::ResourceHand break; #if ENABLE(BLOB) case FormDataElement::encodedBlob: - LOG_ASSERT(false, "Unexpected use of FormDataElement::encodedBlob"); + ALOG_ASSERT(false, "Unexpected use of FormDataElement::encodedBlob"); break; #endif // ENABLE(BLOB) default: - LOG_ASSERT(false, "Unexpected default case in WebUrlLoaderClient.cpp"); + ALOG_ASSERT(false, "Unexpected default case in WebUrlLoaderClient.cpp"); break; } } diff --git a/Source/WebKit/android/jni/CacheManager.cpp b/Source/WebKit/android/jni/CacheManager.cpp index f600d00..d319054 100644 --- a/Source/WebKit/android/jni/CacheManager.cpp +++ b/Source/WebKit/android/jni/CacheManager.cpp @@ -133,7 +133,7 @@ int registerCacheManager(JNIEnv* env) { #ifndef NDEBUG jclass cacheManager = env->FindClass(javaCacheManagerClass); - LOG_ASSERT(cacheManager, "Unable to find class"); + ALOG_ASSERT(cacheManager, "Unable to find class"); env->DeleteLocalRef(cacheManager); #endif return jniRegisterNativeMethods(env, javaCacheManagerClass, gCacheManagerMethods, NELEM(gCacheManagerMethods)); diff --git a/Source/WebKit/android/jni/CookieManager.cpp b/Source/WebKit/android/jni/CookieManager.cpp index f8c2dee..357d158 100644 --- a/Source/WebKit/android/jni/CookieManager.cpp +++ b/Source/WebKit/android/jni/CookieManager.cpp @@ -192,7 +192,7 @@ int registerCookieManager(JNIEnv* env) { #ifndef NDEBUG jclass cookieManager = env->FindClass(javaCookieManagerClass); - LOG_ASSERT(cookieManager, "Unable to find class"); + ALOG_ASSERT(cookieManager, "Unable to find class"); env->DeleteLocalRef(cookieManager); #endif return jniRegisterNativeMethods(env, javaCookieManagerClass, gCookieManagerMethods, NELEM(gCookieManagerMethods)); diff --git a/Source/WebKit/android/jni/DeviceMotionAndOrientationManager.cpp b/Source/WebKit/android/jni/DeviceMotionAndOrientationManager.cpp index 8beb372..bd63f59 100644 --- a/Source/WebKit/android/jni/DeviceMotionAndOrientationManager.cpp +++ b/Source/WebKit/android/jni/DeviceMotionAndOrientationManager.cpp @@ -161,7 +161,7 @@ int registerDeviceMotionAndOrientationManager(JNIEnv* env) { #ifndef NDEBUG jclass deviceMotionAndOrientationManager = env->FindClass(javaDeviceMotionAndOrientationManagerClass); - LOG_ASSERT(deviceMotionAndOrientationManager, "Unable to find class"); + ALOG_ASSERT(deviceMotionAndOrientationManager, "Unable to find class"); env->DeleteLocalRef(deviceMotionAndOrientationManager); #endif diff --git a/Source/WebKit/android/jni/GeolocationPermissionsBridge.cpp b/Source/WebKit/android/jni/GeolocationPermissionsBridge.cpp index a366601..2c1db3f 100755 --- a/Source/WebKit/android/jni/GeolocationPermissionsBridge.cpp +++ b/Source/WebKit/android/jni/GeolocationPermissionsBridge.cpp @@ -102,7 +102,7 @@ int registerGeolocationPermissions(JNIEnv* env) const char* kGeolocationPermissionsClass = "android/webkit/GeolocationPermissions"; #ifndef NDEBUG jclass geolocationPermissions = env->FindClass(kGeolocationPermissionsClass); - LOG_ASSERT(geolocationPermissions, "Unable to find class"); + ALOG_ASSERT(geolocationPermissions, "Unable to find class"); env->DeleteLocalRef(geolocationPermissions); #endif diff --git a/Source/WebKit/android/jni/JavaBridge.cpp b/Source/WebKit/android/jni/JavaBridge.cpp index 60f4523..204ac4e 100644 --- a/Source/WebKit/android/jni/JavaBridge.cpp +++ b/Source/WebKit/android/jni/JavaBridge.cpp @@ -145,15 +145,15 @@ JavaBridge::JavaBridge(JNIEnv* env, jobject obj) mResolveFilePathForContentUri = env->GetMethodID(clazz, "resolveFilePathForContentUri", "(Ljava/lang/String;)Ljava/lang/String;"); env->DeleteLocalRef(clazz); - LOG_ASSERT(mSetSharedTimer, "Could not find method setSharedTimer"); - LOG_ASSERT(mStopSharedTimer, "Could not find method stopSharedTimer"); - LOG_ASSERT(mSetCookies, "Could not find method setCookies"); - LOG_ASSERT(mCookies, "Could not find method cookies"); - LOG_ASSERT(mCookiesEnabled, "Could not find method cookiesEnabled"); - LOG_ASSERT(mGetPluginDirectories, "Could not find method getPluginDirectories"); - LOG_ASSERT(mGetPluginSharedDataDirectory, "Could not find method getPluginSharedDataDirectory"); - LOG_ASSERT(mGetKeyStrengthList, "Could not find method getKeyStrengthList"); - LOG_ASSERT(mGetSignedPublicKey, "Could not find method getSignedPublicKey"); + ALOG_ASSERT(mSetSharedTimer, "Could not find method setSharedTimer"); + ALOG_ASSERT(mStopSharedTimer, "Could not find method stopSharedTimer"); + ALOG_ASSERT(mSetCookies, "Could not find method setCookies"); + ALOG_ASSERT(mCookies, "Could not find method cookies"); + ALOG_ASSERT(mCookiesEnabled, "Could not find method cookiesEnabled"); + ALOG_ASSERT(mGetPluginDirectories, "Could not find method getPluginDirectories"); + ALOG_ASSERT(mGetPluginSharedDataDirectory, "Could not find method getPluginSharedDataDirectory"); + ALOG_ASSERT(mGetKeyStrengthList, "Could not find method getKeyStrengthList"); + ALOG_ASSERT(mGetSignedPublicKey, "Could not find method getSignedPublicKey"); JavaSharedClient::SetTimerClient(this); JavaSharedClient::SetCookieClient(this); @@ -280,7 +280,7 @@ JavaBridge::getPluginSharedDataDirectory() void JavaBridge::setSharedTimerCallback(void (*f)()) { - LOG_ASSERT(!sSharedTimerFiredCallback || sSharedTimerFiredCallback==f, + ALOG_ASSERT(!sSharedTimerFiredCallback || sSharedTimerFiredCallback==f, "Shared timer callback may already be set or null!"); sSharedTimerFiredCallback = f; @@ -360,7 +360,7 @@ void JavaBridge::Finalize(JNIEnv* env, jobject obj) { JavaBridge* javaBridge = (JavaBridge*) (env->GetIntField(obj, gJavaBridge_ObjectID)); - LOG_ASSERT(javaBridge, "Finalize should not be called twice for the same java bridge!"); + ALOG_ASSERT(javaBridge, "Finalize should not be called twice for the same java bridge!"); ALOGV("webcore_javabridge::nativeFinalize(%p)\n", javaBridge); delete javaBridge; env->SetIntField(obj, gJavaBridge_ObjectID, 0); diff --git a/Source/WebKit/android/jni/JniUtil.cpp b/Source/WebKit/android/jni/JniUtil.cpp index ee1e3f9..651016e 100644 --- a/Source/WebKit/android/jni/JniUtil.cpp +++ b/Source/WebKit/android/jni/JniUtil.cpp @@ -49,7 +49,7 @@ int registerJniUtil(JNIEnv* env) { #ifndef NDEBUG jclass jniUtil = env->FindClass(javaJniUtilClass); - LOG_ASSERT(jniUtil, "Unable to find class"); + ALOG_ASSERT(jniUtil, "Unable to find class"); env->DeleteLocalRef(jniUtil); #endif return jniRegisterNativeMethods(env, javaJniUtilClass, gJniUtilMethods, NELEM(gJniUtilMethods)); diff --git a/Source/WebKit/android/jni/MIMETypeRegistry.cpp b/Source/WebKit/android/jni/MIMETypeRegistry.cpp index cbfef6c..2734aeb 100644 --- a/Source/WebKit/android/jni/MIMETypeRegistry.cpp +++ b/Source/WebKit/android/jni/MIMETypeRegistry.cpp @@ -44,11 +44,11 @@ String MIMETypeRegistry::getMIMETypeForExtension(const String& ext) ASSERT(isMainThread()); JNIEnv* env = JSC::Bindings::getJNIEnv(); jclass mimeClass = env->FindClass("android/webkit/MimeTypeMap"); - LOG_ASSERT(mimeClass, "Could not find class MimeTypeMap"); + ALOG_ASSERT(mimeClass, "Could not find class MimeTypeMap"); jmethodID mimeTypeFromExtension = env->GetStaticMethodID(mimeClass, "mimeTypeFromExtension", "(Ljava/lang/String;)Ljava/lang/String;"); - LOG_ASSERT(mimeTypeFromExtension, + ALOG_ASSERT(mimeTypeFromExtension, "Could not find method mimeTypeFromExtension"); jstring extString = wtfStringToJstring(env, ext); jobject mimeType = env->CallStaticObjectMethod(mimeClass, diff --git a/Source/WebKit/android/jni/MockGeolocation.cpp b/Source/WebKit/android/jni/MockGeolocation.cpp index 1370715..250953f 100755 --- a/Source/WebKit/android/jni/MockGeolocation.cpp +++ b/Source/WebKit/android/jni/MockGeolocation.cpp @@ -74,7 +74,7 @@ int registerMockGeolocation(JNIEnv* env) { #ifndef NDEBUG jclass mockGeolocation = env->FindClass(javaMockGeolocationClass); - LOG_ASSERT(mockGeolocation, "Unable to find class"); + ALOG_ASSERT(mockGeolocation, "Unable to find class"); env->DeleteLocalRef(mockGeolocation); #endif diff --git a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp index ae430d7..adacb49 100644 --- a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -296,38 +296,38 @@ WebFrame::WebFrame(JNIEnv* env, jobject obj, jobject historyList, WebCore::Page* "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); env->DeleteLocalRef(clazz); - LOG_ASSERT(mJavaFrame->mStartLoadingResource, "Could not find method startLoadingResource"); - LOG_ASSERT(mJavaFrame->mMaybeSavePassword, "Could not find method maybeSavePassword"); - LOG_ASSERT(mJavaFrame->mShouldInterceptRequest, "Could not find method shouldInterceptRequest"); - LOG_ASSERT(mJavaFrame->mLoadStarted, "Could not find method loadStarted"); - LOG_ASSERT(mJavaFrame->mTransitionToCommitted, "Could not find method transitionToCommitted"); - LOG_ASSERT(mJavaFrame->mLoadFinished, "Could not find method loadFinished"); - LOG_ASSERT(mJavaFrame->mReportError, "Could not find method reportError"); - LOG_ASSERT(mJavaFrame->mSetTitle, "Could not find method setTitle"); - LOG_ASSERT(mJavaFrame->mWindowObjectCleared, "Could not find method windowObjectCleared"); - LOG_ASSERT(mJavaFrame->mSetProgress, "Could not find method setProgress"); - LOG_ASSERT(mJavaFrame->mDidReceiveIcon, "Could not find method didReceiveIcon"); - LOG_ASSERT(mJavaFrame->mDidReceiveTouchIconUrl, "Could not find method didReceiveTouchIconUrl"); - LOG_ASSERT(mJavaFrame->mUpdateVisitedHistory, "Could not find method updateVisitedHistory"); - LOG_ASSERT(mJavaFrame->mHandleUrl, "Could not find method handleUrl"); - LOG_ASSERT(mJavaFrame->mCreateWindow, "Could not find method createWindow"); - LOG_ASSERT(mJavaFrame->mCloseWindow, "Could not find method closeWindow"); - LOG_ASSERT(mJavaFrame->mDecidePolicyForFormResubmission, "Could not find method decidePolicyForFormResubmission"); - LOG_ASSERT(mJavaFrame->mRequestFocus, "Could not find method requestFocus"); - LOG_ASSERT(mJavaFrame->mGetRawResFilename, "Could not find method getRawResFilename"); - LOG_ASSERT(mJavaFrame->mDensity, "Could not find method density"); - LOG_ASSERT(mJavaFrame->mGetFileSize, "Could not find method getFileSize"); - LOG_ASSERT(mJavaFrame->mGetFile, "Could not find method getFile"); - LOG_ASSERT(mJavaFrame->mDidReceiveAuthenticationChallenge, "Could not find method didReceiveAuthenticationChallenge"); - LOG_ASSERT(mJavaFrame->mReportSslCertError, "Could not find method reportSslCertError"); - LOG_ASSERT(mJavaFrame->mRequestClientCert, "Could not find method requestClientCert"); - LOG_ASSERT(mJavaFrame->mDownloadStart, "Could not find method downloadStart"); - LOG_ASSERT(mJavaFrame->mDidReceiveData, "Could not find method didReceiveData"); - LOG_ASSERT(mJavaFrame->mDidFinishLoading, "Could not find method didFinishLoading"); - LOG_ASSERT(mJavaFrame->mSetCertificate, "Could not find method setCertificate"); - LOG_ASSERT(mJavaFrame->mShouldSaveFormData, "Could not find method shouldSaveFormData"); - LOG_ASSERT(mJavaFrame->mSaveFormData, "Could not find method saveFormData"); - LOG_ASSERT(mJavaFrame->mAutoLogin, "Could not find method autoLogin"); + ALOG_ASSERT(mJavaFrame->mStartLoadingResource, "Could not find method startLoadingResource"); + ALOG_ASSERT(mJavaFrame->mMaybeSavePassword, "Could not find method maybeSavePassword"); + ALOG_ASSERT(mJavaFrame->mShouldInterceptRequest, "Could not find method shouldInterceptRequest"); + ALOG_ASSERT(mJavaFrame->mLoadStarted, "Could not find method loadStarted"); + ALOG_ASSERT(mJavaFrame->mTransitionToCommitted, "Could not find method transitionToCommitted"); + ALOG_ASSERT(mJavaFrame->mLoadFinished, "Could not find method loadFinished"); + ALOG_ASSERT(mJavaFrame->mReportError, "Could not find method reportError"); + ALOG_ASSERT(mJavaFrame->mSetTitle, "Could not find method setTitle"); + ALOG_ASSERT(mJavaFrame->mWindowObjectCleared, "Could not find method windowObjectCleared"); + ALOG_ASSERT(mJavaFrame->mSetProgress, "Could not find method setProgress"); + ALOG_ASSERT(mJavaFrame->mDidReceiveIcon, "Could not find method didReceiveIcon"); + ALOG_ASSERT(mJavaFrame->mDidReceiveTouchIconUrl, "Could not find method didReceiveTouchIconUrl"); + ALOG_ASSERT(mJavaFrame->mUpdateVisitedHistory, "Could not find method updateVisitedHistory"); + ALOG_ASSERT(mJavaFrame->mHandleUrl, "Could not find method handleUrl"); + ALOG_ASSERT(mJavaFrame->mCreateWindow, "Could not find method createWindow"); + ALOG_ASSERT(mJavaFrame->mCloseWindow, "Could not find method closeWindow"); + ALOG_ASSERT(mJavaFrame->mDecidePolicyForFormResubmission, "Could not find method decidePolicyForFormResubmission"); + ALOG_ASSERT(mJavaFrame->mRequestFocus, "Could not find method requestFocus"); + ALOG_ASSERT(mJavaFrame->mGetRawResFilename, "Could not find method getRawResFilename"); + ALOG_ASSERT(mJavaFrame->mDensity, "Could not find method density"); + ALOG_ASSERT(mJavaFrame->mGetFileSize, "Could not find method getFileSize"); + ALOG_ASSERT(mJavaFrame->mGetFile, "Could not find method getFile"); + ALOG_ASSERT(mJavaFrame->mDidReceiveAuthenticationChallenge, "Could not find method didReceiveAuthenticationChallenge"); + ALOG_ASSERT(mJavaFrame->mReportSslCertError, "Could not find method reportSslCertError"); + ALOG_ASSERT(mJavaFrame->mRequestClientCert, "Could not find method requestClientCert"); + ALOG_ASSERT(mJavaFrame->mDownloadStart, "Could not find method downloadStart"); + ALOG_ASSERT(mJavaFrame->mDidReceiveData, "Could not find method didReceiveData"); + ALOG_ASSERT(mJavaFrame->mDidFinishLoading, "Could not find method didFinishLoading"); + ALOG_ASSERT(mJavaFrame->mSetCertificate, "Could not find method setCertificate"); + ALOG_ASSERT(mJavaFrame->mShouldSaveFormData, "Could not find method shouldSaveFormData"); + ALOG_ASSERT(mJavaFrame->mSaveFormData, "Could not find method saveFormData"); + ALOG_ASSERT(mJavaFrame->mAutoLogin, "Could not find method autoLogin"); mUserAgent = WTF::String(); mUserInitiatedAction = false; @@ -357,14 +357,14 @@ WebFrame* WebFrame::getWebFrame(const WebCore::Frame* frame) static jobject createJavaMapFromHTTPHeaders(JNIEnv* env, const WebCore::HTTPHeaderMap& map) { jclass mapClass = env->FindClass("java/util/HashMap"); - LOG_ASSERT(mapClass, "Could not find HashMap class!"); + ALOG_ASSERT(mapClass, "Could not find HashMap class!"); jmethodID init = env->GetMethodID(mapClass, "", "(I)V"); - LOG_ASSERT(init, "Could not find constructor for HashMap"); + ALOG_ASSERT(init, "Could not find constructor for HashMap"); jobject hashMap = env->NewObject(mapClass, init, map.size()); - LOG_ASSERT(hashMap, "Could not create a new HashMap"); + ALOG_ASSERT(hashMap, "Could not create a new HashMap"); jmethodID put = env->GetMethodID(mapClass, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); - LOG_ASSERT(put, "Could not find put method on HashMap"); + ALOG_ASSERT(put, "Could not find put method on HashMap"); WebCore::HTTPHeaderMap::const_iterator end = map.end(); for (WebCore::HTTPHeaderMap::const_iterator i = map.begin(); i != end; ++i) { @@ -732,7 +732,7 @@ WebFrame::userAgentForURL(const WebCore::KURL* url) void WebFrame::didReceiveIcon(WebCore::Image* icon) { - LOG_ASSERT(icon, "DidReceiveIcon called without an image!"); + ALOG_ASSERT(icon, "DidReceiveIcon called without an image!"); JNIEnv* env = getJNIEnv(); AutoJObject javaFrame = mJavaFrame->frame(env); if (!javaFrame.get()) @@ -1183,9 +1183,9 @@ jbyteArray WebFrame::getPostData(const WebCore::ResourceRequest& request) static void CallPolicyFunction(JNIEnv* env, jobject obj, jint func, jint decision) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "nativeCallPolicyFunction must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "nativeCallPolicyFunction must take a valid frame pointer!"); PolicyFunctionWrapper* pFunc = (PolicyFunctionWrapper*)func; - LOG_ASSERT(pFunc, "nativeCallPolicyFunction must take a valid function pointer!"); + ALOG_ASSERT(pFunc, "nativeCallPolicyFunction must take a valid function pointer!"); // If we are resending the form then we should reset the multiple submission protection. if (decision == WebCore::PolicyUse) @@ -1287,7 +1287,7 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss static void DestroyFrame(JNIEnv* env, jobject obj) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "nativeDestroyFrame must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "nativeDestroyFrame must take a valid frame pointer!"); ALOGV("::WebCore:: deleting frame %p", pFrame); @@ -1315,7 +1315,7 @@ static void DestroyFrame(JNIEnv* env, jobject obj) static void LoadUrl(JNIEnv *env, jobject obj, jstring url, jobject headers) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "nativeLoadUrl must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "nativeLoadUrl must take a valid frame pointer!"); WTF::String webcoreUrl = jstringToWtfString(env, url); WebCore::KURL kurl(WebCore::KURL(), webcoreUrl); @@ -1366,7 +1366,7 @@ static void LoadUrl(JNIEnv *env, jobject obj, jstring url, jobject headers) static void PostUrl(JNIEnv *env, jobject obj, jstring url, jbyteArray postData) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "nativePostUrl must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "nativePostUrl must take a valid frame pointer!"); WebCore::KURL kurl(WebCore::KURL(), jstringToWtfString(env, url)); WebCore::ResourceRequest request(kurl); @@ -1393,7 +1393,7 @@ static void LoadData(JNIEnv *env, jobject obj, jstring baseUrl, jstring data, jstring mimeType, jstring encoding, jstring failUrl) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "nativeLoadData must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "nativeLoadData must take a valid frame pointer!"); // Setup the resource request WebCore::ResourceRequest request(jstringToWtfString(env, baseUrl)); @@ -1402,7 +1402,7 @@ static void LoadData(JNIEnv *env, jobject obj, jstring baseUrl, jstring data, const char* dataStr = env->GetStringUTFChars(data, NULL); WTF::RefPtr sharedBuffer = WebCore::SharedBuffer::create(); - LOG_ASSERT(dataStr, "nativeLoadData has a null data string."); + ALOG_ASSERT(dataStr, "nativeLoadData has a null data string."); sharedBuffer->append(dataStr, strlen(dataStr)); env->ReleaseStringUTFChars(data, dataStr); @@ -1417,7 +1417,7 @@ static void LoadData(JNIEnv *env, jobject obj, jstring baseUrl, jstring data, static void StopLoading(JNIEnv *env, jobject obj) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "nativeStopLoading must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "nativeStopLoading must take a valid frame pointer!"); ALOGV("::WebCore:: stopLoading %p", pFrame); // Stop loading the page and do not send an unload event @@ -1466,7 +1466,7 @@ static jstring SaveWebArchive(JNIEnv *env, jobject obj, jstring basename, jboole { #if ENABLE(WEB_ARCHIVE) WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "nativeSaveWebArchive must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "nativeSaveWebArchive must take a valid frame pointer!"); String mimeType = pFrame->loader()->documentLoader()->mainResource()->mimeType(); if ((mimeType != "text/html") && (mimeType != "application/xhtml+xml")) return NULL; @@ -1514,7 +1514,7 @@ static jstring SaveWebArchive(JNIEnv *env, jobject obj, jstring basename, jboole static jstring ExternalRepresentation(JNIEnv *env, jobject obj) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "android_webcore_nativeExternalRepresentation must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "android_webcore_nativeExternalRepresentation must take a valid frame pointer!"); // Request external representation of the render tree WTF::String renderDump = WebCore::externalRepresentation(pFrame); @@ -1546,7 +1546,7 @@ static StringBuilder FrameAsText(WebCore::Frame *pFrame, jboolean dumpChildFrame static jstring DocumentAsText(JNIEnv *env, jobject obj) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "android_webcore_nativeDocumentAsText must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "android_webcore_nativeDocumentAsText must take a valid frame pointer!"); WTF::String renderDump = FrameAsText(pFrame, false /* dumpChildFrames */).toString(); return wtfStringToJstring(env, renderDump); @@ -1555,7 +1555,7 @@ static jstring DocumentAsText(JNIEnv *env, jobject obj) static jstring ChildFramesAsText(JNIEnv *env, jobject obj) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "android_webcore_nativeDocumentAsText must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "android_webcore_nativeDocumentAsText must take a valid frame pointer!"); StringBuilder renderDumpBuilder; for (unsigned i = 0; i < pFrame->tree()->childCount(); ++i) { @@ -1568,7 +1568,7 @@ static jstring ChildFramesAsText(JNIEnv *env, jobject obj) static void Reload(JNIEnv *env, jobject obj, jboolean allowStale) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "nativeReload must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "nativeReload must take a valid frame pointer!"); WebCore::FrameLoader* loader = pFrame->loader(); if (allowStale) { @@ -1585,7 +1585,7 @@ static void Reload(JNIEnv *env, jobject obj, jboolean allowStale) static void GoBackOrForward(JNIEnv *env, jobject obj, jint pos) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "nativeGoBackOrForward must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "nativeGoBackOrForward must take a valid frame pointer!"); if (pos == 1) pFrame->page()->goForward(); @@ -1598,7 +1598,7 @@ static void GoBackOrForward(JNIEnv *env, jobject obj, jint pos) static jobject StringByEvaluatingJavaScriptFromString(JNIEnv *env, jobject obj, jstring script) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "stringByEvaluatingJavaScriptFromString must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "stringByEvaluatingJavaScriptFromString must take a valid frame pointer!"); WebCore::ScriptValue value = pFrame->script()->executeScript(jstringToWtfString(env, script), true); @@ -1649,7 +1649,7 @@ private: } ~WeakJavaInstance() { - LOG_ASSERT(!m_beginEndDepth, "Unbalanced calls to WeakJavaInstance::begin() / end()"); + ALOG_ASSERT(!m_beginEndDepth, "Unbalanced calls to WeakJavaInstance::begin() / end()"); JNIEnv* env = getJNIEnv(); // The JavaInstance destructor attempts to delete the global ref stored // in m_instance. Since we replaced it in our constructor with a weak @@ -1705,7 +1705,7 @@ static void AddJavascriptInterface(JNIEnv *env, jobject obj, jint nativeFramePoi pFrame = GET_NATIVE_FRAME(env, obj); else pFrame = (WebCore::Frame*)nativeFramePointer; - LOG_ASSERT(pFrame, "nativeAddJavascriptInterface must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "nativeAddJavascriptInterface must take a valid frame pointer!"); JavaVM* vm; env->GetJavaVM(&vm); @@ -1810,7 +1810,7 @@ static void ClearCache(JNIEnv *env, jobject obj) static jboolean DocumentHasImages(JNIEnv *env, jobject obj) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "DocumentHasImages must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "DocumentHasImages must take a valid frame pointer!"); return pFrame->document()->images()->length() > 0; } @@ -1818,7 +1818,7 @@ static jboolean DocumentHasImages(JNIEnv *env, jobject obj) static jboolean HasPasswordField(JNIEnv *env, jobject obj) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "HasPasswordField must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "HasPasswordField must take a valid frame pointer!"); bool found = false; WTF::RefPtr form = pFrame->document()->forms(); @@ -1845,7 +1845,7 @@ static jboolean HasPasswordField(JNIEnv *env, jobject obj) static jobjectArray GetUsernamePassword(JNIEnv *env, jobject obj) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "GetUsernamePassword must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "GetUsernamePassword must take a valid frame pointer!"); jobjectArray strArray = NULL; WTF::String username; WTF::String password; @@ -1863,7 +1863,7 @@ static void SetUsernamePassword(JNIEnv *env, jobject obj, jstring username, jstring password) { WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj); - LOG_ASSERT(pFrame, "SetUsernamePassword must take a valid frame pointer!"); + ALOG_ASSERT(pFrame, "SetUsernamePassword must take a valid frame pointer!"); WebCore::HTMLInputElement* usernameEle = NULL; WebCore::HTMLInputElement* passwordEle = NULL; @@ -1908,14 +1908,14 @@ WebFrame::saveFormData(HTMLFormElement* form) if (form->autoComplete()) { JNIEnv* env = getJNIEnv(); jclass mapClass = env->FindClass("java/util/HashMap"); - LOG_ASSERT(mapClass, "Could not find HashMap class!"); + ALOG_ASSERT(mapClass, "Could not find HashMap class!"); jmethodID init = env->GetMethodID(mapClass, "", "(I)V"); - LOG_ASSERT(init, "Could not find constructor for HashMap"); + ALOG_ASSERT(init, "Could not find constructor for HashMap"); jobject hashMap = env->NewObject(mapClass, init, 1); - LOG_ASSERT(hashMap, "Could not create a new HashMap"); + ALOG_ASSERT(hashMap, "Could not create a new HashMap"); jmethodID put = env->GetMethodID(mapClass, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); - LOG_ASSERT(put, "Could not find put method on HashMap"); + ALOG_ASSERT(put, "Could not find put method on HashMap"); WTF::Vector elements = form->associatedElements(); size_t size = elements.size(); for (size_t i = 0; i < size; i++) { @@ -1930,7 +1930,7 @@ WebFrame::saveFormData(HTMLFormElement* form) const WTF::AtomicString& name = input->name(); jstring key = wtfStringToJstring(env, name); jstring val = wtfStringToJstring(env, value); - LOG_ASSERT(key && val, "name or value not set"); + ALOG_ASSERT(key && val, "name or value not set"); env->CallObjectMethod(hashMap, put, key, val); env->DeleteLocalRef(key); env->DeleteLocalRef(val); @@ -1960,7 +1960,7 @@ static jboolean GetShouldStartScrolledRight(JNIEnv *env, jobject obj, if (document) { RenderStyle* style = document->renderer()->style(); WritingMode writingMode = style->writingMode(); - LOG_ASSERT(writingMode != WebCore::BottomToTopWritingMode, + ALOG_ASSERT(writingMode != WebCore::BottomToTopWritingMode, "BottomToTopWritingMode isn't possible in any " "language and cannot be specified in w3c writing-mode."); if (writingMode == WebCore::RightToLeftWritingMode) @@ -2176,9 +2176,9 @@ static JNINativeMethod gBrowserFrameNativeMethods[] = { int registerWebFrame(JNIEnv* env) { jclass clazz = env->FindClass("android/webkit/BrowserFrame"); - LOG_ASSERT(clazz, "Cannot find BrowserFrame"); + ALOG_ASSERT(clazz, "Cannot find BrowserFrame"); gFrameField = env->GetFieldID(clazz, "mNativeFrame", "I"); - LOG_ASSERT(gFrameField, "Cannot find mNativeFrame on BrowserFrame"); + ALOG_ASSERT(gFrameField, "Cannot find mNativeFrame on BrowserFrame"); env->DeleteLocalRef(clazz); return jniRegisterNativeMethods(env, "android/webkit/BrowserFrame", diff --git a/Source/WebKit/android/jni/WebCoreJni.cpp b/Source/WebKit/android/jni/WebCoreJni.cpp index b60cb4d..10b3e95 100644 --- a/Source/WebKit/android/jni/WebCoreJni.cpp +++ b/Source/WebKit/android/jni/WebCoreJni.cpp @@ -38,7 +38,7 @@ namespace android { AutoJObject getRealObject(JNIEnv* env, jobject obj) { jobject real = env->NewLocalRef(obj); - LOG_ASSERT(real, "The real object has been deleted!"); + ALOG_ASSERT(real, "The real object has been deleted!"); return AutoJObject(env, real); } diff --git a/Source/WebKit/android/jni/WebCoreJniOnLoad.cpp b/Source/WebKit/android/jni/WebCoreJniOnLoad.cpp index 69280d5..fb959ac 100644 --- a/Source/WebKit/android/jni/WebCoreJniOnLoad.cpp +++ b/Source/WebKit/android/jni/WebCoreJniOnLoad.cpp @@ -144,7 +144,7 @@ EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) ALOGE("GetEnv failed!"); return result; } - LOG_ASSERT(env, "Could not retrieve the env!"); + ALOG_ASSERT(env, "Could not retrieve the env!"); const RegistrationMethod* method = gWebCoreRegMethods; const RegistrationMethod* end = method + sizeof(gWebCoreRegMethods)/sizeof(RegistrationMethod); diff --git a/Source/WebKit/android/jni/WebCoreResourceLoader.cpp b/Source/WebKit/android/jni/WebCoreResourceLoader.cpp index 3aa4422..f0861ff 100644 --- a/Source/WebKit/android/jni/WebCoreResourceLoader.cpp +++ b/Source/WebKit/android/jni/WebCoreResourceLoader.cpp @@ -131,9 +131,9 @@ bool WebCoreResourceLoader::willLoadFromCache(const WebCore::KURL& url, int64_t void WebCoreResourceLoader::SetResponseHeader(JNIEnv* env, jobject obj, jint nativeResponse, jstring key, jstring val) { WebCore::ResourceResponse* response = (WebCore::ResourceResponse*)nativeResponse; - LOG_ASSERT(response, "nativeSetResponseHeader must take a valid response pointer!"); + ALOG_ASSERT(response, "nativeSetResponseHeader must take a valid response pointer!"); - LOG_ASSERT(key, "How did a null value become a key?"); + ALOG_ASSERT(key, "How did a null value become a key?"); if (val) response->setHTTPHeaderField(jstringToWtfString(env, key), jstringToWtfString(env, val)); } @@ -142,7 +142,7 @@ jint WebCoreResourceLoader::CreateResponse(JNIEnv* env, jobject obj, jstring url jstring statusText, jstring mimeType, jlong expectedLength, jstring encoding) { - LOG_ASSERT(url, "Must have a url in the response!"); + ALOG_ASSERT(url, "Must have a url in the response!"); WebCore::KURL kurl(WebCore::ParsedURLString, jstringToWtfString(env, url)); WTF::String encodingStr; WTF::String mimeTypeStr; @@ -169,13 +169,13 @@ jint WebCoreResourceLoader::CreateResponse(JNIEnv* env, jobject obj, jstring url void WebCoreResourceLoader::ReceivedResponse(JNIEnv* env, jobject obj, jint nativeResponse) { WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj); - LOG_ASSERT(handle, "nativeReceivedResponse must take a valid handle!"); + ALOG_ASSERT(handle, "nativeReceivedResponse must take a valid handle!"); // ResourceLoader::didFail() can set handle to be NULL, we need to check if (!handle) return; WebCore::ResourceResponse* response = (WebCore::ResourceResponse*)nativeResponse; - LOG_ASSERT(response, "nativeReceivedResponse must take a valid resource pointer!"); + ALOG_ASSERT(response, "nativeReceivedResponse must take a valid resource pointer!"); handle->client()->didReceiveResponse(handle, *response); // As the client makes a copy of the response, delete it here. delete response; @@ -186,7 +186,7 @@ void WebCoreResourceLoader::AddData(JNIEnv* env, jobject obj, jbyteArray dataArr ALOGV("webcore_resourceloader data(%d)", length); WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj); - LOG_ASSERT(handle, "nativeAddData must take a valid handle!"); + ALOG_ASSERT(handle, "nativeAddData must take a valid handle!"); // ResourceLoader::didFail() can set handle to be NULL, we need to check if (!handle) return; @@ -196,7 +196,7 @@ void WebCoreResourceLoader::AddData(JNIEnv* env, jobject obj, jbyteArray dataArr bool result = false; jbyte * data = env->GetByteArrayElements(dataArray, NULL); - LOG_ASSERT(handle->client(), "Why do we not have a client?"); + ALOG_ASSERT(handle->client(), "Why do we not have a client?"); handle->client()->didReceiveData(handle, (const char *)data, length, length); env->ReleaseByteArrayElements(dataArray, data, JNI_ABORT); } @@ -205,12 +205,12 @@ void WebCoreResourceLoader::Finished(JNIEnv* env, jobject obj) { ALOGV("webcore_resourceloader finished"); WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj); - LOG_ASSERT(handle, "nativeFinished must take a valid handle!"); + ALOG_ASSERT(handle, "nativeFinished must take a valid handle!"); // ResourceLoader::didFail() can set handle to be NULL, we need to check if (!handle) return; - LOG_ASSERT(handle->client(), "Why do we not have a client?"); + ALOG_ASSERT(handle->client(), "Why do we not have a client?"); handle->client()->didFinishLoading(handle, 0); } @@ -219,12 +219,12 @@ jstring WebCoreResourceLoader::RedirectedToUrl(JNIEnv* env, jobject obj, { ALOGV("webcore_resourceloader redirectedToUrl"); WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj); - LOG_ASSERT(handle, "nativeRedirectedToUrl must take a valid handle!"); + ALOG_ASSERT(handle, "nativeRedirectedToUrl must take a valid handle!"); // ResourceLoader::didFail() can set handle to be NULL, we need to check if (!handle) return NULL; - LOG_ASSERT(handle->client(), "Why do we not have a client?"); + ALOG_ASSERT(handle->client(), "Why do we not have a client?"); WebCore::ResourceRequest r = handle->firstRequest(); WebCore::KURL url(WebCore::KURL(WebCore::ParsedURLString, jstringToWtfString(env, baseUrl)), jstringToWtfString(env, redirectTo)); @@ -255,7 +255,7 @@ void WebCoreResourceLoader::Error(JNIEnv* env, jobject obj, jint id, jstring des { ALOGV("webcore_resourceloader error"); WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj); - LOG_ASSERT(handle, "nativeError must take a valid handle!"); + ALOG_ASSERT(handle, "nativeError must take a valid handle!"); // ResourceLoader::didFail() can set handle to be NULL, we need to check if (!handle) return; diff --git a/Source/WebKit/android/jni/WebHistory.cpp b/Source/WebKit/android/jni/WebHistory.cpp index c0b1e6e..f782c37 100644 --- a/Source/WebKit/android/jni/WebHistory.cpp +++ b/Source/WebKit/android/jni/WebHistory.cpp @@ -78,7 +78,7 @@ struct WebBackForwardListFields { static void WebHistoryClose(JNIEnv* env, jobject obj, jint frame) { - LOG_ASSERT(frame, "Close needs a valid Frame pointer!"); + ALOG_ASSERT(frame, "Close needs a valid Frame pointer!"); WebCore::Frame* pFrame = (WebCore::Frame*)frame; WebCore::BackForwardListImpl* list = static_cast(pFrame->page()->backForwardList()); @@ -145,7 +145,7 @@ static void WebHistoryClose(JNIEnv* env, jobject obj, jint frame) static void WebHistoryRestoreIndex(JNIEnv* env, jobject obj, jint frame, jint index) { - LOG_ASSERT(frame, "RestoreState needs a valid Frame pointer!"); + ALOG_ASSERT(frame, "RestoreState needs a valid Frame pointer!"); WebCore::Frame* pFrame = (WebCore::Frame*)frame; WebCore::Page* page = pFrame->page(); WebCore::HistoryItem* currentItem = @@ -158,8 +158,8 @@ static void WebHistoryRestoreIndex(JNIEnv* env, jobject obj, jint frame, jint in static void WebHistoryInflate(JNIEnv* env, jobject obj, jint frame, jbyteArray data) { - LOG_ASSERT(frame, "Inflate needs a valid frame pointer!"); - LOG_ASSERT(data, "Inflate needs a valid data pointer!"); + ALOG_ASSERT(frame, "Inflate needs a valid frame pointer!"); + ALOG_ASSERT(data, "Inflate needs a valid data pointer!"); // Get the actual bytes and the length from the java array. const jbyte* bytes = env->GetByteArrayElements(data, NULL); @@ -204,7 +204,7 @@ jbyteArray WebHistory::Flatten(JNIEnv* env, WTF::Vector& v, WebCore::Histo // Write the top-level history item and then write all the children // recursively. - LOG_ASSERT(item->bridge(), "Why don't we have a bridge object here?"); + ALOG_ASSERT(item->bridge(), "Why don't we have a bridge object here?"); write_item(v, item); write_children_recursive(v, item); @@ -311,7 +311,7 @@ void WebHistoryItem::updateHistoryItem(WebCore::HistoryItem* item) { } static void historyItemChanged(WebCore::HistoryItem* item) { - LOG_ASSERT(item, "historyItemChanged called with a null item"); + ALOG_ASSERT(item, "historyItemChanged called with a null item"); if (item->bridge()) item->bridge()->updateHistoryItem(item); @@ -319,7 +319,7 @@ static void historyItemChanged(WebCore::HistoryItem* item) { void WebHistory::AddItem(const AutoJObject& list, WebCore::HistoryItem* item) { - LOG_ASSERT(item, "newItem must take a valid HistoryItem!"); + ALOG_ASSERT(item, "newItem must take a valid HistoryItem!"); // Item already added. Should only happen when we are inflating the list. if (item->bridge() || !list.get()) return; @@ -414,7 +414,7 @@ static void write_item(WTF::Vector& v, WebCore::HistoryItem* item) write_string(v, item->target()); AndroidWebHistoryBridge* bridge = item->bridge(); - LOG_ASSERT(bridge, "We should have a bridge here!"); + ALOG_ASSERT(bridge, "We should have a bridge here!"); // Screen scale const float scale = bridge->scale(); LOG_VERBOSE(History, "Writing scale %f", scale); @@ -455,7 +455,7 @@ static void write_children_recursive(WTF::Vector& v, WebCore::HistoryItem* WebCore::HistoryItemVector::const_iterator end = children.end(); for (WebCore::HistoryItemVector::const_iterator i = children.begin(); i != end; ++i) { WebCore::HistoryItem* item = (*i).get(); - LOG_ASSERT(parent->bridge(), + ALOG_ASSERT(parent->bridge(), "The parent item should have a bridge object!"); if (!item->bridge()) { WebHistoryItem* bridge = new WebHistoryItem(static_cast(parent->bridge())); @@ -467,7 +467,7 @@ static void write_children_recursive(WTF::Vector& v, WebCore::HistoryItem* // parent must not have a parent bridge. WebHistoryItem* bridge = static_cast(item->bridge()); WebHistoryItem* parentBridge = static_cast(parent->bridge()); - LOG_ASSERT(parentBridge->parent() == 0 || + ALOG_ASSERT(parentBridge->parent() == 0 || bridge->parent() == parentBridge, "Somehow this item has an incorrect parent"); bridge->setParent(parentBridge); @@ -602,7 +602,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem, return false; AndroidWebHistoryBridge* bridge = newItem->bridge(); - LOG_ASSERT(bridge, "There should be a bridge object during inflate"); + ALOG_ASSERT(bridge, "There should be a bridge object during inflate"); float fValue; // Read the screen scale memcpy(&fValue, data, sizeof(float)); @@ -716,67 +716,67 @@ static void unit_test() WTF::RefPtr item = WebCore::HistoryItem::create(); WebCore::HistoryItem* testItem = item.get(); testItem->setBridge(new WebHistoryItem(0)); - LOG_ASSERT(!read_item_recursive(testItem, &test1, 0), "0 length array should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &test1, 0), "0 length array should fail!"); delete[] test1; const char* test2 = new char[2]; - LOG_ASSERT(!read_item_recursive(testItem, &test2, 2), "Small array should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &test2, 2), "Small array should fail!"); delete[] test2; - LOG_ASSERT(!read_item_recursive(testItem, NULL, HISTORY_MIN_SIZE), "Null data should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, NULL, HISTORY_MIN_SIZE), "Null data should fail!"); // Original Url char* test3 = new char[HISTORY_MIN_SIZE]; const char* ptr = (const char*)test3; memset(test3, 0, HISTORY_MIN_SIZE); *(int*)test3 = 4000; - LOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length originalUrl should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length originalUrl should fail!"); // Url int offset = 4; memset(test3, 0, HISTORY_MIN_SIZE); ptr = (const char*)test3; *(int*)(test3 + offset) = 4000; - LOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length url should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length url should fail!"); // Title offset += 4; memset(test3, 0, HISTORY_MIN_SIZE); ptr = (const char*)test3; *(int*)(test3 + offset) = 4000; - LOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length title should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length title should fail!"); // Form content type offset += 4; memset(test3, 0, HISTORY_MIN_SIZE); ptr = (const char*)test3; *(int*)(test3 + offset) = 4000; - LOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length contentType should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length contentType should fail!"); // Form data offset += 4; memset(test3, 0, HISTORY_MIN_SIZE); ptr = (const char*)test3; *(int*)(test3 + offset) = 4000; - LOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length form data should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length form data should fail!"); // Target offset += 4; memset(test3, 0, HISTORY_MIN_SIZE); ptr = (const char*)test3; *(int*)(test3 + offset) = 4000; - LOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length target should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length target should fail!"); offset += 4; // Scale // Document state offset += 4; memset(test3, 0, HISTORY_MIN_SIZE); ptr = (const char*)test3; *(int*)(test3 + offset) = 4000; - LOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length document state should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 length document state should fail!"); // Is target item offset += 1; memset(test3, 0, HISTORY_MIN_SIZE); ptr = (const char*)test3; *(char*)(test3 + offset) = '!'; - LOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "IsTargetItem should fail with ! as the value!"); + ALOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "IsTargetItem should fail with ! as the value!"); // Child count offset += 4; memset(test3, 0, HISTORY_MIN_SIZE); ptr = (const char*)test3; *(int*)(test3 + offset) = 4000; - LOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 kids should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE), "4000 kids should fail!"); offset = 36; // Test document state delete[] test3; @@ -785,7 +785,7 @@ static void unit_test() ptr = (const char*)test3; *(int*)(test3 + offset) = 1; *(int*)(test3 + offset + 4) = 20; - LOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE + sizeof(unsigned)), "1 20 length document state string should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE + sizeof(unsigned)), "1 20 length document state string should fail!"); delete[] test3; test3 = new char[HISTORY_MIN_SIZE + 2 * sizeof(unsigned)]; memset(test3, 0, HISTORY_MIN_SIZE + 2 * sizeof(unsigned)); @@ -793,7 +793,7 @@ static void unit_test() *(int*)(test3 + offset) = 2; *(int*)(test3 + offset + 4) = 0; *(int*)(test3 + offset + 8) = 20; - LOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE + 2 * sizeof(unsigned) ), "2 20 length document state string should fail!"); + ALOG_ASSERT(!read_item_recursive(testItem, &ptr, HISTORY_MIN_SIZE + 2 * sizeof(unsigned) ), "2 20 length document state string should fail!"); delete[] test3; } #endif @@ -822,31 +822,31 @@ int registerWebHistory(JNIEnv* env) #endif // Find WebHistoryItem, its constructor, and the update method. jclass clazz = env->FindClass("android/webkit/WebHistoryItem"); - LOG_ASSERT(clazz, "Unable to find class android/webkit/WebHistoryItem"); + ALOG_ASSERT(clazz, "Unable to find class android/webkit/WebHistoryItem"); gWebHistoryItem.mInit = env->GetMethodID(clazz, "", "()V"); - LOG_ASSERT(gWebHistoryItem.mInit, "Could not find WebHistoryItem constructor"); + ALOG_ASSERT(gWebHistoryItem.mInit, "Could not find WebHistoryItem constructor"); gWebHistoryItem.mUpdate = env->GetMethodID(clazz, "update", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/graphics/Bitmap;[B)V"); - LOG_ASSERT(gWebHistoryItem.mUpdate, "Could not find method update in WebHistoryItem"); + ALOG_ASSERT(gWebHistoryItem.mUpdate, "Could not find method update in WebHistoryItem"); // Find the field ids for mTitle and mUrl. gWebHistoryItem.mTitle = env->GetFieldID(clazz, "mTitle", "Ljava/lang/String;"); - LOG_ASSERT(gWebHistoryItem.mTitle, "Could not find field mTitle in WebHistoryItem"); + ALOG_ASSERT(gWebHistoryItem.mTitle, "Could not find field mTitle in WebHistoryItem"); gWebHistoryItem.mUrl = env->GetFieldID(clazz, "mUrl", "Ljava/lang/String;"); - LOG_ASSERT(gWebHistoryItem.mUrl, "Could not find field mUrl in WebHistoryItem"); + ALOG_ASSERT(gWebHistoryItem.mUrl, "Could not find field mUrl in WebHistoryItem"); env->DeleteLocalRef(clazz); // Find the WebBackForwardList object and method. clazz = env->FindClass("android/webkit/WebBackForwardList"); - LOG_ASSERT(clazz, "Unable to find class android/webkit/WebBackForwardList"); + ALOG_ASSERT(clazz, "Unable to find class android/webkit/WebBackForwardList"); gWebBackForwardList.mAddHistoryItem = env->GetMethodID(clazz, "addHistoryItem", "(Landroid/webkit/WebHistoryItem;)V"); - LOG_ASSERT(gWebBackForwardList.mAddHistoryItem, "Could not find method addHistoryItem"); + ALOG_ASSERT(gWebBackForwardList.mAddHistoryItem, "Could not find method addHistoryItem"); gWebBackForwardList.mRemoveHistoryItem = env->GetMethodID(clazz, "removeHistoryItem", "(I)V"); - LOG_ASSERT(gWebBackForwardList.mRemoveHistoryItem, "Could not find method removeHistoryItem"); + ALOG_ASSERT(gWebBackForwardList.mRemoveHistoryItem, "Could not find method removeHistoryItem"); gWebBackForwardList.mSetCurrentIndex = env->GetMethodID(clazz, "setCurrentIndex", "(I)V"); - LOG_ASSERT(gWebBackForwardList.mSetCurrentIndex, "Could not find method setCurrentIndex"); + ALOG_ASSERT(gWebBackForwardList.mSetCurrentIndex, "Could not find method setCurrentIndex"); env->DeleteLocalRef(clazz); int result = jniRegisterNativeMethods(env, "android/webkit/WebBackForwardList", diff --git a/Source/WebKit/android/jni/WebIconDatabase.cpp b/Source/WebKit/android/jni/WebIconDatabase.cpp index 4a2ea0a..3d988e9 100644 --- a/Source/WebKit/android/jni/WebIconDatabase.cpp +++ b/Source/WebKit/android/jni/WebIconDatabase.cpp @@ -168,7 +168,7 @@ static void Open(JNIEnv* env, jobject obj, jstring path) return; iconDb.setEnabled(true); iconDb.setClient(gIconDatabaseClient); - LOG_ASSERT(path, "No path given to nativeOpen"); + ALOG_ASSERT(path, "No path given to nativeOpen"); WTF::String pathStr = jstringToWtfString(env, path); WTF::CString fullPath = WebCore::pathByAppendingComponent(pathStr, WebCore::IconDatabase::defaultDatabaseFilename()).utf8(); @@ -206,7 +206,7 @@ static void RemoveAllIcons(JNIEnv* env, jobject obj) static jobject IconForPageUrl(JNIEnv* env, jobject obj, jstring url) { - LOG_ASSERT(url, "No url given to iconForPageUrl"); + ALOG_ASSERT(url, "No url given to iconForPageUrl"); WTF::String urlStr = jstringToWtfString(env, url); // FIXME: This method should not be used from outside WebCore and will be removed. @@ -218,7 +218,7 @@ static jobject IconForPageUrl(JNIEnv* env, jobject obj, jstring url) static void RetainIconForPageUrl(JNIEnv* env, jobject obj, jstring url) { - LOG_ASSERT(url, "No url given to retainIconForPageUrl"); + ALOG_ASSERT(url, "No url given to retainIconForPageUrl"); WTF::String urlStr = jstringToWtfString(env, url); ALOGV("Retaining icon for '%s'", urlStr.latin1().data()); @@ -227,7 +227,7 @@ static void RetainIconForPageUrl(JNIEnv* env, jobject obj, jstring url) static void ReleaseIconForPageUrl(JNIEnv* env, jobject obj, jstring url) { - LOG_ASSERT(url, "No url given to releaseIconForPageUrl"); + ALOG_ASSERT(url, "No url given to releaseIconForPageUrl"); WTF::String urlStr = jstringToWtfString(env, url); ALOGV("Releasing icon for '%s'", urlStr.latin1().data()); @@ -256,7 +256,7 @@ int registerWebIconDatabase(JNIEnv* env) { #ifndef NDEBUG jclass webIconDatabase = env->FindClass("android/webkit/WebIconDatabase"); - LOG_ASSERT(webIconDatabase, "Unable to find class android.webkit.WebIconDatabase"); + ALOG_ASSERT(webIconDatabase, "Unable to find class android.webkit.WebIconDatabase"); env->DeleteLocalRef(webIconDatabase); #endif diff --git a/Source/WebKit/android/jni/WebSettings.cpp b/Source/WebKit/android/jni/WebSettings.cpp index 66524bd..eae532a 100644 --- a/Source/WebKit/android/jni/WebSettings.cpp +++ b/Source/WebKit/android/jni/WebSettings.cpp @@ -150,49 +150,49 @@ struct FieldIds { mOverrideCacheMode = env->GetFieldID(clazz, "mOverrideCacheMode", "I"); #endif - LOG_ASSERT(mLayoutAlgorithm, "Could not find field mLayoutAlgorithm"); - LOG_ASSERT(mTextSize, "Could not find field mTextSize"); - LOG_ASSERT(mStandardFontFamily, "Could not find field mStandardFontFamily"); - LOG_ASSERT(mFixedFontFamily, "Could not find field mFixedFontFamily"); - LOG_ASSERT(mSansSerifFontFamily, "Could not find field mSansSerifFontFamily"); - LOG_ASSERT(mSerifFontFamily, "Could not find field mSerifFontFamily"); - LOG_ASSERT(mCursiveFontFamily, "Could not find field mCursiveFontFamily"); - LOG_ASSERT(mFantasyFontFamily, "Could not find field mFantasyFontFamily"); - LOG_ASSERT(mDefaultTextEncoding, "Could not find field mDefaultTextEncoding"); - LOG_ASSERT(mUserAgent, "Could not find field mUserAgent"); - LOG_ASSERT(mAcceptLanguage, "Could not find field mAcceptLanguage"); - LOG_ASSERT(mMinimumFontSize, "Could not find field mMinimumFontSize"); - LOG_ASSERT(mMinimumLogicalFontSize, "Could not find field mMinimumLogicalFontSize"); - LOG_ASSERT(mDefaultFontSize, "Could not find field mDefaultFontSize"); - LOG_ASSERT(mDefaultFixedFontSize, "Could not find field mDefaultFixedFontSize"); - LOG_ASSERT(mLoadsImagesAutomatically, "Could not find field mLoadsImagesAutomatically"); + ALOG_ASSERT(mLayoutAlgorithm, "Could not find field mLayoutAlgorithm"); + ALOG_ASSERT(mTextSize, "Could not find field mTextSize"); + ALOG_ASSERT(mStandardFontFamily, "Could not find field mStandardFontFamily"); + ALOG_ASSERT(mFixedFontFamily, "Could not find field mFixedFontFamily"); + ALOG_ASSERT(mSansSerifFontFamily, "Could not find field mSansSerifFontFamily"); + ALOG_ASSERT(mSerifFontFamily, "Could not find field mSerifFontFamily"); + ALOG_ASSERT(mCursiveFontFamily, "Could not find field mCursiveFontFamily"); + ALOG_ASSERT(mFantasyFontFamily, "Could not find field mFantasyFontFamily"); + ALOG_ASSERT(mDefaultTextEncoding, "Could not find field mDefaultTextEncoding"); + ALOG_ASSERT(mUserAgent, "Could not find field mUserAgent"); + ALOG_ASSERT(mAcceptLanguage, "Could not find field mAcceptLanguage"); + ALOG_ASSERT(mMinimumFontSize, "Could not find field mMinimumFontSize"); + ALOG_ASSERT(mMinimumLogicalFontSize, "Could not find field mMinimumLogicalFontSize"); + ALOG_ASSERT(mDefaultFontSize, "Could not find field mDefaultFontSize"); + ALOG_ASSERT(mDefaultFixedFontSize, "Could not find field mDefaultFixedFontSize"); + ALOG_ASSERT(mLoadsImagesAutomatically, "Could not find field mLoadsImagesAutomatically"); #ifdef ANDROID_BLOCK_NETWORK_IMAGE - LOG_ASSERT(mBlockNetworkImage, "Could not find field mBlockNetworkImage"); + ALOG_ASSERT(mBlockNetworkImage, "Could not find field mBlockNetworkImage"); #endif - LOG_ASSERT(mBlockNetworkLoads, "Could not find field mBlockNetworkLoads"); - LOG_ASSERT(mJavaScriptEnabled, "Could not find field mJavaScriptEnabled"); - LOG_ASSERT(mPluginState, "Could not find field mPluginState"); + ALOG_ASSERT(mBlockNetworkLoads, "Could not find field mBlockNetworkLoads"); + ALOG_ASSERT(mJavaScriptEnabled, "Could not find field mJavaScriptEnabled"); + ALOG_ASSERT(mPluginState, "Could not find field mPluginState"); #if ENABLE(OFFLINE_WEB_APPLICATIONS) - LOG_ASSERT(mAppCacheEnabled, "Could not find field mAppCacheEnabled"); - LOG_ASSERT(mAppCachePath, "Could not find field mAppCachePath"); - LOG_ASSERT(mAppCacheMaxSize, "Could not find field mAppCacheMaxSize"); + ALOG_ASSERT(mAppCacheEnabled, "Could not find field mAppCacheEnabled"); + ALOG_ASSERT(mAppCachePath, "Could not find field mAppCachePath"); + ALOG_ASSERT(mAppCacheMaxSize, "Could not find field mAppCacheMaxSize"); #endif #if ENABLE(WORKERS) - LOG_ASSERT(mWorkersEnabled, "Could not find field mWorkersEnabled"); + ALOG_ASSERT(mWorkersEnabled, "Could not find field mWorkersEnabled"); #endif - LOG_ASSERT(mJavaScriptCanOpenWindowsAutomatically, + ALOG_ASSERT(mJavaScriptCanOpenWindowsAutomatically, "Could not find field mJavaScriptCanOpenWindowsAutomatically"); - LOG_ASSERT(mUseWideViewport, "Could not find field mUseWideViewport"); - LOG_ASSERT(mSupportMultipleWindows, "Could not find field mSupportMultipleWindows"); - LOG_ASSERT(mShrinksStandaloneImagesToFit, "Could not find field mShrinksStandaloneImagesToFit"); - LOG_ASSERT(mMaximumDecodedImageSize, "Could not find field mMaximumDecodedImageSize"); - LOG_ASSERT(mUseDoubleTree, "Could not find field mUseDoubleTree"); - LOG_ASSERT(mPageCacheCapacity, "Could not find field mPageCacheCapacity"); + ALOG_ASSERT(mUseWideViewport, "Could not find field mUseWideViewport"); + ALOG_ASSERT(mSupportMultipleWindows, "Could not find field mSupportMultipleWindows"); + ALOG_ASSERT(mShrinksStandaloneImagesToFit, "Could not find field mShrinksStandaloneImagesToFit"); + ALOG_ASSERT(mMaximumDecodedImageSize, "Could not find field mMaximumDecodedImageSize"); + ALOG_ASSERT(mUseDoubleTree, "Could not find field mUseDoubleTree"); + ALOG_ASSERT(mPageCacheCapacity, "Could not find field mPageCacheCapacity"); jclass enumClass = env->FindClass("java/lang/Enum"); - LOG_ASSERT(enumClass, "Could not find Enum class!"); + ALOG_ASSERT(enumClass, "Could not find Enum class!"); mOrdinal = env->GetMethodID(enumClass, "ordinal", "()I"); - LOG_ASSERT(mOrdinal, "Could not find method ordinal"); + ALOG_ASSERT(mOrdinal, "Could not find method ordinal"); env->DeleteLocalRef(enumClass); } @@ -315,7 +315,7 @@ public: static void Sync(JNIEnv* env, jobject obj, jint frame) { WebCore::Frame* pFrame = (WebCore::Frame*)frame; - LOG_ASSERT(pFrame, "%s must take a valid frame pointer!", __FUNCTION__); + ALOG_ASSERT(pFrame, "%s must take a valid frame pointer!", __FUNCTION__); WebCore::Settings* s = pFrame->settings(); if (!s) return; @@ -331,7 +331,7 @@ public: pFrame->document()->styleSelectorChanged(WebCore::RecalcStyleImmediately); if (pFrame->document()->renderer()) { recursiveCleanupForFullLayout(pFrame->document()->renderer()); - LOG_ASSERT(pFrame->view(), "No view for this frame when trying to relayout"); + ALOG_ASSERT(pFrame->view(), "No view for this frame when trying to relayout"); pFrame->view()->layout(); // FIXME: This call used to scroll the page to put the focus into view. // It worked on the WebViewCore, but now scrolling is done outside of the @@ -434,7 +434,7 @@ public: // Check for non-null string as an optimization, as this is the common case. if (str) { String path = jstringToWtfString(env, str); - LOG_ASSERT(!path.empty(), "Java side should never send empty string for AppCache path"); + ALOG_ASSERT(!path.empty(), "Java side should never send empty string for AppCache path"); // This database is created on the first load. If the file // doesn't exist, we create it and set its permissions. The // filename must match that in ApplicationCacheStorage.cpp. @@ -603,7 +603,7 @@ static JNINativeMethod gWebSettingsMethods[] = { int registerWebSettings(JNIEnv* env) { jclass clazz = env->FindClass("android/webkit/WebSettings"); - LOG_ASSERT(clazz, "Unable to find class WebSettings!"); + ALOG_ASSERT(clazz, "Unable to find class WebSettings!"); gFieldIds = new FieldIds(env, clazz); env->DeleteLocalRef(clazz); return jniRegisterNativeMethods(env, "android/webkit/WebSettings", diff --git a/Source/WebKit/android/jni/WebStorage.cpp b/Source/WebKit/android/jni/WebStorage.cpp index 9ce207d..9e9774d 100644 --- a/Source/WebKit/android/jni/WebStorage.cpp +++ b/Source/WebKit/android/jni/WebStorage.cpp @@ -175,7 +175,7 @@ int registerWebStorage(JNIEnv* env) { #ifndef NDEBUG jclass webStorage = env->FindClass("android/webkit/WebStorage"); - LOG_ASSERT(webStorage, "Unable to find class android.webkit.WebStorage"); + ALOG_ASSERT(webStorage, "Unable to find class android.webkit.WebStorage"); env->DeleteLocalRef(webStorage); #endif diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 7d705a6..e5ef154 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -184,7 +184,7 @@ void WebViewCore::addInstance(WebViewCore* inst) { void WebViewCore::removeInstance(WebViewCore* inst) { int index = gInstanceList.find(inst); - LOG_ASSERT(index >= 0, "RemoveInstance inst not found"); + ALOG_ASSERT(index >= 0, "RemoveInstance inst not found"); if (index >= 0) { gInstanceList.removeShuffle(index); } @@ -325,7 +325,7 @@ struct WebViewCore::JavaGlue { static jmethodID GetJMethod(JNIEnv* env, jclass clazz, const char name[], const char signature[]) { jmethodID m = env->GetMethodID(clazz, name, signature); - LOG_ASSERT(m, "Could not find method %s", name); + ALOG_ASSERT(m, "Could not find method %s", name); return m; } @@ -388,7 +388,7 @@ WebViewCore::WebViewCore(JNIEnv* env, jobject javaWebViewCore, WebCore::Frame* m , m_webRequestContext(0) #endif { - LOG_ASSERT(m_mainFrame, "Uh oh, somehow a frameview was made without an initial frame!"); + ALOG_ASSERT(m_mainFrame, "Uh oh, somehow a frameview was made without an initial frame!"); jclass clazz = env->GetObjectClass(javaWebViewCore); m_javaGlue->m_obj = env->NewWeakGlobalRef(javaWebViewCore); @@ -759,7 +759,7 @@ void WebViewCore::recordPictureSet(PictureSet* content) DBG_NAV_LOG("call updateFrameCache"); updateFrameCache(); if (m_findIsUp) { - LOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); + ALOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue->object(env); if (javaObject.get()) { @@ -777,9 +777,9 @@ void WebViewCore::recordPictureSet(PictureSet* content) void WebViewCore::updateCursorBounds(const CachedRoot* root, const CachedFrame* cachedFrame, const CachedNode* cachedNode) { - LOG_ASSERT(root, "updateCursorBounds: root cannot be null"); - LOG_ASSERT(cachedNode, "updateCursorBounds: cachedNode cannot be null"); - LOG_ASSERT(cachedFrame, "updateCursorBounds: cachedFrame cannot be null"); + ALOG_ASSERT(root, "updateCursorBounds: root cannot be null"); + ALOG_ASSERT(cachedNode, "updateCursorBounds: cachedNode cannot be null"); + ALOG_ASSERT(cachedFrame, "updateCursorBounds: cachedFrame cannot be null"); gCursorBoundsMutex.lock(); m_hasCursorBounds = !cachedNode->isHidden(); // If m_hasCursorBounds is false, we never look at the other @@ -904,7 +904,7 @@ BaseLayerAndroid* WebViewCore::createBaseLayer(SkRegion* region) bool layoutSucceeded = layoutIfNeededRecursive(m_mainFrame); m_skipContentDraw = false; // Layout only fails if called during a layout. - LOG_ASSERT(layoutSucceeded, "Can never be called recursively"); + ALOG_ASSERT(layoutSucceeded, "Can never be called recursively"); #if USE(ACCELERATED_COMPOSITING) // We set the background color @@ -970,7 +970,7 @@ void WebViewCore::splitContent(PictureSet* content) #ifdef FAST_PICTURESET #else bool layoutSucceeded = layoutIfNeededRecursive(m_mainFrame); - LOG_ASSERT(layoutSucceeded, "Can never be called recursively"); + ALOG_ASSERT(layoutSucceeded, "Can never be called recursively"); content->split(&m_content); rebuildPictureSet(&m_content); content->set(m_content); @@ -979,7 +979,7 @@ void WebViewCore::splitContent(PictureSet* content) void WebViewCore::scrollTo(int x, int y, bool animate) { - LOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); + ALOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); // ALOGD("WebViewCore::scrollTo(%d %d)\n", x, y); @@ -994,7 +994,7 @@ void WebViewCore::scrollTo(int x, int y, bool animate) void WebViewCore::sendNotifyProgressFinished() { - LOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); + ALOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue->object(env); if (!javaObject.get()) @@ -1005,7 +1005,7 @@ void WebViewCore::sendNotifyProgressFinished() void WebViewCore::viewInvalidate(const WebCore::IntRect& rect) { - LOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); + ALOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue->object(env); if (!javaObject.get()) @@ -1077,7 +1077,7 @@ static int pin_pos(int x, int width, int targetWidth) void WebViewCore::didFirstLayout() { DEBUG_NAV_UI_LOGD("%s", __FUNCTION__); - LOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); + ALOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue->object(env); @@ -1111,7 +1111,7 @@ void WebViewCore::didFirstLayout() void WebViewCore::updateViewport() { DEBUG_NAV_UI_LOGD("%s", __FUNCTION__); - LOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); + ALOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue->object(env); @@ -1124,7 +1124,7 @@ void WebViewCore::updateViewport() void WebViewCore::restoreScale(float scale, float textWrapScale) { DEBUG_NAV_UI_LOGD("%s", __FUNCTION__); - LOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); + ALOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue->object(env); @@ -1137,7 +1137,7 @@ void WebViewCore::restoreScale(float scale, float textWrapScale) void WebViewCore::needTouchEvents(bool need) { DEBUG_NAV_UI_LOGD("%s", __FUNCTION__); - LOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); + ALOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); #if ENABLE(TOUCH_EVENTS) JNIEnv* env = JSC::Bindings::getJNIEnv(); @@ -1159,7 +1159,7 @@ void WebViewCore::requestKeyboardWithSelection(const WebCore::Node* node, int selStart, int selEnd) { DEBUG_NAV_UI_LOGD("%s", __FUNCTION__); - LOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); + ALOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue->object(env); @@ -1174,7 +1174,7 @@ void WebViewCore::requestKeyboardWithSelection(const WebCore::Node* node, void WebViewCore::requestKeyboard(bool showKeyboard) { DEBUG_NAV_UI_LOGD("%s", __FUNCTION__); - LOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); + ALOG_ASSERT(m_javaGlue->m_obj, "A Java widget was not associated with this view bridge!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue->object(env); @@ -1209,7 +1209,7 @@ void WebViewCore::doMaxScroll(CacheBuilder::Direction dir) break; case CacheBuilder::UNINITIALIZED: default: - LOG_ASSERT(0, "unexpected focus selector"); + ALOG_ASSERT(0, "unexpected focus selector"); } WebCore::FrameView* view = m_mainFrame->view(); this->scrollTo(view->scrollX() + dx, view->scrollY() + dy, true); @@ -3017,9 +3017,9 @@ void WebViewCore::saveDocumentState(WebCore::Frame* frame) static jobjectArray makeLabelArray(JNIEnv* env, const uint16_t** labels, size_t count) { jclass stringClass = env->FindClass("java/lang/String"); - LOG_ASSERT(stringClass, "Could not find java/lang/String"); + ALOG_ASSERT(stringClass, "Could not find java/lang/String"); jobjectArray array = env->NewObjectArray(count, stringClass, 0); - LOG_ASSERT(array, "Could not create new string array"); + ALOG_ASSERT(array, "Could not create new string array"); for (size_t i = 0; i < count; i++) { jobject newString = env->NewString(&labels[i][1], labels[i][0]); @@ -3058,7 +3058,7 @@ void WebViewCore::openFileChooser(PassRefPtr chooser) void WebViewCore::listBoxRequest(WebCoreReply* reply, const uint16_t** labels, size_t count, const int enabled[], size_t enabledCount, bool multiple, const int selected[], size_t selectedCountOrSelection) { - LOG_ASSERT(m_javaGlue->m_obj, "No java widget associated with this view!"); + ALOG_ASSERT(m_javaGlue->m_obj, "No java widget associated with this view!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue->object(env); @@ -3293,7 +3293,7 @@ void WebViewCore::touchUp(int touchGeneration, // set to hidden, do not show the soft keyboard. Node passed as a parameter // must not be null. static bool shouldSuppressKeyboard(const WebCore::Node* node) { - LOG_ASSERT(node, "node passed to shouldSuppressKeyboard cannot be null"); + ALOG_ASSERT(node, "node passed to shouldSuppressKeyboard cannot be null"); const NamedNodeMap* attributes = node->attributes(); if (!attributes) return false; size_t length = attributes->length(); @@ -3995,7 +3995,7 @@ static void SetSize(JNIEnv* env, jobject obj, jint nativeClass, jint width, { WebViewCore* viewImpl = reinterpret_cast(nativeClass); ALOGV("webviewcore::nativeSetSize(%u %u)\n viewImpl: %p", (unsigned)width, (unsigned)height, viewImpl); - LOG_ASSERT(viewImpl, "viewImpl not set in nativeSetSize"); + ALOG_ASSERT(viewImpl, "viewImpl not set in nativeSetSize"); viewImpl->setSizeScreenWidthAndScale(width, height, textWrapWidth, scale, screenWidth, screenHeight, anchorX, anchorY, ignoreHeight); } @@ -4004,7 +4004,7 @@ static void SetScrollOffset(JNIEnv* env, jobject obj, jint nativeClass, jint gen, jboolean sendScrollEvent, jint x, jint y) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "need viewImpl"); + ALOG_ASSERT(viewImpl, "need viewImpl"); viewImpl->setScrollOffset(gen, sendScrollEvent, x, y); } @@ -4013,7 +4013,7 @@ static void SetGlobalBounds(JNIEnv* env, jobject obj, jint nativeClass, jint x, jint y, jint h, jint v) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "need viewImpl"); + ALOG_ASSERT(viewImpl, "need viewImpl"); viewImpl->setGlobalBounds(x, y, h, v); } @@ -4031,7 +4031,7 @@ static void Click(JNIEnv* env, jobject obj, jint nativeClass, int framePtr, int nodePtr, jboolean fake) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in Click"); + ALOG_ASSERT(viewImpl, "viewImpl not set in Click"); viewImpl->click(reinterpret_cast(framePtr), reinterpret_cast(nodePtr), fake); @@ -4102,7 +4102,7 @@ static void SetFocusControllerActive(JNIEnv* env, jobject obj, jint nativeClass, { ALOGV("webviewcore::nativeSetFocusControllerActive()\n"); WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in nativeSetFocusControllerActive"); + ALOG_ASSERT(viewImpl, "viewImpl not set in nativeSetFocusControllerActive"); viewImpl->setFocusControllerActive(active); } @@ -4111,7 +4111,7 @@ static void SaveDocumentState(JNIEnv* env, jobject obj, jint nativeClass, { ALOGV("webviewcore::nativeSaveDocumentState()\n"); WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in nativeSaveDocumentState"); + ALOG_ASSERT(viewImpl, "viewImpl not set in nativeSaveDocumentState"); viewImpl->saveDocumentState((WebCore::Frame*) frame); } @@ -4162,7 +4162,7 @@ static void SendListBoxChoice(JNIEnv* env, jobject obj, jint nativeClass, jint choice) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in nativeSendListBoxChoice"); + ALOG_ASSERT(viewImpl, "viewImpl not set in nativeSendListBoxChoice"); viewImpl->popupReply(choice); } @@ -4176,7 +4176,7 @@ static void SendListBoxChoices(JNIEnv* env, jobject obj, jint nativeClass, jbooleanArray jArray, jint size) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in nativeSendListBoxChoices"); + ALOG_ASSERT(viewImpl, "viewImpl not set in nativeSendListBoxChoices"); jboolean* ptrArray = env->GetBooleanArrayElements(jArray, 0); SkAutoSTMalloc storage(size); int* array = storage.get(); @@ -4214,7 +4214,7 @@ static jboolean HandleTouchEvent(JNIEnv* env, jobject obj, jint nativeClass, jint count, jint actionIndex, jint metaState) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); jint* ptrIdArray = env->GetIntArrayElements(idArray, 0); jint* ptrXArray = env->GetIntArrayElements(xArray, 0); jint* ptrYArray = env->GetIntArrayElements(yArray, 0); @@ -4236,7 +4236,7 @@ static void TouchUp(JNIEnv* env, jobject obj, jint nativeClass, jint touchGeneration, jint frame, jint node, jint x, jint y) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); viewImpl->touchUp(touchGeneration, (WebCore::Frame*) frame, (WebCore::Node*) node, x, y); } @@ -4245,7 +4245,7 @@ static jstring RetrieveHref(JNIEnv* env, jobject obj, jint nativeClass, jint x, jint y) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); WTF::String result = viewImpl->retrieveHref(x, y); if (!result.isEmpty()) return wtfStringToJstring(env, result); @@ -4256,7 +4256,7 @@ static jstring RetrieveAnchorText(JNIEnv* env, jobject obj, jint nativeClass, jint x, jint y) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); WTF::String result = viewImpl->retrieveAnchorText(x, y); if (!result.isEmpty()) return wtfStringToJstring(env, result); @@ -4280,7 +4280,7 @@ static void MoveFocus(JNIEnv* env, jobject obj, jint nativeClass, jint framePtr, jint nodePtr) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); viewImpl->moveFocus((WebCore::Frame*) framePtr, (WebCore::Node*) nodePtr); } @@ -4288,7 +4288,7 @@ static void MoveMouse(JNIEnv* env, jobject obj, jint nativeClass, jint frame, jint x, jint y) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); viewImpl->moveMouse((WebCore::Frame*) frame, x, y); } @@ -4296,7 +4296,7 @@ static void MoveMouseIfLatest(JNIEnv* env, jobject obj, jint nativeClass, jint moveGeneration, jint frame, jint x, jint y) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); viewImpl->moveMouseIfLatest(moveGeneration, (WebCore::Frame*) frame, x, y); } @@ -4304,14 +4304,14 @@ static void MoveMouseIfLatest(JNIEnv* env, jobject obj, jint nativeClass, static void UpdateFrameCache(JNIEnv* env, jobject obj, jint nativeClass) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); viewImpl->updateFrameCache(); } static jint GetContentMinPrefWidth(JNIEnv* env, jobject obj, jint nativeClass) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); WebCore::Frame* frame = viewImpl->mainFrame(); if (frame) { @@ -4330,7 +4330,7 @@ static void SetViewportSettingsFromNative(JNIEnv* env, jobject obj, jint nativeClass) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); WebCore::Settings* s = viewImpl->mainFrame()->page()->settings(); if (!s) @@ -4351,7 +4351,7 @@ static void SetBackgroundColor(JNIEnv* env, jobject obj, jint nativeClass, jint color) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); viewImpl->setBackgroundColor((SkColor) color); } @@ -4360,7 +4360,7 @@ static void DumpDomTree(JNIEnv* env, jobject obj, jint nativeClass, jboolean useFile) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); viewImpl->dumpDomTree(useFile); } @@ -4369,7 +4369,7 @@ static void DumpRenderTree(JNIEnv* env, jobject obj, jint nativeClass, jboolean useFile) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); viewImpl->dumpRenderTree(useFile); } @@ -4377,7 +4377,7 @@ static void DumpRenderTree(JNIEnv* env, jobject obj, jint nativeClass, static void DumpNavTree(JNIEnv* env, jobject obj, jint nativeClass) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); viewImpl->dumpNavTree(); } @@ -4501,7 +4501,7 @@ static void ProvideVisitedHistory(JNIEnv* env, jobject obj, jint nativeClass, jobject hist) { WebViewCore* viewImpl = reinterpret_cast(nativeClass); - LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); + ALOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__); jobjectArray array = static_cast(hist); @@ -4561,17 +4561,17 @@ static jobject GetTouchHighlightRects(JNIEnv* env, jobject obj, jint nativeClass return 0; jclass arrayClass = env->FindClass("java/util/ArrayList"); - LOG_ASSERT(arrayClass, "Could not find java/util/ArrayList"); + ALOG_ASSERT(arrayClass, "Could not find java/util/ArrayList"); jmethodID init = env->GetMethodID(arrayClass, "", "(I)V"); - LOG_ASSERT(init, "Could not find constructor for ArrayList"); + ALOG_ASSERT(init, "Could not find constructor for ArrayList"); jobject array = env->NewObject(arrayClass, init, rects.size()); - LOG_ASSERT(array, "Could not create a new ArrayList"); + ALOG_ASSERT(array, "Could not create a new ArrayList"); jmethodID add = env->GetMethodID(arrayClass, "add", "(Ljava/lang/Object;)Z"); - LOG_ASSERT(add, "Could not find add method on ArrayList"); + ALOG_ASSERT(add, "Could not find add method on ArrayList"); jclass rectClass = env->FindClass("android/graphics/Rect"); - LOG_ASSERT(rectClass, "Could not find android/graphics/Rect"); + ALOG_ASSERT(rectClass, "Could not find android/graphics/Rect"); jmethodID rectinit = env->GetMethodID(rectClass, "", "(IIII)V"); - LOG_ASSERT(rectinit, "Could not find init method on Rect"); + ALOG_ASSERT(rectinit, "Could not find init method on Rect"); for (size_t i = 0; i < rects.size(); i++) { jobject rect = env->NewObject(rectClass, rectinit, rects[i].x(), @@ -4743,47 +4743,47 @@ static JNINativeMethod gJavaWebViewCoreMethods[] = { int registerWebViewCore(JNIEnv* env) { jclass widget = env->FindClass("android/webkit/WebViewCore"); - LOG_ASSERT(widget, + ALOG_ASSERT(widget, "Unable to find class android/webkit/WebViewCore"); gWebViewCoreFields.m_nativeClass = env->GetFieldID(widget, "mNativeClass", "I"); - LOG_ASSERT(gWebViewCoreFields.m_nativeClass, + ALOG_ASSERT(gWebViewCoreFields.m_nativeClass, "Unable to find android/webkit/WebViewCore.mNativeClass"); gWebViewCoreFields.m_viewportWidth = env->GetFieldID(widget, "mViewportWidth", "I"); - LOG_ASSERT(gWebViewCoreFields.m_viewportWidth, + ALOG_ASSERT(gWebViewCoreFields.m_viewportWidth, "Unable to find android/webkit/WebViewCore.mViewportWidth"); gWebViewCoreFields.m_viewportHeight = env->GetFieldID(widget, "mViewportHeight", "I"); - LOG_ASSERT(gWebViewCoreFields.m_viewportHeight, + ALOG_ASSERT(gWebViewCoreFields.m_viewportHeight, "Unable to find android/webkit/WebViewCore.mViewportHeight"); gWebViewCoreFields.m_viewportInitialScale = env->GetFieldID(widget, "mViewportInitialScale", "I"); - LOG_ASSERT(gWebViewCoreFields.m_viewportInitialScale, + ALOG_ASSERT(gWebViewCoreFields.m_viewportInitialScale, "Unable to find android/webkit/WebViewCore.mViewportInitialScale"); gWebViewCoreFields.m_viewportMinimumScale = env->GetFieldID(widget, "mViewportMinimumScale", "I"); - LOG_ASSERT(gWebViewCoreFields.m_viewportMinimumScale, + ALOG_ASSERT(gWebViewCoreFields.m_viewportMinimumScale, "Unable to find android/webkit/WebViewCore.mViewportMinimumScale"); gWebViewCoreFields.m_viewportMaximumScale = env->GetFieldID(widget, "mViewportMaximumScale", "I"); - LOG_ASSERT(gWebViewCoreFields.m_viewportMaximumScale, + ALOG_ASSERT(gWebViewCoreFields.m_viewportMaximumScale, "Unable to find android/webkit/WebViewCore.mViewportMaximumScale"); gWebViewCoreFields.m_viewportUserScalable = env->GetFieldID(widget, "mViewportUserScalable", "Z"); - LOG_ASSERT(gWebViewCoreFields.m_viewportUserScalable, + ALOG_ASSERT(gWebViewCoreFields.m_viewportUserScalable, "Unable to find android/webkit/WebViewCore.mViewportUserScalable"); gWebViewCoreFields.m_viewportDensityDpi = env->GetFieldID(widget, "mViewportDensityDpi", "I"); - LOG_ASSERT(gWebViewCoreFields.m_viewportDensityDpi, + ALOG_ASSERT(gWebViewCoreFields.m_viewportDensityDpi, "Unable to find android/webkit/WebViewCore.mViewportDensityDpi"); gWebViewCoreFields.m_webView = env->GetFieldID(widget, "mWebView", "Landroid/webkit/WebView;"); - LOG_ASSERT(gWebViewCoreFields.m_webView, + ALOG_ASSERT(gWebViewCoreFields.m_webView, "Unable to find android/webkit/WebViewCore.mWebView"); gWebViewCoreFields.m_drawIsPaused = env->GetFieldID(widget, "mDrawIsPaused", "Z"); - LOG_ASSERT(gWebViewCoreFields.m_drawIsPaused, + ALOG_ASSERT(gWebViewCoreFields.m_drawIsPaused, "Unable to find android/webkit/WebViewCore.mDrawIsPaused"); gWebViewCoreFields.m_lowMemoryUsageMb = env->GetFieldID(widget, "mLowMemoryUsageThresholdMb", "I"); gWebViewCoreFields.m_highMemoryUsageMb = env->GetFieldID(widget, "mHighMemoryUsageThresholdMb", "I"); diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index 70b7e6e..c94301b 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -92,7 +92,7 @@ static jfieldID gWebViewField; static jmethodID GetJMethod(JNIEnv* env, jclass clazz, const char name[], const char signature[]) { jmethodID m = env->GetMethodID(clazz, name, signature); - LOG_ASSERT(m, "Could not find method %s", name); + ALOG_ASSERT(m, "Could not find method %s", name); return m; } @@ -173,7 +173,7 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl, WTF::String drawableDir, env->DeleteLocalRef(clazz); jclass rectClass = env->FindClass("android/graphics/Rect"); - LOG_ASSERT(rectClass, "Could not find Rect class"); + ALOG_ASSERT(rectClass, "Could not find Rect class"); m_javaGlue.m_rectLeft = env->GetFieldID(rectClass, "left", "I"); m_javaGlue.m_rectTop = env->GetFieldID(rectClass, "top", "I"); m_javaGlue.m_rectWidth = GetJMethod(env, rectClass, "width", "()I"); @@ -181,7 +181,7 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl, WTF::String drawableDir, env->DeleteLocalRef(rectClass); jclass rectClassF = env->FindClass("android/graphics/RectF"); - LOG_ASSERT(rectClassF, "Could not find RectF class"); + ALOG_ASSERT(rectClassF, "Could not find RectF class"); m_javaGlue.m_rectFLeft = env->GetFieldID(rectClassF, "left", "F"); m_javaGlue.m_rectFTop = env->GetFieldID(rectClassF, "top", "F"); m_javaGlue.m_rectFWidth = GetJMethod(env, rectClassF, "width", "()F"); @@ -242,7 +242,7 @@ WebViewCore* getWebViewCore() const { float getTextHandleScale() { - LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); + ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue.object(env); if (!javaObject.get()) @@ -507,7 +507,7 @@ bool drawGL(WebCore::IntRect& viewRect, WebCore::IntRect* invalRect, &treesSwapped, &newTreeHasAnim); if (treesSwapped && (m_pageSwapCallbackRegistered || newTreeHasAnim)) { m_pageSwapCallbackRegistered = false; - LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); + ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue.object(env); if (javaObject.get()) { @@ -729,7 +729,7 @@ CachedRoot* getFrameCache(FrameCachePermission allowNewer) && newFocus->isTextInput() && newFocus != m_frameCacheUI->currentCursor()) { // The focus has changed. We may need to update things. - LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); + ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue.object(env); if (javaObject.get()) { @@ -745,7 +745,7 @@ CachedRoot* getFrameCache(FrameCachePermission allowNewer) int getScaledMaxXScroll() { - LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); + ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue.object(env); if (!javaObject.get()) @@ -757,7 +757,7 @@ int getScaledMaxXScroll() int getScaledMaxYScroll() { - LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); + ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue.object(env); if (!javaObject.get()) @@ -770,7 +770,7 @@ int getScaledMaxYScroll() IntRect getVisibleRect() { IntRect rect; - LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); + ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue.object(env); if (!javaObject.get()) @@ -1252,7 +1252,7 @@ void sendMoveMouse(WebCore::Frame* framePtr, WebCore::Node* nodePtr, int x, int void sendMoveMouseIfLatest(bool clearTextEntry, bool stopPaintingCaret) { - LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); + ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue.object(env); if (!javaObject.get()) @@ -1264,7 +1264,7 @@ void sendMoveMouseIfLatest(bool clearTextEntry, bool stopPaintingCaret) void sendMotionUp(WebCore::Frame* framePtr, WebCore::Node* nodePtr, int x, int y) { DBG_NAV_LOGD("m_generation=%d framePtr=%p nodePtr=%p x=%d y=%d", m_generation, framePtr, nodePtr, x, y); - LOG_ASSERT(m_javaGlue.m_obj, "A WebView was not associated with this WebViewNative!"); + ALOG_ASSERT(m_javaGlue.m_obj, "A WebView was not associated with this WebViewNative!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue.object(env); @@ -1310,7 +1310,7 @@ int currentMatchIndex() bool scrollBy(int dx, int dy) { - LOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); + ALOG_ASSERT(m_javaGlue.m_obj, "A java object was not associated with this native WebView!"); JNIEnv* env = JSC::Bindings::getJNIEnv(); AutoJObject javaObject = m_javaGlue.object(env); @@ -1405,7 +1405,7 @@ int moveGeneration() LayerAndroid* compositeRoot() const { - LOG_ASSERT(!m_baseLayer || m_baseLayer->countChildren() == 1, + ALOG_ASSERT(!m_baseLayer || m_baseLayer->countChildren() == 1, "base layer can't have more than one child %s", __FUNCTION__); if (m_baseLayer && m_baseLayer->countChildren() == 1) return static_cast(m_baseLayer->getChild(0)); @@ -1654,7 +1654,7 @@ static bool nativeCacheHitIsPlugin(JNIEnv *env, jobject obj) static void nativeClearCursor(JNIEnv *env, jobject obj) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); view->clearCursor(); } @@ -1841,7 +1841,7 @@ static void nativeDebugDump(JNIEnv *env, jobject obj) { #if DUMP_NAV_CACHE WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); view->debugDump(); #endif } @@ -1964,7 +1964,7 @@ static bool nativeHasContent(JNIEnv *env, jobject obj) static jobject nativeImageURI(JNIEnv *env, jobject obj, jint x, jint y) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); WTF::String uri = view->imageURI(x, y); return wtfStringToJstring(env, uri); } @@ -2125,21 +2125,21 @@ static jint nativeFocusNodePointer(JNIEnv *env, jobject obj) static bool nativeCursorWantsKeyEvents(JNIEnv* env, jobject jwebview) { WebView* view = GET_NATIVE_VIEW(env, jwebview); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); return view->cursorWantsKeyEvents(); } static void nativeHideCursor(JNIEnv *env, jobject obj) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); view->hideCursor(); } static void nativeSelectBestAt(JNIEnv *env, jobject obj, jobject jrect) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); WebCore::IntRect rect = jrect_to_webrect(env, jrect); view->selectBestAt(rect); } @@ -2147,7 +2147,7 @@ static void nativeSelectBestAt(JNIEnv *env, jobject obj, jobject jrect) static void nativeSelectAt(JNIEnv *env, jobject obj, jint x, jint y) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); WebCore::IntRect rect = IntRect(x, y , 1, 1); view->selectBestAt(rect); if (view->hasCursorNode()) @@ -2210,7 +2210,7 @@ static bool nativeMotionUp(JNIEnv *env, jobject obj, int x, int y, int slop) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); return view->motionUp(x, y, slop); } @@ -2229,14 +2229,14 @@ static bool nativeMoveCursor(JNIEnv *env, jobject obj, { WebView* view = GET_NATIVE_VIEW(env, obj); DBG_NAV_LOGD("env=%p obj=%p view=%p", env, obj, view); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); return view->moveCursor(key, count, ignoreScroll); } static void nativeSetFindIsUp(JNIEnv *env, jobject obj, jboolean isUp) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); view->setFindIsUp(isUp); } @@ -2253,18 +2253,18 @@ static void nativeShowCursorTimed(JNIEnv *env, jobject obj) static void nativeSetHeightCanMeasure(JNIEnv *env, jobject obj, bool measure) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in nativeSetHeightCanMeasure"); + ALOG_ASSERT(view, "view not set in nativeSetHeightCanMeasure"); view->setHeightCanMeasure(measure); } static jobject nativeGetCursorRingBounds(JNIEnv *env, jobject obj) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); jclass rectClass = env->FindClass("android/graphics/Rect"); - LOG_ASSERT(rectClass, "Could not find Rect class!"); + ALOG_ASSERT(rectClass, "Could not find Rect class!"); jmethodID init = env->GetMethodID(rectClass, "", "(IIII)V"); - LOG_ASSERT(init, "Could not find constructor for Rect"); + ALOG_ASSERT(init, "Could not find constructor for Rect"); WebCore::IntRect webRect; view->cursorRingBounds(&webRect); jobject rect = env->NewObject(rectClass, init, webRect.x(), @@ -2293,7 +2293,7 @@ static int nativeFindAll(JNIEnv *env, jobject obj, jstring findLower, return 0; } WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in nativeFindAll"); + ALOG_ASSERT(view, "view not set in nativeFindAll"); CachedRoot* root = view->getFrameCache(WebView::AllowNewer); if (!root) { env->ReleaseStringChars(findLower, findLowerChars); @@ -2333,21 +2333,21 @@ static int nativeFindAll(JNIEnv *env, jobject obj, jstring findLower, static void nativeFindNext(JNIEnv *env, jobject obj, bool forward) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in nativeFindNext"); + ALOG_ASSERT(view, "view not set in nativeFindNext"); view->findNext(forward); } static int nativeFindIndex(JNIEnv *env, jobject obj) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in nativeFindIndex"); + ALOG_ASSERT(view, "view not set in nativeFindIndex"); return view->currentMatchIndex(); } static void nativeUpdateCachedTextfield(JNIEnv *env, jobject obj, jstring updatedText, jint generation) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in nativeUpdateCachedTextfield"); + ALOG_ASSERT(view, "view not set in nativeUpdateCachedTextfield"); CachedRoot* root = view->getFrameCache(WebView::DontAllowNewer); if (!root) return; @@ -2364,7 +2364,7 @@ static jint nativeGetBlockLeftEdge(JNIEnv *env, jobject obj, jint x, jint y, jfloat scale) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); if (!view) return -1; return view->getBlockLeftEdge(x, y, scale); @@ -2374,7 +2374,7 @@ static void nativeDestroy(JNIEnv *env, jobject obj) { WebView* view = GET_NATIVE_VIEW(env, obj); ALOGD("nativeDestroy view: %p", view); - LOG_ASSERT(view, "view not set in nativeDestroy"); + ALOG_ASSERT(view, "view not set in nativeDestroy"); delete view; } @@ -2468,7 +2468,7 @@ static void nativeExtendSelection(JNIEnv *env, jobject obj, int x, int y) static jobject nativeGetSelection(JNIEnv *env, jobject obj) { WebView* view = GET_NATIVE_VIEW(env, obj); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); String selection = view->getSelection(); return wtfStringToJstring(env, selection); } @@ -2609,7 +2609,7 @@ static void nativeDumpDisplayTree(JNIEnv* env, jobject jwebview, jstring jurl) { #ifdef ANDROID_DUMP_DISPLAY_TREE WebView* view = GET_NATIVE_VIEW(env, jwebview); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); if (view && view->getWebViewCore()) { FILE* file = fopen(DISPLAY_TREE_LOG_FILE, "w"); @@ -2649,7 +2649,7 @@ static int nativeScrollableLayer(JNIEnv* env, jobject jwebview, jint x, jint y, jobject rect, jobject bounds) { WebView* view = GET_NATIVE_VIEW(env, jwebview); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); SkIRect nativeRect, nativeBounds; int id = view->scrollableLayer(x, y, &nativeRect, &nativeBounds); if (rect) @@ -2681,7 +2681,7 @@ static bool nativeScrollLayer(JNIEnv* env, jobject obj, jint layerId, jint x, static void nativeSetIsScrolling(JNIEnv* env, jobject jwebview, jboolean isScrolling) { WebView* view = GET_NATIVE_VIEW(env, jwebview); - LOG_ASSERT(view, "view not set in %s", __FUNCTION__); + ALOG_ASSERT(view, "view not set in %s", __FUNCTION__); view->setIsScrolling(isScrolling); } @@ -2930,9 +2930,9 @@ static JNINativeMethod gJavaWebViewMethods[] = { int registerWebView(JNIEnv* env) { jclass clazz = env->FindClass("android/webkit/WebView"); - LOG_ASSERT(clazz, "Unable to find class android/webkit/WebView"); + ALOG_ASSERT(clazz, "Unable to find class android/webkit/WebView"); gWebViewField = env->GetFieldID(clazz, "mNativeClass", "I"); - LOG_ASSERT(gWebViewField, "Unable to find android/webkit/WebView.mNativeClass"); + ALOG_ASSERT(gWebViewField, "Unable to find android/webkit/WebView.mNativeClass"); env->DeleteLocalRef(clazz); return jniRegisterNativeMethods(env, "android/webkit/WebView", gJavaWebViewMethods, NELEM(gJavaWebViewMethods)); diff --git a/Source/WebKit/android/smoke/MessageThread.cpp b/Source/WebKit/android/smoke/MessageThread.cpp index 48f2222..97ab18c 100644 --- a/Source/WebKit/android/smoke/MessageThread.cpp +++ b/Source/WebKit/android/smoke/MessageThread.cpp @@ -79,7 +79,7 @@ void MessageQueue::post(Message* message) { AutoMutex lock(m_mutex); double when = message->m_when; - LOG_ASSERT(when > 0, "Message time may not be 0"); + ALOG_ASSERT(when > 0, "Message time may not be 0"); list::iterator it; for (it = m_messages.begin(); it != m_messages.end(); ++it) { diff --git a/Source/WebKit/android/wds/client/AdbConnection.cpp b/Source/WebKit/android/wds/client/AdbConnection.cpp index fe170a9..7d02ecc 100644 --- a/Source/WebKit/android/wds/client/AdbConnection.cpp +++ b/Source/WebKit/android/wds/client/AdbConnection.cpp @@ -115,7 +115,7 @@ static void printFailureMessage(int fd) { // Grab the payload length char lenStr[PAYLOAD_LENGTH + 1]; int payloadLen = recv(fd, lenStr, sizeof(lenStr) - 1, 0); - LOG_ASSERT(payloadLen == PAYLOAD_LENGTH, "Incorrect payload size"); + ALOG_ASSERT(payloadLen == PAYLOAD_LENGTH, "Incorrect payload size"); lenStr[PAYLOAD_LENGTH] = 0; // Parse the hex payload @@ -145,7 +145,7 @@ static void printFailureMessage(int fd) { #define ADB_RESPONSE_LENGTH 4 bool AdbConnection::checkOkayResponse() const { - LOG_ASSERT(m_fd != -1, "Connection has been closed!"); + ALOG_ASSERT(m_fd != -1, "Connection has been closed!"); char buf[ADB_RESPONSE_LENGTH]; int res = recv(m_fd, buf, sizeof(buf), 0); -- cgit v1.1