[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:43:29 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 96978a9813857172f3790774ed761328c5c9240b
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 24 16:15:54 2009 +0000
2009-11-24 Adam Barth <abarth at webkit.org>
Reviewed by Dimitri Glazkov.
[Chromium] Fix DOM storage layout tests
https://bugs.webkit.org/show_bug.cgi?id=31833
The issue is, essentially, that this code assumes that
SecurityOrigin::createString can re-create a SecurityOrigin given
the string produced from SecurityOrigin::toString. This is a bogus
assumption in a number of corner cases (e.g., document.domain,
@sandbox). A recent patch (http://trac.webkit.org/changeset/51294)
make this assumption further invalid in the case of of file:// URLs.
The correct fix is for this code to use WebSecurityOrigin objects
(and not strings) to represent SecurityOrigin objects. However, the
expert on this code is on vacation, and I don't want to do major
surgery here without his involvement. This patch is a temporary fix
to get these tests passing again. We'll do the right fix once
jorlow gets back from vacation.
Tests: Covered by a number of existing DOM storage tests.
* src/WebStorageNamespaceImpl.cpp:
(WebKit::WebStorageNamespaceImpl::createStorageArea):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51338 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index c017637..21bb74e 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,29 @@
+2009-11-24 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Fix DOM storage layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=31833
+
+ The issue is, essentially, that this code assumes that
+ SecurityOrigin::createString can re-create a SecurityOrigin given
+ the string produced from SecurityOrigin::toString. This is a bogus
+ assumption in a number of corner cases (e.g., document.domain,
+ @sandbox). A recent patch (http://trac.webkit.org/changeset/51294)
+ make this assumption further invalid in the case of of file:// URLs.
+
+ The correct fix is for this code to use WebSecurityOrigin objects
+ (and not strings) to represent SecurityOrigin objects. However, the
+ expert on this code is on vacation, and I don't want to do major
+ surgery here without his involvement. This patch is a temporary fix
+ to get these tests passing again. We'll do the right fix once
+ jorlow gets back from vacation.
+
+ Tests: Covered by a number of existing DOM storage tests.
+
+ * src/WebStorageNamespaceImpl.cpp:
+ (WebKit::WebStorageNamespaceImpl::createStorageArea):
+
2009-11-23 Jian Li <jianli at chromium.org>
Reviewed by NOBODY (Chromium build fix).
diff --git a/WebKit/chromium/src/WebStorageNamespaceImpl.cpp b/WebKit/chromium/src/WebStorageNamespaceImpl.cpp
index 94cb9b5..e6f6548 100644
--- a/WebKit/chromium/src/WebStorageNamespaceImpl.cpp
+++ b/WebKit/chromium/src/WebStorageNamespaceImpl.cpp
@@ -61,7 +61,20 @@ WebStorageNamespaceImpl::~WebStorageNamespaceImpl()
WebStorageArea* WebStorageNamespaceImpl::createStorageArea(const WebString& originString)
{
- RefPtr<WebCore::SecurityOrigin> origin = WebCore::SecurityOrigin::createFromString(originString);
+ WebCore::String originWebCoreString = originString;
+ if (originWebCoreString == "file://") {
+ // FIXME: We should really be passing around WebSecurityOrigin objects
+ // to represent security origins instead of strings. One issue
+ // with using strings is that createFromString(toString) does
+ // not round-trip for file URLs because file:// looks like a
+ // directory (which is sandboxed).
+ //
+ // For the time being, we work around this issue by using "file:///a",
+ // which does not look like a directory. We should fix this when
+ // jorlow gets back from vactation.
+ originWebCoreString = "file:///a";
+ }
+ RefPtr<WebCore::SecurityOrigin> origin = WebCore::SecurityOrigin::createFromString(originWebCoreString);
return new WebStorageAreaImpl(m_storageNamespace->storageArea(origin.release()));
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list