[V8] Remove V8Proxy from V8DOMWrapper::instantiateV8Object()
https://bugs.webkit.org/show_bug.cgi?id=94713

Reviewed by Adam Barth.

To kill V8Proxy, V8DOMWrapper::instantiateV8Object() should receive Frame*
instead of V8Proxy*.

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateToV8Converters):
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore::V8Float64Array::wrapSlow):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::V8TestActiveDOMObject::wrapSlow):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore::V8TestCustomNamedGetter::wrapSlow):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::V8TestEventConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore::V8TestEventTarget::wrapSlow):
* bindings/scripts/test/V8/V8TestException.cpp:
(WebCore::V8TestException::wrapSlow):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::V8TestInterface::wrapSlow):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore::V8TestMediaQueryListListener::wrapSlow):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructor::wrapSlow):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore::V8TestNode::wrapSlow):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::wrapSlow):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore):
(WebCore::V8DOMWrapper::instantiateV8Object):
* bindings/v8/V8DOMWrapper.h:
(V8DOMWrapper):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Move context() from V8Proxy to ScriptController
https://bugs.webkit.org/show_bug.cgi?id=94593

Reviewed by Adam Barth.

Source/WebCore:

- This patch removes V8Proxy::context(Frame*).
- This patch moves V8Proxy::context() to ScriptController::context().
- This patch renames ScriptController::context() to ScriptController::currentWorldContext(),
for naming consistency with ScriptController::maintWorldContext().

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateToV8Converters):
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
(WebCore::V8TestActiveDOMObject::wrapSlow):
* bindings/scripts/test/V8/V8TestNode.cpp:
(WebCore::V8TestNode::wrapSlow):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::context):
(WebCore):
* bindings/v8/ScriptController.h:
(ScriptController):
* bindings/v8/V8DOMWrapper.cpp:
(WebCore::V8DOMWrapper::setNamedHiddenWindowReference):
* bindings/v8/V8Proxy.cpp:
* bindings/v8/V8Proxy.h:
(V8Proxy):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::WindowSetTimeoutImpl):
(WebCore::V8DOMWindow::eventAccessorGetter):
(WebCore::V8DOMWindow::eventAccessorSetter):
(WebCore::DialogHandler::dialogCreated):
(WebCore::toV8):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::openCallback):

Source/WebKit/chromium:

To kill V8Proxy, we can move context() from V8Proxy to ScriptController.

No tests. No change in behavior.

* src/InspectorFrontendClientImpl.cpp:
(WebKit::InspectorFrontendClientImpl::windowObjectCleared):
* src/WebDevToolsFrontendImpl.cpp:
(WebKit::WebDevToolsFrontendImpl::dispatchOnInspectorFrontend):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium/GTK/EFL] Flaky media/track/track-mode test.
https://bugs.webkit.org/show_bug.cgi?id=83878

Reviewed by Eric Seidel.

This test should only care that cuechange events are fired when the TextTrack
mode is set to HIDDEN or SHOWING.  Because the events are asynchronous, we
shouldn't test the order of them, just that they occur.

* media/track/track-mode-expected.txt:
* media/track/track-mode.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126364 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow blocking of Web SQL databases in third-party web workers
https://bugs.webkit.org/show_bug.cgi?id=94170

Reviewed by Adam Barth.

Source/WebCore:

Web workers did not previously know anything about the document that
spawned them. This is undefined for shared workers, but for dedicated
workers, we now pipe the information through.

Tests: http/tests/security/cross-origin-worker-websql-allowed.html
       http/tests/security/cross-origin-worker-websql.html

* Modules/webdatabase/WorkerContextWebDatabase.cpp: Pass information about the top origin to canAccessDatabase
(WebCore::WorkerContextWebDatabase::openDatabase):
(WebCore::WorkerContextWebDatabase::openDatabaseSync):
* WebCore.exp.in: Make SecurityOrigin::isolatedCopy const
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::isolatedCopy):
(WebCore::SecurityOrigin::canAccessStorage):
* page/SecurityOrigin.h:
* workers/DedicatedWorkerContext.cpp: Pass topOrigin
(WebCore::DedicatedWorkerContext::create):
(WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
* workers/DedicatedWorkerContext.h:
(DedicatedWorkerContext):
* workers/DedicatedWorkerThread.cpp: Pass topOrigin
(WebCore::DedicatedWorkerThread::create):
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
(WebCore::DedicatedWorkerThread::createWorkerContext):
* workers/DedicatedWorkerThread.h:
(DedicatedWorkerThread):
* workers/SharedWorkerContext.cpp: Pass topOrigin
(WebCore::SharedWorkerContext::SharedWorkerContext):
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::SharedWorkerThread):
(WebCore::SharedWorkerThread::createWorkerContext):
* workers/SharedWorkerThread.h:
(SharedWorkerThread): Pass topOrigin
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::WorkerContext):
* workers/WorkerContext.h:
(WebCore::WorkerContext::topOrigin):
(WorkerContext):
* workers/WorkerMessagingProxy.cpp: Pass topOrigin
(WebCore::WorkerMessagingProxy::startWorkerContext):
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::create):
(WorkerThreadStartupData):
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::workerThread):
* workers/WorkerThread.h:
(WorkerThread):

Source/WebKit/chromium:

Web workers did not previously know anything about the document that
spawned them. This is undefined for shared workers, but for dedicated
workers, we now pipe the information through.

* src/WebWorkerClientImpl.cpp:
(WebKit::WebWorkerClientImpl::startWorkerContext): Pass top document's origin

LayoutTests:

Created tests for accessing openDatabase from a third party and first party dedicated workers when third-party blocking is on and off.

* http/tests/security/cross-origin-worker-websql-allowed-expected.txt: Added.
* http/tests/security/cross-origin-worker-websql-allowed.html: Added.
* http/tests/security/cross-origin-worker-websql-expected.txt: Added.
* http/tests/security/cross-origin-worker-websql.html: Added.
* http/tests/security/resources/cross-origin-iframe-for-worker-websql.html: Added.
* http/tests/security/resources/document-for-cross-origin-worker-websql.html: Added.
* http/tests/security/resources/worker-for-websql.js: Added.
(self.onmessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126365 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: revert int version when version change transaction aborts
https://bugs.webkit.org/show_bug.cgi?id=94662

Reviewed by Tony Chang.

Source/WebCore:

Test: storage/indexeddb/intversion-revert-on-abort.html

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
(WebCore::IDBDatabaseBackendImpl::resetIntVersion):
One-liner modeled after resetVersion.

(WebCore):
* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(IDBDatabaseBackendImpl):

LayoutTests:

This is tested in some other layout tests but it should have its own,
so add intversion-revert-on-abort.html.

* storage/indexeddb/intversion-abort-in-initial-upgradeneeded-expected.txt:
FAIL event.target.result.version should be 0 will be resolved at least
when we figure out if we can make the default version an integer
during the transition period.

* storage/indexeddb/intversion-revert-on-abort-expected.txt: Added.
* storage/indexeddb/intversion-revert-on-abort.html: Added.
* storage/indexeddb/resources/intversion-revert-on-abort.js: Added.
(test):
(deleteSuccess):
(firstUpgradeNeededCallback):
(openSuccess):
(secondUpgradeNeededCallback):
(errorAfterAbortCallback):
(finalSuccessCallback):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@126366 268f45cc-cd09-0410-ab3c-d52691b4dbfc