diff options
| author | Patrick Scott <phanna@android.com> | 2009-09-29 09:43:03 -0400 |
|---|---|---|
| committer | Patrick Scott <phanna@android.com> | 2009-09-29 11:26:24 -0400 |
| commit | 06f1ecff0f609438be162b71b50a3be08983df23 (patch) | |
| tree | 5a4a98c24c024f95585e248030164a12ca0bfb34 /WebKit | |
| parent | 1e67e45d20ead40b0407618abbc5e20840dc3c80 (diff) | |
| download | external_webkit-06f1ecff0f609438be162b71b50a3be08983df23.zip external_webkit-06f1ecff0f609438be162b71b50a3be08983df23.tar.gz external_webkit-06f1ecff0f609438be162b71b50a3be08983df23.tar.bz2 | |
Fix a few crashes with assertions enabled.
KURL::protocolIs no longer likes "javascript" and has a different method called
protocolIsJavaScript.
Diffstat (limited to 'WebKit')
| -rwxr-xr-x | WebKit/android/WebCoreSupport/GeolocationPermissions.cpp | 5 | ||||
| -rw-r--r-- | WebKit/android/jni/WebCoreFrameBridge.cpp | 2 | ||||
| -rw-r--r-- | WebKit/android/jni/WebSettings.cpp | 2 | ||||
| -rw-r--r-- | WebKit/android/nav/CacheBuilder.cpp | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp b/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp index a0b234b..b77edd3 100755 --- a/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp +++ b/WebKit/android/WebCoreSupport/GeolocationPermissions.cpp @@ -181,7 +181,10 @@ void GeolocationPermissions::cancelPendingRequests(String origin) if (index != WTF::notFound) { // Get the permission from the permanent list. PermissionsMap::const_iterator iter = s_permanentPermissions.find(origin); - ASSERT(iter != (PermissionsMap::const_iterator end = s_permanentPermissions.end())); +#ifndef NDEBUG + PermissionsMap::const_iterator end = s_permanentPermissions.end(); + ASSERT(iter != end); +#endif bool allow = iter->second; maybeCallbackFrames(origin, allow); diff --git a/WebKit/android/jni/WebCoreFrameBridge.cpp b/WebKit/android/jni/WebCoreFrameBridge.cpp index 6c97acc..2981441 100644 --- a/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -637,7 +637,7 @@ WebFrame::canHandleRequest(const WebCore::ResourceRequest& request) if (!mUserInitiatedClick && !request.getUserGesture() && (requestUrl.protocolIs("http") || requestUrl.protocolIs("https") || requestUrl.protocolIs("file") || requestUrl.protocolIs("about") || - requestUrl.protocolIs("javascript"))) + WebCore::protocolIsJavaScript(requestUrl.string()))) return true; WebCore::String url(request.url().string()); // Empty urls should not be sent to java diff --git a/WebKit/android/jni/WebSettings.cpp b/WebKit/android/jni/WebSettings.cpp index 3cba99c..4240dd5 100644 --- a/WebKit/android/jni/WebSettings.cpp +++ b/WebKit/android/jni/WebSettings.cpp @@ -316,7 +316,7 @@ public: str = (jstring)env->GetObjectField(obj, gFieldIds->mAppCachePath); if (str) { WebCore::String path = to_string(env, str); - if (path.length()) { + if (path.length() && WebCore::cacheStorage().cacheDirectory().isNull()) { WebCore::cacheStorage().setCacheDirectory(path); } } diff --git a/WebKit/android/nav/CacheBuilder.cpp b/WebKit/android/nav/CacheBuilder.cpp index 037a6e5..4acf598 100644 --- a/WebKit/android/nav/CacheBuilder.cpp +++ b/WebKit/android/nav/CacheBuilder.cpp @@ -1117,7 +1117,7 @@ void CacheBuilder::BuildFrame(Frame* root, Frame* frame, hasMouseOver = NodeHasEventListeners(node, &eventNames().mouseoverEvent, 1); isAnchor = true; KURL href = anchorNode->href(); - if (!href.isEmpty() && !href.protocolIs("javascript")) + if (!href.isEmpty() && !WebCore::protocolIsJavaScript(href.string())) // Set the exported string for all non-javascript anchors. exported = href.string().copy(); } |
