Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp

Issue 2706013002: Added support for self.origin in Window and WorkerGlobalScope (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
index bceb03e11d6cca630f91c6af279bd1ae2e3eb847..cac8ed04a5f53adf5e88530b48e0e9ef8e650b4e 100644
--- a/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
@@ -163,6 +163,10 @@ void WorkerGlobalScope::close() {
m_closing = true;
}
+String WorkerGlobalScope::origin() const {
+ return getSecurityOrigin()->toString();
+}
+
void WorkerGlobalScope::importScripts(const Vector<String>& urls,
ExceptionState& exceptionState) {
DCHECK(contentSecurityPolicy());

Powered by Google App Engine
This is Rietveld 408576698