| Index: third_party/WebKit/Source/core/dom/Document.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
|
| index 0237c178a90d10d43bb4150ec865e83db8984ccb..7def2d1f94af96c44e627133f2ad105b9d6ce28b 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -4163,10 +4163,15 @@ String Document::lastModified() const
|
|
|
| const KURL Document::firstPartyForCookies() const
|
| {
|
| + // TODO(mkwst): This doesn't properly handle HTML Import documents.
|
| +
|
| // If this is an imported document, grab its master document's first-party:
|
| if (importsController() && importsController()->master() && importsController()->master() != this)
|
| return importsController()->master()->firstPartyForCookies();
|
|
|
| + if (!frame())
|
| + return SecurityOrigin::urlWithUniqueSecurityOrigin();
|
| +
|
| // TODO(mkwst): This doesn't correctly handle sandboxed documents; we want to look at their URL,
|
| // but we can't because we don't know what it is.
|
| Frame* top = frame()->tree().top();
|
|
|