summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android/jni')
-rw-r--r--Source/WebKit/android/jni/JavaBridge.cpp11
-rw-r--r--Source/WebKit/android/jni/PictureSet.cpp17
-rw-r--r--Source/WebKit/android/jni/WebCoreFrameBridge.cpp219
-rw-r--r--Source/WebKit/android/jni/WebCoreResourceLoader.cpp39
-rw-r--r--Source/WebKit/android/jni/WebHistory.cpp40
-rw-r--r--Source/WebKit/android/jni/WebIconDatabase.cpp10
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp141
7 files changed, 87 insertions, 390 deletions
diff --git a/Source/WebKit/android/jni/JavaBridge.cpp b/Source/WebKit/android/jni/JavaBridge.cpp
index 68eb367..60f4523 100644
--- a/Source/WebKit/android/jni/JavaBridge.cpp
+++ b/Source/WebKit/android/jni/JavaBridge.cpp
@@ -41,9 +41,6 @@
#include "PluginDatabase.h"
#include "Timer.h"
#include "TimerClient.h"
-#ifdef ANDROID_INSTRUMENT
-#include "TimeCounter.h"
-#endif
#include "WebCache.h"
#include "WebCoreJni.h"
@@ -364,7 +361,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!");
- LOGV("webcore_javabridge::nativeFinalize(%p)\n", javaBridge);
+ ALOGV("webcore_javabridge::nativeFinalize(%p)\n", javaBridge);
delete javaBridge;
env->SetIntField(obj, gJavaBridge_ObjectID, 0);
}
@@ -374,14 +371,8 @@ void JavaBridge::SharedTimerFired(JNIEnv* env, jobject)
{
if (sSharedTimerFiredCallback)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounter::start(TimeCounter::SharedTimerTimeCounter);
-#endif
SkAutoMemoryUsageProbe mup("JavaBridge::sharedTimerFired");
sSharedTimerFiredCallback();
-#ifdef ANDROID_INSTRUMENT
- TimeCounter::record(TimeCounter::SharedTimerTimeCounter, __FUNCTION__);
-#endif
}
}
diff --git a/Source/WebKit/android/jni/PictureSet.cpp b/Source/WebKit/android/jni/PictureSet.cpp
index 4d9d16c..1bd72bd 100644
--- a/Source/WebKit/android/jni/PictureSet.cpp
+++ b/Source/WebKit/android/jni/PictureSet.cpp
@@ -36,7 +36,6 @@
#include "SkRect.h"
#include "SkRegion.h"
#include "SkStream.h"
-#include "TimeCounter.h"
#define MAX_DRAW_TIME 100
#define MIN_SPLITTABLE 400
@@ -693,6 +692,22 @@ void PictureSet::clear()
mWidth = mHeight = 0;
}
+uint32_t getThreadMsec()
+{
+#if defined(HAVE_POSIX_CLOCKS)
+ struct timespec tm;
+
+ clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tm);
+ return tm.tv_sec * 1000LL + tm.tv_nsec / 1000000;
+#else
+ struct timeval now;
+ struct timezone zone;
+
+ gettimeofday(&now, &zone);
+ return now.tv_sec * 1000LL + now.tv_usec / 1000;
+#endif
+}
+
bool PictureSet::draw(SkCanvas* canvas)
{
#ifdef FAST_PICTURESET
diff --git a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
index d53ddb6..79494e6 100644
--- a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
+++ b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp
@@ -116,13 +116,8 @@
#elif USE(V8)
#include "JavaNPObjectV8.h"
#include "JavaInstanceJobjectV8.h"
-#include "V8Counters.h"
#endif // USE(JSC)
-#ifdef ANDROID_INSTRUMENT
-#include "TimeCounter.h"
-#endif
-
#if ENABLE(WEB_AUTOFILL)
#include "autofill/WebAutofill.h"
#endif
@@ -422,10 +417,7 @@ WebFrame::startLoadingResource(WebCore::ResourceHandle* loader,
bool mainResource,
bool synchronous)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
- LOGV("::WebCore:: startLoadingResource(%p, %s)",
+ ALOGV("::WebCore:: startLoadingResource(%p, %s)",
loader, request.url().string().latin1().data());
JNIEnv* env = getJNIEnv();
@@ -449,7 +441,7 @@ WebFrame::startLoadingResource(WebCore::ResourceHandle* loader,
+ urlStr.substring(colon);
}
}
- LOGV("%s lower=%s", __FUNCTION__, urlStr.latin1().data());
+ ALOGV("%s lower=%s", __FUNCTION__, urlStr.latin1().data());
jstring jUrlStr = wtfStringToJstring(env, urlStr);
jstring jMethodStr = NULL;
if (!method.isEmpty())
@@ -475,7 +467,7 @@ WebFrame::startLoadingResource(WebCore::ResourceHandle* loader,
break;
}
- LOGV("::WebCore:: startLoadingResource %s with cacheMode %d", urlStr.ascii().data(), cacheMode);
+ ALOGV("::WebCore:: startLoadingResource %s with cacheMode %d", urlStr.ascii().data(), cacheMode);
ResourceHandleInternal* loaderInternal = loader->getInternal();
jstring jUsernameString = loaderInternal->m_user.isEmpty() ?
@@ -500,7 +492,7 @@ WebFrame::startLoadingResource(WebCore::ResourceHandle* loader,
if (checkException(env))
return 0;
- PassRefPtr<WebCore::ResourceLoaderAndroid> h;
+ RefPtr<WebCore::ResourceLoaderAndroid> h;
if (jLoadListener)
h = WebCoreResourceLoader::create(env, jLoadListener);
env->DeleteLocalRef(jLoadListener);
@@ -510,10 +502,7 @@ WebFrame::startLoadingResource(WebCore::ResourceHandle* loader,
UrlInterceptResponse*
WebFrame::shouldInterceptRequest(const WTF::String& url)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
- LOGV("::WebCore:: shouldInterceptRequest(%s)", url.latin1().data());
+ ALOGV("::WebCore:: shouldInterceptRequest(%s)", url.latin1().data());
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
@@ -534,10 +523,7 @@ void
WebFrame::reportError(int errorCode, const WTF::String& description,
const WTF::String& failingUrl)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
- LOGV("::WebCore:: reportError(%d, %s)", errorCode, description.ascii().data());
+ ALOGV("::WebCore:: reportError(%d, %s)", errorCode, description.ascii().data());
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -573,9 +559,6 @@ WebFrame::convertIDNToUnicode(const WebCore::KURL& url) {
void
WebFrame::loadStarted(WebCore::Frame* frame)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -589,7 +572,7 @@ WebFrame::loadStarted(WebCore::Frame* frame)
const WebCore::KURL& url = documentLoader->url();
if (url.isEmpty())
return;
- LOGV("::WebCore:: loadStarted %s", url.string().ascii().data());
+ ALOGV("::WebCore:: loadStarted %s", url.string().ascii().data());
bool isMainFrame = (!frame->tree() || !frame->tree()->parent());
WebCore::FrameLoadType loadType = frame->loader()->loadType();
@@ -609,7 +592,7 @@ WebFrame::loadStarted(WebCore::Frame* frame)
WebCore::Image* icon = WebCore::iconDatabase().synchronousIconForPageURL(urlString, WebCore::IntSize(16, 16));
if (icon)
favicon = webcoreImageToJavaBitmap(env, icon);
- LOGV("favicons", "Starting load with icon %p for %s", icon, url.string().utf8().data());
+ ALOGV("favicons", "Starting load with icon %p for %s", icon, url.string().utf8().data());
}
jstring urlStr = wtfStringToJstring(env, urlString);
@@ -633,9 +616,6 @@ WebFrame::loadStarted(WebCore::Frame* frame)
void
WebFrame::transitionToCommitted(WebCore::Frame* frame)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -650,9 +630,6 @@ WebFrame::transitionToCommitted(WebCore::Frame* frame)
void
WebFrame::didFinishLoad(WebCore::Frame* frame)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -667,7 +644,7 @@ WebFrame::didFinishLoad(WebCore::Frame* frame)
const WebCore::KURL& url = documentLoader->url();
if (url.isEmpty())
return;
- LOGV("::WebCore:: didFinishLoad %s", url.string().ascii().data());
+ ALOGV("::WebCore:: didFinishLoad %s", url.string().ascii().data());
bool isMainFrame = (!frame->tree() || !frame->tree()->parent());
WebCore::FrameLoadType loadType = loader->loadType();
@@ -681,10 +658,7 @@ WebFrame::didFinishLoad(WebCore::Frame* frame)
void
WebFrame::addHistoryItem(WebCore::HistoryItem* item)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
- LOGV("::WebCore:: addHistoryItem");
+ ALOGV("::WebCore:: addHistoryItem");
JNIEnv* env = getJNIEnv();
WebHistory::AddItem(mJavaFrame->history(env), item);
}
@@ -692,10 +666,7 @@ WebFrame::addHistoryItem(WebCore::HistoryItem* item)
void
WebFrame::removeHistoryItem(int index)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
- LOGV("::WebCore:: removeHistoryItem at %d", index);
+ ALOGV("::WebCore:: removeHistoryItem at %d", index);
JNIEnv* env = getJNIEnv();
WebHistory::RemoveItem(mJavaFrame->history(env), index);
}
@@ -703,10 +674,7 @@ WebFrame::removeHistoryItem(int index)
void
WebFrame::updateHistoryIndex(int newIndex)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
- LOGV("::WebCore:: updateHistoryIndex to %d", newIndex);
+ ALOGV("::WebCore:: updateHistoryIndex to %d", newIndex);
JNIEnv* env = getJNIEnv();
WebHistory::UpdateHistoryIndex(mJavaFrame->history(env), newIndex);
}
@@ -714,11 +682,8 @@ WebFrame::updateHistoryIndex(int newIndex)
void
WebFrame::setTitle(const WTF::String& title)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
#ifndef NDEBUG
- LOGV("setTitle(%s)", title.ascii().data());
+ ALOGV("setTitle(%s)", title.ascii().data());
#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
@@ -735,10 +700,7 @@ WebFrame::setTitle(const WTF::String& title)
void
WebFrame::windowObjectCleared(WebCore::Frame* frame)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
- LOGV("::WebCore:: windowObjectCleared");
+ ALOGV("::WebCore:: windowObjectCleared");
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -751,9 +713,6 @@ WebFrame::windowObjectCleared(WebCore::Frame* frame)
void
WebFrame::setProgress(float newProgress)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -773,9 +732,6 @@ WebFrame::userAgentForURL(const WebCore::KURL* url)
void
WebFrame::didReceiveIcon(WebCore::Image* icon)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
LOG_ASSERT(icon, "DidReceiveIcon called without an image!");
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
@@ -794,9 +750,6 @@ WebFrame::didReceiveIcon(WebCore::Image* icon)
void
WebFrame::didReceiveTouchIconURL(const WTF::String& url, bool precomposed)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -812,9 +765,6 @@ WebFrame::didReceiveTouchIconURL(const WTF::String& url, bool precomposed)
void
WebFrame::updateVisitedHistory(const WebCore::KURL& url, bool reload)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -831,9 +781,6 @@ WebFrame::updateVisitedHistory(const WebCore::KURL& url, bool reload)
bool
WebFrame::canHandleRequest(const WebCore::ResourceRequest& request)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -874,9 +821,6 @@ WebFrame::shouldSaveFormData()
WebCore::Frame*
WebFrame::createWindow(bool dialog, bool userGesture)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -890,9 +834,6 @@ WebFrame::createWindow(bool dialog, bool userGesture)
void
WebFrame::requestFocus() const
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -904,9 +845,6 @@ WebFrame::requestFocus() const
void
WebFrame::closeWindow(WebViewCore* webViewCore)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
assert(webViewCore);
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
@@ -925,9 +863,6 @@ struct PolicyFunctionWrapper {
void
WebFrame::decidePolicyForFormResubmission(WebCore::FramePolicyFunction func)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -965,9 +900,6 @@ WebFrame::density() const
void
WebFrame::didReceiveAuthenticationChallenge(WebUrlLoaderClient* client, const std::string& host, const std::string& realm, bool useCachedCredentials, bool suppressDialog)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -985,9 +917,6 @@ WebFrame::didReceiveAuthenticationChallenge(WebUrlLoaderClient* client, const st
void
WebFrame::reportSslCertError(WebUrlLoaderClient* client, int error, const std::string& cert, const std::string& url)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -1008,9 +937,6 @@ WebFrame::reportSslCertError(WebUrlLoaderClient* client, int error, const std::s
void
WebFrame::requestClientCert(WebUrlLoaderClient* client, const std::string& hostAndPort)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
int jHandle = reinterpret_cast<int>(client);
@@ -1024,9 +950,6 @@ WebFrame::requestClientCert(WebUrlLoaderClient* client, const std::string& hostA
void
WebFrame::downloadStart(const std::string& url, const std::string& userAgent, const std::string& contentDisposition, const std::string& mimetype, long long contentLength)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -1047,9 +970,6 @@ WebFrame::downloadStart(const std::string& url, const std::string& userAgent, co
void
WebFrame::didReceiveData(const char* data, int size) {
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -1064,9 +984,6 @@ WebFrame::didReceiveData(const char* data, int size) {
void
WebFrame::didFinishLoading() {
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -1078,9 +995,6 @@ WebFrame::didFinishLoading() {
void WebFrame::setCertificate(const std::string& cert)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -1098,9 +1012,6 @@ void WebFrame::setCertificate(const std::string& cert)
void WebFrame::autoLogin(const std::string& loginHeader)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimerCoutner::JavaCallbackTimeCounter);
-#endif
JNIEnv* env = getJNIEnv();
AutoJObject javaFrame = mJavaFrame->frame(env);
if (!javaFrame.get())
@@ -1174,7 +1085,7 @@ void WebFrame::maybeSavePassword(WebCore::Frame* frame, const WebCore::ResourceR
bool WebFrame::getUsernamePasswordFromDom(WebCore::Frame* frame, WTF::String& username, WTF::String& password)
{
bool found = false;
- WTF::PassRefPtr<WebCore::HTMLCollection> form = frame->document()->forms();
+ WTF::RefPtr<WebCore::HTMLCollection> form = frame->document()->forms();
WebCore::Node* node = form->firstItem();
while (node && !found && !node->namespaceURI().isNull() &&
!node->namespaceURI().isEmpty()) {
@@ -1271,9 +1182,6 @@ jbyteArray WebFrame::getPostData(const WebCore::ResourceRequest& request)
static void CallPolicyFunction(JNIEnv* env, jobject obj, jint func, jint decision)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeCallPolicyFunction must take a valid frame pointer!");
PolicyFunctionWrapper* pFunc = (PolicyFunctionWrapper*)func;
@@ -1295,12 +1203,6 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss
initChromium();
#endif
-#ifdef ANDROID_INSTRUMENT
-#if USE(V8)
- V8Counters::initCounters();
-#endif
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
// Create a new page
ChromeClientAndroid* chromeC = new ChromeClientAndroid;
EditorClientAndroid* editorC = new EditorClientAndroid;
@@ -1362,7 +1264,7 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss
WebCore::SecurityOrigin::setLocalLoadPolicy(
WebCore::SecurityOrigin::AllowLocalLoadsForLocalAndSubstituteData);
- LOGV("::WebCore:: createFrame %p", frame);
+ ALOGV("::WebCore:: createFrame %p", frame);
// Set the mNativeFrame field in Frame
SET_NATIVE_FRAME(env, obj, (int)frame);
@@ -1384,13 +1286,10 @@ static void CreateFrame(JNIEnv* env, jobject obj, jobject javaview, jobject jAss
static void DestroyFrame(JNIEnv* env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeDestroyFrame must take a valid frame pointer!");
- LOGV("::WebCore:: deleting frame %p", pFrame);
+ ALOGV("::WebCore:: deleting frame %p", pFrame);
WebCore::FrameView* view = pFrame->view();
view->ref();
@@ -1415,9 +1314,6 @@ static void DestroyFrame(JNIEnv* env, jobject obj)
static void LoadUrl(JNIEnv *env, jobject obj, jstring url, jobject headers)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeLoadUrl must take a valid frame pointer!");
@@ -1463,15 +1359,12 @@ static void LoadUrl(JNIEnv *env, jobject obj, jstring url, jobject headers)
env->DeleteLocalRef(set);
env->DeleteLocalRef(mapClass);
}
- LOGV("LoadUrl %s", kurl.string().latin1().data());
+ ALOGV("LoadUrl %s", kurl.string().latin1().data());
pFrame->loader()->load(request, false);
}
static void PostUrl(JNIEnv *env, jobject obj, jstring url, jbyteArray postData)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativePostUrl must take a valid frame pointer!");
@@ -1491,7 +1384,7 @@ static void PostUrl(JNIEnv *env, jobject obj, jstring url, jbyteArray postData)
env->ReleaseByteArrayElements(postData, bytes, 0);
}
- LOGV("PostUrl %s", kurl.string().latin1().data());
+ ALOGV("PostUrl %s", kurl.string().latin1().data());
WebCore::FrameLoadRequest frameRequest(pFrame->document()->securityOrigin(), request);
pFrame->loader()->loadFrameRequest(frameRequest, false, false, 0, 0, WebCore::SendReferrer);
}
@@ -1499,9 +1392,6 @@ static void PostUrl(JNIEnv *env, jobject obj, jstring url, jbyteArray postData)
static void LoadData(JNIEnv *env, jobject obj, jstring baseUrl, jstring data,
jstring mimeType, jstring encoding, jstring failUrl)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeLoadData must take a valid frame pointer!");
@@ -1510,7 +1400,7 @@ static void LoadData(JNIEnv *env, jobject obj, jstring baseUrl, jstring data,
// Setup the substituteData
const char* dataStr = env->GetStringUTFChars(data, NULL);
- WTF::PassRefPtr<WebCore::SharedBuffer> sharedBuffer =
+ WTF::RefPtr<WebCore::SharedBuffer> sharedBuffer =
WebCore::SharedBuffer::create();
LOG_ASSERT(dataStr, "nativeLoadData has a null data string.");
sharedBuffer->append(dataStr, strlen(dataStr));
@@ -1526,12 +1416,9 @@ static void LoadData(JNIEnv *env, jobject obj, jstring baseUrl, jstring data,
static void StopLoading(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeStopLoading must take a valid frame pointer!");
- LOGV("::WebCore:: stopLoading %p", pFrame);
+ ALOGV("::WebCore:: stopLoading %p", pFrame);
// Stop loading the page and do not send an unload event
pFrame->loader()->stopForUserCancel();
@@ -1626,9 +1513,6 @@ static jstring SaveWebArchive(JNIEnv *env, jobject obj, jstring basename, jboole
static jstring ExternalRepresentation(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "android_webcore_nativeExternalRepresentation must take a valid frame pointer!");
@@ -1661,9 +1545,6 @@ static StringBuilder FrameAsText(WebCore::Frame *pFrame, jboolean dumpChildFrame
static jstring DocumentAsText(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "android_webcore_nativeDocumentAsText must take a valid frame pointer!");
@@ -1673,9 +1554,6 @@ static jstring DocumentAsText(JNIEnv *env, jobject obj)
static jstring ChildFramesAsText(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "android_webcore_nativeDocumentAsText must take a valid frame pointer!");
@@ -1689,9 +1567,6 @@ static jstring ChildFramesAsText(JNIEnv *env, jobject obj)
static void Reload(JNIEnv *env, jobject obj, jboolean allowStale)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeReload must take a valid frame pointer!");
@@ -1709,9 +1584,6 @@ static void Reload(JNIEnv *env, jobject obj, jboolean allowStale)
static void GoBackOrForward(JNIEnv *env, jobject obj, jint pos)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "nativeGoBackOrForward must take a valid frame pointer!");
@@ -1725,9 +1597,6 @@ static void GoBackOrForward(JNIEnv *env, jobject obj, jint pos)
static jobject StringByEvaluatingJavaScriptFromString(JNIEnv *env, jobject obj, jstring script)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "stringByEvaluatingJavaScriptFromString must take a valid frame pointer!");
@@ -1831,9 +1700,6 @@ private:
static void AddJavascriptInterface(JNIEnv *env, jobject obj, jint nativeFramePointer,
jobject javascriptObj, jstring interfaceName)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = 0;
if (nativeFramePointer == 0)
pFrame = GET_NATIVE_FRAME(env, obj);
@@ -1843,7 +1709,7 @@ static void AddJavascriptInterface(JNIEnv *env, jobject obj, jint nativeFramePoi
JavaVM* vm;
env->GetJavaVM(&vm);
- LOGV("::WebCore:: addJSInterface: %p", pFrame);
+ ALOGV("::WebCore:: addJSInterface: %p", pFrame);
#if USE(JSC)
// Copied from qwebframe.cpp
@@ -1893,17 +1759,11 @@ static void AddJavascriptInterface(JNIEnv *env, jobject obj, jint nativeFramePoi
static void SetCacheDisabled(JNIEnv *env, jobject obj, jboolean disabled)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::memoryCache()->setDisabled(disabled);
}
static jboolean CacheDisabled(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
return WebCore::memoryCache()->disabled();
}
@@ -1936,17 +1796,6 @@ static void ClearWebViewCache()
static void ClearCache(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#if USE(JSC)
- JSC::JSLock lock(false);
- JSC::Heap::Statistics jsHeapStatistics = WebCore::JSDOMWindow::commonJSGlobalData()->heap.statistics();
- LOGD("About to gc and JavaScript heap size is %d and has %d bytes free",
- jsHeapStatistics.size, jsHeapStatistics.free);
-#endif // USE(JSC)
- LOGD("About to clear cache and current cache has %d bytes live and %d bytes dead",
- memoryCache()->getLiveSize(), memoryCache()->getDeadSize());
-#endif // ANDROID_INSTRUMENT
ClearWebCoreCache();
ClearWebViewCache();
#if USE(JSC)
@@ -1960,9 +1809,6 @@ static void ClearCache(JNIEnv *env, jobject obj)
static jboolean DocumentHasImages(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "DocumentHasImages must take a valid frame pointer!");
@@ -1971,14 +1817,11 @@ static jboolean DocumentHasImages(JNIEnv *env, jobject obj)
static jboolean HasPasswordField(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "HasPasswordField must take a valid frame pointer!");
bool found = false;
- WTF::PassRefPtr<WebCore::HTMLCollection> form = pFrame->document()->forms();
+ WTF::RefPtr<WebCore::HTMLCollection> form = pFrame->document()->forms();
WebCore::Node* node = form->firstItem();
// Null/Empty namespace means that node is not created in HTMLFormElement
// class, but just normal Element class.
@@ -2001,9 +1844,6 @@ static jboolean HasPasswordField(JNIEnv *env, jobject obj)
static jobjectArray GetUsernamePassword(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "GetUsernamePassword must take a valid frame pointer!");
jobjectArray strArray = NULL;
@@ -2022,16 +1862,13 @@ static jobjectArray GetUsernamePassword(JNIEnv *env, jobject obj)
static void SetUsernamePassword(JNIEnv *env, jobject obj,
jstring username, jstring password)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
LOG_ASSERT(pFrame, "SetUsernamePassword must take a valid frame pointer!");
WebCore::HTMLInputElement* usernameEle = NULL;
WebCore::HTMLInputElement* passwordEle = NULL;
bool found = false;
- WTF::PassRefPtr<WebCore::HTMLCollection> form = pFrame->document()->forms();
+ WTF::RefPtr<WebCore::HTMLCollection> form = pFrame->document()->forms();
WebCore::Node* node = form->firstItem();
while (node && !found && !node->namespaceURI().isNull() &&
!node->namespaceURI().isEmpty()) {
@@ -2109,11 +1946,8 @@ WebFrame::saveFormData(HTMLFormElement* form)
static void OrientationChanged(JNIEnv *env, jobject obj, int orientation)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::NativeCallbackTimeCounter);
-#endif
WebCore::Frame* pFrame = GET_NATIVE_FRAME(env, obj);
- LOGV("Sending orientation: %d", orientation);
+ ALOGV("Sending orientation: %d", orientation);
pFrame->sendOrientationChangeEvent(orientation);
}
@@ -2127,7 +1961,8 @@ static jboolean GetShouldStartScrolledRight(JNIEnv *env, jobject obj,
RenderStyle* style = document->renderer()->style();
WritingMode writingMode = style->writingMode();
LOG_ASSERT(writingMode != WebCore::BottomToTopWritingMode,
- "BottomToTopWritingMode isn't supported");
+ "BottomToTopWritingMode isn't possible in any "
+ "language and cannot be specified in w3c writing-mode.");
if (writingMode == WebCore::RightToLeftWritingMode)
startScrolledRight = true; // vertical-rl pages start scrolled right
else if (writingMode == WebCore::TopToBottomWritingMode)
diff --git a/Source/WebKit/android/jni/WebCoreResourceLoader.cpp b/Source/WebKit/android/jni/WebCoreResourceLoader.cpp
index f9acc97..3aa4422 100644
--- a/Source/WebKit/android/jni/WebCoreResourceLoader.cpp
+++ b/Source/WebKit/android/jni/WebCoreResourceLoader.cpp
@@ -34,9 +34,6 @@
#include "ResourceHandleInternal.h"
#include "ResourceResponse.h"
#include "SkUtils.h"
-#ifdef ANDROID_INSTRUMENT
-#include "TimeCounter.h"
-#endif
#include "WebCoreJni.h"
#include <JNIHelp.h>
@@ -133,10 +130,6 @@ bool WebCoreResourceLoader::willLoadFromCache(const WebCore::KURL& url, int64_t
// ----------------------------------------------------------------------------
void WebCoreResourceLoader::SetResponseHeader(JNIEnv* env, jobject obj, jint nativeResponse, jstring key, jstring val)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
-#endif
-
WebCore::ResourceResponse* response = (WebCore::ResourceResponse*)nativeResponse;
LOG_ASSERT(response, "nativeSetResponseHeader must take a valid response pointer!");
@@ -149,20 +142,17 @@ jint WebCoreResourceLoader::CreateResponse(JNIEnv* env, jobject obj, jstring url
jstring statusText, jstring mimeType, jlong expectedLength,
jstring encoding)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
-#endif
LOG_ASSERT(url, "Must have a url in the response!");
WebCore::KURL kurl(WebCore::ParsedURLString, jstringToWtfString(env, url));
WTF::String encodingStr;
WTF::String mimeTypeStr;
if (mimeType) {
mimeTypeStr = jstringToWtfString(env, mimeType);
- LOGV("Response setMIMEType: %s", mimeTypeStr.latin1().data());
+ ALOGV("Response setMIMEType: %s", mimeTypeStr.latin1().data());
}
if (encoding) {
encodingStr = jstringToWtfString(env, encoding);
- LOGV("Response setTextEncodingName: %s", encodingStr.latin1().data());
+ ALOGV("Response setTextEncodingName: %s", encodingStr.latin1().data());
}
WebCore::ResourceResponse* response = new WebCore::ResourceResponse(
kurl, mimeTypeStr, (long long)expectedLength,
@@ -171,16 +161,13 @@ jint WebCoreResourceLoader::CreateResponse(JNIEnv* env, jobject obj, jstring url
if (statusText) {
WTF::String status = jstringToWtfString(env, statusText);
response->setHTTPStatusText(status);
- LOGV("Response setStatusText: %s", status.latin1().data());
+ ALOGV("Response setStatusText: %s", status.latin1().data());
}
return (int)response;
}
void WebCoreResourceLoader::ReceivedResponse(JNIEnv* env, jobject obj, jint nativeResponse)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
-#endif
WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj);
LOG_ASSERT(handle, "nativeReceivedResponse must take a valid handle!");
// ResourceLoader::didFail() can set handle to be NULL, we need to check
@@ -196,10 +183,7 @@ void WebCoreResourceLoader::ReceivedResponse(JNIEnv* env, jobject obj, jint nati
void WebCoreResourceLoader::AddData(JNIEnv* env, jobject obj, jbyteArray dataArray, jint length)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
-#endif
- LOGV("webcore_resourceloader data(%d)", length);
+ ALOGV("webcore_resourceloader data(%d)", length);
WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj);
LOG_ASSERT(handle, "nativeAddData must take a valid handle!");
@@ -219,10 +203,7 @@ void WebCoreResourceLoader::AddData(JNIEnv* env, jobject obj, jbyteArray dataArr
void WebCoreResourceLoader::Finished(JNIEnv* env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
-#endif
- LOGV("webcore_resourceloader finished");
+ ALOGV("webcore_resourceloader finished");
WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj);
LOG_ASSERT(handle, "nativeFinished must take a valid handle!");
// ResourceLoader::didFail() can set handle to be NULL, we need to check
@@ -236,10 +217,7 @@ void WebCoreResourceLoader::Finished(JNIEnv* env, jobject obj)
jstring WebCoreResourceLoader::RedirectedToUrl(JNIEnv* env, jobject obj,
jstring baseUrl, jstring redirectTo, jint nativeResponse)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
-#endif
- LOGV("webcore_resourceloader redirectedToUrl");
+ ALOGV("webcore_resourceloader redirectedToUrl");
WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj);
LOG_ASSERT(handle, "nativeRedirectedToUrl must take a valid handle!");
// ResourceLoader::didFail() can set handle to be NULL, we need to check
@@ -275,10 +253,7 @@ jstring WebCoreResourceLoader::RedirectedToUrl(JNIEnv* env, jobject obj,
void WebCoreResourceLoader::Error(JNIEnv* env, jobject obj, jint id, jstring description,
jstring failingUrl)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::ResourceTimeCounter);
-#endif
- LOGV("webcore_resourceloader error");
+ ALOGV("webcore_resourceloader error");
WebCore::ResourceHandle* handle = GET_NATIVE_HANDLE(env, obj);
LOG_ASSERT(handle, "nativeError must take a valid handle!");
// ResourceLoader::didFail() can set handle to be NULL, we need to check
diff --git a/Source/WebKit/android/jni/WebHistory.cpp b/Source/WebKit/android/jni/WebHistory.cpp
index 7ec73a3..8453974 100644
--- a/Source/WebKit/android/jni/WebHistory.cpp
+++ b/Source/WebKit/android/jni/WebHistory.cpp
@@ -375,7 +375,7 @@ static void write_string(WTF::Vector<char>& v, const WTF::String& str)
char* data = v.begin() + vectorLen;
// Write the actual string
int l = SkUTF16_ToUTF8(str.characters(), strLen, data);
- LOGV("Writing string %d %.*s", l, l, data);
+ LOG_VERBOSE("Writing string %d %.*s", l, l, data);
// Go back and write the utf8 length. Subtract sizeof(unsigned) from
// data to get the position to write the length.
memcpy(data - sizeof(unsigned), (char*)&l, sizeof(unsigned));
@@ -417,10 +417,10 @@ static void write_item(WTF::Vector<char>& v, WebCore::HistoryItem* item)
LOG_ASSERT(bridge, "We should have a bridge here!");
// Screen scale
const float scale = bridge->scale();
- LOGV("Writing scale %f", scale);
+ LOG_VERBOSE("Writing scale %f", scale);
v.append((char*)&scale, sizeof(float));
const float textWrapScale = bridge->textWrapScale();
- LOGV("Writing text wrap scale %f", textWrapScale);
+ LOG_VERBOSE("Writing text wrap scale %f", textWrapScale);
v.append((char*)&textWrapScale, sizeof(float));
// Scroll position.
@@ -433,19 +433,19 @@ static void write_item(WTF::Vector<char>& v, WebCore::HistoryItem* item)
const WTF::Vector<WTF::String>& docState = item->documentState();
WTF::Vector<WTF::String>::const_iterator end = docState.end();
unsigned stateSize = docState.size();
- LOGV("Writing docState %d", stateSize);
+ LOG_VERBOSE("Writing docState %d", stateSize);
v.append((char*)&stateSize, sizeof(unsigned));
for (WTF::Vector<WTF::String>::const_iterator i = docState.begin(); i != end; ++i) {
write_string(v, *i);
}
// Is target item
- LOGV("Writing isTargetItem %d", item->isTargetItem());
+ LOG_VERBOSE("Writing isTargetItem %d", item->isTargetItem());
v.append((char)item->isTargetItem());
// Children count
unsigned childCount = item->children().size();
- LOGV("Writing childCount %d", childCount);
+ LOG_VERBOSE("Writing childCount %d", childCount);
v.append((char*)&childCount, sizeof(unsigned));
}
@@ -495,7 +495,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
// Increment data pointer by the size of an unsigned int.
data += sizeofUnsigned;
if (l) {
- LOGV("Original url %d %.*s", l, l, data);
+ LOG_VERBOSE("Original url %d %.*s", l, l, data);
// If we have a length, check if that length exceeds the data length
// and return null if there is not enough data.
if (data + l < end)
@@ -513,7 +513,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
memcpy(&l, data, sizeofUnsigned);
data += sizeofUnsigned;
if (l) {
- LOGV("Url %d %.*s", l, l, data);
+ LOG_VERBOSE("Url %d %.*s", l, l, data);
if (data + l < end)
newItem->setURLString(e.decode(data, l));
else
@@ -527,7 +527,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
memcpy(&l, data, sizeofUnsigned);
data += sizeofUnsigned;
if (l) {
- LOGV("Title %d %.*s", l, l, data);
+ LOG_VERBOSE("Title %d %.*s", l, l, data);
if (data + l < end)
newItem->setTitle(e.decode(data, l));
else
@@ -539,13 +539,13 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
// Generate a new ResourceRequest object for populating form information.
WTF::String formContentType;
- WTF::PassRefPtr<WebCore::FormData> formData = NULL;
+ WTF::RefPtr<WebCore::FormData> formData = NULL;
// Read the form content type
memcpy(&l, data, sizeofUnsigned);
data += sizeofUnsigned;
if (l) {
- LOGV("Content type %d %.*s", l, l, data);
+ LOG_VERBOSE("Content type %d %.*s", l, l, data);
if (data + l < end)
formContentType = e.decode(data, l);
else
@@ -559,7 +559,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
memcpy(&l, data, sizeofUnsigned);
data += sizeofUnsigned;
if (l) {
- LOGV("Form data %d %.*s", l, l, data);
+ LOG_VERBOSE("Form data %d %.*s", l, l, data);
if (data + l < end)
formData = WebCore::FormData::create(data, l);
else
@@ -591,7 +591,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
memcpy(&l, data, sizeofUnsigned);
data += sizeofUnsigned;
if (l) {
- LOGV("Target %d %.*s", l, l, data);
+ LOG_VERBOSE("Target %d %.*s", l, l, data);
if (data + l < end)
newItem->setTarget(e.decode(data, l));
else
@@ -606,11 +606,11 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
float fValue;
// Read the screen scale
memcpy(&fValue, data, sizeof(float));
- LOGV("Screen scale %f", fValue);
+ LOG_VERBOSE("Screen scale %f", fValue);
bridge->setScale(fValue);
data += sizeof(float);
memcpy(&fValue, data, sizeofUnsigned);
- LOGV("Text wrap scale %f", fValue);
+ LOG_VERBOSE("Text wrap scale %f", fValue);
bridge->setTextWrapScale(fValue);
data += sizeof(float);
@@ -631,7 +631,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
// Read the document state
memcpy(&l, data, sizeofUnsigned);
- LOGV("Document state %d", l);
+ LOG_VERBOSE("Document state %d", l);
data += sizeofUnsigned;
if (l) {
// Check if we have enough data to at least parse the sizes of each
@@ -653,7 +653,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
docState.append(e.decode(data, strLen));
else
return false;
- LOGV("\t\t%d %.*s", strLen, strLen, data);
+ LOG_VERBOSE("\t\t%d %.*s", strLen, strLen, data);
data += strLen;
}
newItem->setDocumentState(docState);
@@ -668,7 +668,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
unsigned char c = (unsigned char)data[0];
if (c > 1)
return false;
- LOGV("Target item %d", c);
+ LOG_VERBOSE("Target item %d", c);
newItem->setIsTargetItem((bool)c);
data++;
if (end - data < sizeofUnsigned)
@@ -676,7 +676,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
// Read the child count
memcpy(&l, data, sizeofUnsigned);
- LOGV("Child count %d", l);
+ LOG_VERBOSE("Child count %d", l);
data += sizeofUnsigned;
*pData = data;
if (l) {
@@ -686,7 +686,7 @@ static bool read_item_recursive(WebCore::HistoryItem* newItem,
while (l--) {
// No need to check the length each time because read_item_recursive
// will return null if there isn't enough data left to parse.
- WTF::PassRefPtr<WebCore::HistoryItem> child = WebCore::HistoryItem::create();
+ WTF::RefPtr<WebCore::HistoryItem> child = WebCore::HistoryItem::create();
// Set a bridge that will not call into java.
child->setBridge(new WebHistoryItem(static_cast<WebHistoryItem*>(bridge)));
// Read the child item.
diff --git a/Source/WebKit/android/jni/WebIconDatabase.cpp b/Source/WebKit/android/jni/WebIconDatabase.cpp
index d5f8947..e46b600 100644
--- a/Source/WebKit/android/jni/WebIconDatabase.cpp
+++ b/Source/WebKit/android/jni/WebIconDatabase.cpp
@@ -185,7 +185,7 @@ static void Open(JNIEnv* env, jobject obj, jstring path)
}
}
if (didSetPermissions) {
- LOGV("Opening WebIconDatabase file '%s'", pathStr.latin1().data());
+ ALOGV("Opening WebIconDatabase file '%s'", pathStr.latin1().data());
bool res = iconDb.open(pathStr, WebCore::IconDatabase::defaultDatabaseFilename());
if (!res)
LOGE("Open failed!");
@@ -200,7 +200,7 @@ static void Close(JNIEnv* env, jobject obj)
static void RemoveAllIcons(JNIEnv* env, jobject obj)
{
- LOGV("Removing all icons");
+ ALOGV("Removing all icons");
WebCore::iconDatabase().removeAllIcons();
}
@@ -212,7 +212,7 @@ static jobject IconForPageUrl(JNIEnv* env, jobject obj, jstring url)
// FIXME: This method should not be used from outside WebCore and will be removed.
// http://trac.webkit.org/changeset/81484
WebCore::Image* icon = WebCore::iconDatabase().synchronousIconForPageURL(urlStr, WebCore::IntSize(16, 16));
- LOGV("Retrieving icon for '%s' %p", urlStr.latin1().data(), icon);
+ ALOGV("Retrieving icon for '%s' %p", urlStr.latin1().data(), icon);
return webcoreImageToJavaBitmap(env, icon);
}
@@ -221,7 +221,7 @@ static void RetainIconForPageUrl(JNIEnv* env, jobject obj, jstring url)
LOG_ASSERT(url, "No url given to retainIconForPageUrl");
WTF::String urlStr = jstringToWtfString(env, url);
- LOGV("Retaining icon for '%s'", urlStr.latin1().data());
+ ALOGV("Retaining icon for '%s'", urlStr.latin1().data());
WebCore::iconDatabase().retainIconForPageURL(urlStr);
}
@@ -230,7 +230,7 @@ static void ReleaseIconForPageUrl(JNIEnv* env, jobject obj, jstring url)
LOG_ASSERT(url, "No url given to releaseIconForPageUrl");
WTF::String urlStr = jstringToWtfString(env, url);
- LOGV("Releasing icon for '%s'", urlStr.latin1().data());
+ ALOGV("Releasing icon for '%s'", urlStr.latin1().data());
WebCore::iconDatabase().releaseIconForPageURL(urlStr);
}
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index 7692de1..d2a6c0a 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -131,7 +131,6 @@
#if USE(V8)
#include "ScriptController.h"
-#include "V8Counters.h"
#include <wtf/text/CString.h>
#endif
@@ -152,10 +151,6 @@ FILE* gDomTreeFile = 0;
FILE* gRenderTreeFile = 0;
#endif
-#ifdef ANDROID_INSTRUMENT
-#include "TimeCounter.h"
-#endif
-
#if USE(ACCELERATED_COMPOSITING)
#include "GraphicsLayerAndroid.h"
#include "RenderLayerCompositor.h"
@@ -588,11 +583,6 @@ void WebViewCore::recordPictureSet(PictureSet* content)
if (!success)
return;
- { // collect WebViewCoreRecordTimeCounter after layoutIfNeededRecursive
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreRecordTimeCounter);
-#endif
-
// if the webkit page dimensions changed, discard the pictureset and redraw.
WebCore::FrameView* view = m_mainFrame->view();
int width = view->contentsWidth();
@@ -710,8 +700,6 @@ void WebViewCore::recordPictureSet(PictureSet* content)
}
#endif
- } // WebViewCoreRecordTimeCounter
-
WebCore::Node* oldFocusNode = currentFocus();
m_frameCacheOutOfDate = true;
WebCore::IntRect oldBounds;
@@ -1087,7 +1075,7 @@ void WebViewCore::didFirstLayout()
const WebCore::KURL& url = m_mainFrame->document()->url();
if (url.isEmpty())
return;
- LOGV("::WebCore:: didFirstLayout %s", url.string().ascii().data());
+ ALOGV("::WebCore:: didFirstLayout %s", url.string().ascii().data());
WebCore::FrameLoadType loadType = m_mainFrame->loader()->loadType();
@@ -1599,9 +1587,6 @@ void WebViewCore::updateFrameCache()
LOGW("updateFrameCache: pending style recalc, ignoring.");
return;
}
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreBuildNavTimeCounter);
-#endif
m_frameCacheOutOfDate = false;
m_temp = new CachedRoot();
m_temp->init(m_mainFrame, &m_history);
@@ -2233,7 +2218,7 @@ String WebViewCore::modifySelectionTextNavigationAxis(DOMSelection* selection, i
if (m_currentNodeDomNavigationAxis
&& CacheBuilder::validNode(m_mainFrame,
m_mainFrame, m_currentNodeDomNavigationAxis)) {
- PassRefPtr<Range> rangeRef =
+ RefPtr<Range> rangeRef =
selection->frame()->document()->createRange();
rangeRef->selectNode(m_currentNodeDomNavigationAxis, ec);
m_currentNodeDomNavigationAxis = 0;
@@ -2245,7 +2230,7 @@ String WebViewCore::modifySelectionTextNavigationAxis(DOMSelection* selection, i
} else if (m_cursorNode
&& CacheBuilder::validNode(m_mainFrame,
m_mainFrame, m_cursorNode)) {
- PassRefPtr<Range> rangeRef =
+ RefPtr<Range> rangeRef =
selection->frame()->document()->createRange();
rangeRef->selectNode(reinterpret_cast<Node*>(m_cursorNode), ec);
if (ec)
@@ -2449,13 +2434,13 @@ String WebViewCore::modifySelectionTextNavigationAxis(DOMSelection* selection, i
scrollNodeIntoView(m_mainFrame, selection->anchorNode());
// format markup for the visible content
- PassRefPtr<Range> range = selection->getRangeAt(0, ec);
+ RefPtr<Range> range = selection->getRangeAt(0, ec);
if (ec)
return String();
IntRect bounds = range->boundingBox();
selectAt(bounds.center().x(), bounds.center().y());
markup = formatMarkup(selection);
- LOGV("Selection markup: %s", markup.utf8().data());
+ ALOGV("Selection markup: %s", markup.utf8().data());
return markup;
}
@@ -2714,7 +2699,7 @@ String WebViewCore::modifySelectionDomNavigationAxis(DOMSelection* selection, in
m_currentNodeDomNavigationAxis = currentNode;
scrollNodeIntoView(m_mainFrame, currentNode);
String selectionString = createMarkup(currentNode);
- LOGV("Selection markup: %s", selectionString.utf8().data());
+ ALOGV("Selection markup: %s", selectionString.utf8().data());
return selectionString;
}
return String();
@@ -2776,7 +2761,7 @@ String WebViewCore::formatMarkup(DOMSelection* selection)
{
ExceptionCode ec = 0;
String markup = String();
- PassRefPtr<Range> wholeRange = selection->getRangeAt(0, ec);
+ RefPtr<Range> wholeRange = selection->getRangeAt(0, ec);
if (ec)
return String();
if (!wholeRange->startContainer() || !wholeRange->startContainer())
@@ -2786,7 +2771,7 @@ String WebViewCore::formatMarkup(DOMSelection* selection)
Node* firstNode = wholeRange->firstNode();
Node* pastLastNode = wholeRange->pastLastNode();
Node* currentNode = firstNode;
- PassRefPtr<Range> currentRange;
+ RefPtr<Range> currentRange;
while (currentNode != pastLastNode) {
Node* nextNode = currentNode->traverseNextNode();
@@ -3937,9 +3922,6 @@ static jstring RequestLabel(JNIEnv *env, jobject obj, int framePointer,
static void ClearContent(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
viewImpl->clearContent();
}
@@ -3953,11 +3935,8 @@ static void SetSize(JNIEnv *env, jobject obj, jint width, jint height,
jint textWrapWidth, jfloat scale, jint screenWidth, jint screenHeight,
jint anchorX, jint anchorY, jboolean ignoreHeight)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
- LOGV("webviewcore::nativeSetSize(%u %u)\n viewImpl: %p", (unsigned)width, (unsigned)height, viewImpl);
+ ALOGV("webviewcore::nativeSetSize(%u %u)\n viewImpl: %p", (unsigned)width, (unsigned)height, viewImpl);
LOG_ASSERT(viewImpl, "viewImpl not set in nativeSetSize");
viewImpl->setSizeScreenWidthAndScale(width, height, textWrapWidth, scale,
screenWidth, screenHeight, anchorX, anchorY, ignoreHeight);
@@ -3965,9 +3944,6 @@ static void SetSize(JNIEnv *env, jobject obj, jint width, jint height,
static void SetScrollOffset(JNIEnv *env, jobject obj, jint gen, jboolean sendScrollEvent, jint x, jint y)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "need viewImpl");
@@ -3977,9 +3953,6 @@ static void SetScrollOffset(JNIEnv *env, jobject obj, jint gen, jboolean sendScr
static void SetGlobalBounds(JNIEnv *env, jobject obj, jint x, jint y, jint h,
jint v)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "need viewImpl");
@@ -3990,18 +3963,12 @@ static jboolean Key(JNIEnv *env, jobject obj, jint keyCode, jint unichar,
jint repeatCount, jboolean isShift, jboolean isAlt, jboolean isSym,
jboolean isDown)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
return GET_NATIVE_VIEW(env, obj)->key(PlatformKeyboardEvent(keyCode,
unichar, repeatCount, isDown, isShift, isAlt, isSym));
}
static void Click(JNIEnv *env, jobject obj, int framePtr, int nodePtr, jboolean fake)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in Click");
@@ -4017,27 +3984,18 @@ static void ContentInvalidateAll(JNIEnv *env, jobject obj)
static void DeleteSelection(JNIEnv *env, jobject obj, jint start, jint end,
jint textGeneration)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
viewImpl->deleteSelection(start, end, textGeneration);
}
static void SetSelection(JNIEnv *env, jobject obj, jint start, jint end)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
viewImpl->setSelection(start, end);
}
static jstring ModifySelection(JNIEnv *env, jobject obj, jint direction, jint granularity)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
String selectionString = viewImpl->modifySelection(direction, granularity);
return wtfStringToJstring(env, selectionString);
@@ -4047,9 +4005,6 @@ static void ReplaceTextfieldText(JNIEnv *env, jobject obj,
jint oldStart, jint oldEnd, jstring replace, jint start, jint end,
jint textGeneration)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
WTF::String webcoreString = jstringToWtfString(env, replace);
viewImpl->replaceTextfieldText(oldStart,
@@ -4060,9 +4015,6 @@ static void PassToJs(JNIEnv *env, jobject obj,
jint generation, jstring currentText, jint keyCode,
jint keyValue, jboolean down, jboolean cap, jboolean fn, jboolean sym)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WTF::String current = jstringToWtfString(env, currentText);
GET_NATIVE_VIEW(env, obj)->passToJs(generation, current,
PlatformKeyboardEvent(keyCode, keyValue, 0, down, cap, fn, sym));
@@ -4071,19 +4023,13 @@ static void PassToJs(JNIEnv *env, jobject obj,
static void ScrollFocusedTextInput(JNIEnv *env, jobject obj, jfloat xPercent,
jint y)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
viewImpl->scrollFocusedTextInput(xPercent, y);
}
static void SetFocusControllerActive(JNIEnv *env, jobject obj, jboolean active)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
- LOGV("webviewcore::nativeSetFocusControllerActive()\n");
+ ALOGV("webviewcore::nativeSetFocusControllerActive()\n");
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in nativeSetFocusControllerActive");
viewImpl->setFocusControllerActive(active);
@@ -4091,10 +4037,7 @@ static void SetFocusControllerActive(JNIEnv *env, jobject obj, jboolean active)
static void SaveDocumentState(JNIEnv *env, jobject obj, jint frame)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
- LOGV("webviewcore::nativeSaveDocumentState()\n");
+ ALOGV("webviewcore::nativeSaveDocumentState()\n");
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in nativeSaveDocumentState");
viewImpl->saveDocumentState((WebCore::Frame*) frame);
@@ -4120,9 +4063,6 @@ static bool UpdateLayers(JNIEnv *env, jobject obj, jint jbaseLayer)
static jint RecordContent(JNIEnv *env, jobject obj, jobject region, jobject pt)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
SkRegion* nativeRegion = GraphicsJNI::getNativeRegion(env, region);
SkIPoint nativePt;
@@ -4133,18 +4073,12 @@ static jint RecordContent(JNIEnv *env, jobject obj, jobject region, jobject pt)
static void SplitContent(JNIEnv *env, jobject obj, jint content)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
viewImpl->splitContent(reinterpret_cast<PictureSet*>(content));
}
static void SendListBoxChoice(JNIEnv* env, jobject obj, jint choice)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in nativeSendListBoxChoice");
viewImpl->popupReply(choice);
@@ -4159,9 +4093,6 @@ static void SendListBoxChoice(JNIEnv* env, jobject obj, jint choice)
static void SendListBoxChoices(JNIEnv* env, jobject obj, jbooleanArray jArray,
jint size)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in nativeSendListBoxChoices");
jboolean* ptrArray = env->GetBooleanArrayElements(jArray, 0);
@@ -4180,9 +4111,6 @@ static void SendListBoxChoices(JNIEnv* env, jobject obj, jbooleanArray jArray,
static jstring FindAddress(JNIEnv *env, jobject obj, jstring addr,
jboolean caseInsensitive)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
if (!addr)
return 0;
int length = env->GetStringLength(addr);
@@ -4203,9 +4131,6 @@ static jboolean HandleTouchEvent(JNIEnv *env, jobject obj, jint action, jintArra
jintArray xArray, jintArray yArray,
jint count, jint actionIndex, jint metaState)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
jint* ptrIdArray = env->GetIntArrayElements(idArray, 0);
@@ -4228,9 +4153,6 @@ static jboolean HandleTouchEvent(JNIEnv *env, jobject obj, jint action, jintArra
static void TouchUp(JNIEnv *env, jobject obj, jint touchGeneration,
jint frame, jint node, jint x, jint y)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
viewImpl->touchUp(touchGeneration,
@@ -4239,9 +4161,6 @@ static void TouchUp(JNIEnv *env, jobject obj, jint touchGeneration,
static jstring RetrieveHref(JNIEnv *env, jobject obj, jint x, jint y)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
WTF::String result = viewImpl->retrieveHref(x, y);
@@ -4252,9 +4171,6 @@ static jstring RetrieveHref(JNIEnv *env, jobject obj, jint x, jint y)
static jstring RetrieveAnchorText(JNIEnv *env, jobject obj, jint x, jint y)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
WTF::String result = viewImpl->retrieveAnchorText(x, y);
@@ -4276,9 +4192,6 @@ static void StopPaintingCaret(JNIEnv *env, jobject obj)
static void MoveFocus(JNIEnv *env, jobject obj, jint framePtr, jint nodePtr)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
viewImpl->moveFocus((WebCore::Frame*) framePtr, (WebCore::Node*) nodePtr);
@@ -4287,9 +4200,6 @@ static void MoveFocus(JNIEnv *env, jobject obj, jint framePtr, jint nodePtr)
static void MoveMouse(JNIEnv *env, jobject obj, jint frame,
jint x, jint y)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
viewImpl->moveMouse((WebCore::Frame*) frame, x, y);
@@ -4298,9 +4208,6 @@ static void MoveMouse(JNIEnv *env, jobject obj, jint frame,
static void MoveMouseIfLatest(JNIEnv *env, jobject obj, jint moveGeneration,
jint frame, jint x, jint y)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
viewImpl->moveMouseIfLatest(moveGeneration,
@@ -4309,9 +4216,6 @@ static void MoveMouseIfLatest(JNIEnv *env, jobject obj, jint moveGeneration,
static void UpdateFrameCache(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
viewImpl->updateFrameCache();
@@ -4319,9 +4223,6 @@ static void UpdateFrameCache(JNIEnv *env, jobject obj)
static jint GetContentMinPrefWidth(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
@@ -4340,9 +4241,6 @@ static jint GetContentMinPrefWidth(JNIEnv *env, jobject obj)
static void SetViewportSettingsFromNative(JNIEnv *env, jobject obj)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
@@ -4363,9 +4261,6 @@ static void SetViewportSettingsFromNative(JNIEnv *env, jobject obj)
static void SetBackgroundColor(JNIEnv *env, jobject obj, jint color)
{
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebViewCore* viewImpl = GET_NATIVE_VIEW(env, obj);
LOG_ASSERT(viewImpl, "viewImpl not set in %s", __FUNCTION__);
@@ -4396,15 +4291,6 @@ static void DumpNavTree(JNIEnv *env, jobject obj)
viewImpl->dumpNavTree();
}
-static void DumpV8Counters(JNIEnv*, jobject)
-{
-#if USE(V8)
-#ifdef ANDROID_INSTRUMENT
- V8Counters::dumpCounters();
-#endif
-#endif
-}
-
static void SetJsFlags(JNIEnv *env, jobject obj, jstring flags)
{
#if USE(V8)
@@ -4440,9 +4326,6 @@ static void GeolocationPermissionsProvide(JNIEnv* env, jobject obj, jstring orig
}
static void RegisterURLSchemeAsLocal(JNIEnv* env, jobject obj, jstring scheme) {
-#ifdef ANDROID_INSTRUMENT
- TimeCounterAuto counter(TimeCounter::WebViewCoreTimeCounter);
-#endif
WebCore::SchemeRegistry::registerURLSchemeAsLocal(jstringToWtfString(env, scheme));
}
@@ -4715,8 +4598,6 @@ static JNINativeMethod gJavaWebViewCoreMethods[] = {
(void*) DumpRenderTree },
{ "nativeDumpNavTree", "()V",
(void*) DumpNavTree },
- { "nativeDumpV8Counters", "()V",
- (void*) DumpV8Counters },
{ "nativeSetNewStorageLimit", "(J)V",
(void*) SetNewStorageLimit },
{ "nativeGeolocationPermissionsProvide", "(Ljava/lang/String;ZZ)V",