Cleanup: Use ScriptExecutionContext::topOrigin when relevant.
authormkwst@chromium.org <mkwst@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Jan 2013 20:48:49 +0000 (20:48 +0000)
committermkwst@chromium.org <mkwst@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 31 Jan 2013 20:48:49 +0000 (20:48 +0000)
commit8d13c14ee10bd6bb3564829734f246711f1ccbb5
tree2fe73c3d5411f852e393323f7abbed2fa9c6aa32
parent790d83421dea9e8a0eb2d1d844d399a76e65bebb
Cleanup: Use ScriptExecutionContext::topOrigin when relevant.
https://bugs.webkit.org/show_bug.cgi?id=108476

Source/WebCore:

Reviewed by Jochen Eisinger.

Rather than diving through 'frame()->top()' or 'topDocument()' to get
the SecurityOrigin of the top-level document in a frame, we can now
directly grab the 'topOrigin()' off of a ScriptExecutionContext. This
patch adjusts a few callsites to use the new hotness rather than the
old brokenness.

This is a pure refactoring: No web-visible changes should result.

* Modules/webdatabase/DOMWindowWebDatabase.cpp:
(WebCore::DOMWindowWebDatabase::openDatabase):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::sessionStorage):
(WebCore::DOMWindow::localStorage):
* workers/SharedWorker.cpp:
(WebCore::SharedWorker::create):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerContext):

Source/WebKit2:

Reviewed by Anders Carlsson.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::storageBlockingStateChanged):
(WebKit::PluginView::isPrivateBrowsingEnabled):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/workers/SharedWorker.cpp
Source/WebCore/workers/WorkerMessagingProxy.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/PluginView.cpp