Fixes the Mac build
- JavaInstanceJSC.cpp - Adds ANDROID guards around some temporary logging
- Geolocation.cpp - Adds ANDROID guards around changes waiting to be upstreamed
- WebChromeClient.h / EmptyClients.h - Pulls the Mac part of a WebKit change for which only the Android part was cherry-picked in https://android-git.corp.google.com/g/#change,41747
Change-Id: Ide97cb6b05e78528fe4b9430466837dedaadc4cf
diff --git a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
index d654d1d..f2a2cf4 100644
--- a/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
+++ b/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
@@ -51,10 +51,10 @@
}
#endif
-// ANDROID
+#if PLATFORM(ANDROID)
#include <cutils/log.h>
#define LOG_TAG JavaInstanceJSC.cpp
-// END ANDROID
+#endif
using namespace JSC::Bindings;
using namespace JSC;
@@ -329,10 +329,10 @@
: m_refCount(0)
{
assert(instance);
-// ANDROID
+#if PLATFORM(ANDROID)
if (!instance)
LOGE("Attempted to create JObjectWrapper for null object");
-// END ANDROID
+#endif
// Cache the JNIEnv used to get the global ref for this java instance.
// It'll be used to delete the reference.
@@ -343,9 +343,11 @@
JS_LOG("new global ref %p for %p\n", m_instance, instance);
if (!m_instance)
-// ANDROID
+#if PLATFORM(ANDROID)
LOGE("%s: could not get GlobalRef for %p\n", __PRETTY_FUNCTION__, instance);
-// END ANDROID
+#else
+ fprintf(stderr, "%s: could not get GlobalRef for %p\n", __PRETTY_FUNCTION__, instance);
+#endif
}
JObjectWrapper::~JObjectWrapper()
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h
index 2da2fb2..5b24bd3 100644
--- a/WebCore/loader/EmptyClients.h
+++ b/WebCore/loader/EmptyClients.h
@@ -163,6 +163,7 @@
virtual void scrollRectIntoView(const IntRect&, const ScrollView*) const {}
virtual void requestGeolocationPermissionForFrame(Frame*, Geolocation*) {}
+ virtual void cancelGeolocationPermissionRequestForFrame(Frame*) {}
#if USE(ACCELERATED_COMPOSITING)
virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*) {};
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index 6085b32..a885062 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -38,7 +38,9 @@
// END ANDROID
#include "Frame.h"
#include "Page.h"
+#if PLATFORM(ANDROID)
#include "PlatformBridge.h"
+#endif
#include <wtf/CurrentTime.h>
#if ENABLE(CLIENT_BASED_GEOLOCATION)
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h
index 66381a4..8e8b51a 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.h
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h
@@ -159,6 +159,7 @@
#endif
virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
+ virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*) { }
private:
WebView *m_webView;