diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-18 10:55:06 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-18 10:55:06 +0200 |
commit | ee4c86d1990a9e26277a6948e7027ad8d525ebfa (patch) | |
tree | 1e2d3408cd097606571f40ab63353c27bcb7dd5c /Source/WebCore/bindings/v8/DOMWrapperWorld.h | |
parent | d882bec96d0d30aeeda2141bfadfca7f038ee862 (diff) | |
download | qtwebkit-ee4c86d1990a9e26277a6948e7027ad8d525ebfa.tar.gz |
Imported WebKit commit 795dcd25a9649fccaf1c9b685f6e2ffedaf7e620 (http://svn.webkit.org/repository/webkit/trunk@131718)
New snapshot that includes the return of -fkeep-memory at link time
to reduce memory pressure as well as modularized documentation
Diffstat (limited to 'Source/WebCore/bindings/v8/DOMWrapperWorld.h')
-rw-r--r-- | Source/WebCore/bindings/v8/DOMWrapperWorld.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/WebCore/bindings/v8/DOMWrapperWorld.h b/Source/WebCore/bindings/v8/DOMWrapperWorld.h index 9cccd5fc6..adf124ec2 100644 --- a/Source/WebCore/bindings/v8/DOMWrapperWorld.h +++ b/Source/WebCore/bindings/v8/DOMWrapperWorld.h @@ -32,6 +32,7 @@ #define DOMWrapperWorld_h #include "DOMDataStore.h" +#include "SecurityOrigin.h" #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> #include <wtf/RefPtr.h> @@ -45,14 +46,22 @@ public: static const int mainWorldExtensionGroup = 0; static const int uninitializedWorldId = -1; static const int uninitializedExtensionGroup = -1; - // If 0 is passed as worldId, the world will be assigned a temporary id instead. + // If uninitializedWorldId is passed as worldId, the world will be assigned a temporary id instead. static PassRefPtr<DOMWrapperWorld> ensureIsolatedWorld(int worldId, int extensionGroup); static bool isolatedWorldsExist() { return isolatedWorldCount; } + static bool isIsolatedWorldId(int worldId) { return worldId != mainWorldId && worldId != uninitializedWorldId; } + // Associates an isolated world (see above for description) with a security + // origin. XMLHttpRequest instances used in that world will be considered + // to come from that origin, not the frame's. + static void setIsolatedWorldSecurityOrigin(int worldID, PassRefPtr<SecurityOrigin>); + static void clearIsolatedWorldSecurityOrigin(int worldID); + SecurityOrigin* isolatedWorldSecurityOrigin(); // FIXME: this is a workaround for a problem in WebViewImpl. // Do not use this anywhere else!! static PassRefPtr<DOMWrapperWorld> createUninitializedWorld(); bool isMainWorld() { return m_worldId == mainWorldId; } + bool isIsolatedWorld() { return isIsolatedWorldId(m_worldId); } int worldId() const { return m_worldId; } int extensionGroup() const { return m_extensionGroup; } DOMDataStore* domDataStore() const |