Generate a SharedWorker constructor of V8 using [Constructor] IDL
https://bugs.webkit.org/show_bug.cgi?id=67879

Reviewed by Hajime Morita.

Source/WebCore:

Spec: http://dev.w3.org/html5/workers/#shared-workers-and-the-sharedworker-interface
This patch changed SharedWorker::create(..., context, ec) to
SharedWorker::create(context, ..., ec), since a parameter specified by [CallWith]
should come at the beginning (c.f. bug 69799).

Test: ui_tests:WorkerTest.FLAKY_SharedWorkerFastConstructor
      ui_tests:WorkerTest.FLAKY_SharedWorkerFastName

* WebCore.gypi: Removed bindings/v8/custom/V8SharedWorkerCustom.cpp
* WebCore.pro: Ditto.
* bindings/js/JSSharedWorkerCustom.cpp: Moved ScriptExecutionContext parameter to the beginning.
(WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
* bindings/v8/custom/V8SharedWorkerCustom.cpp: Removed.
* workers/SharedWorker.cpp: Moved ScriptExecutionContext parameter to the beginning.
(WebCore::SharedWorker::create): Ditto.
* workers/SharedWorker.h: Ditto.
* workers/SharedWorker.idl: Added [Constructor] IDL.

LayoutTests:

Added test cases for an undefined name and a null name on SharedWorker constructor.

* fast/workers/resources/shared-worker-name.js:
(test7.try.worker.port.onmessage):
(test7): A test case for a null name.
(test8.worker.port.onmessage):
(test8): Ditto.
(test9.try.worker.port.onmessage):
(test9): A test case for an undefined name.
(test10.worker.port.onmessage):
(test10): Ditto.
* fast/workers/shared-worker-constructor-expected.txt:
* fast/workers/shared-worker-constructor.html:
* fast/workers/shared-worker-name-expected.txt:
* platform/chromium-win/fast/workers/shared-worker-constructor-expected.txt: Updated SyntaxError with TypeError. The reason why ui_tests has been so far working without updating this error type is that shared-worker-constructor.html is marked FLAKY in chromium.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed