Changeset 235155 in webkit


Ignore:
Timestamp:
Aug 21, 2018 7:22:41 PM (6 years ago)
Author:
Ryan Haddad
Message:

Unreviewed, rolling out r235128.

The test added with this change is frequently failing.

Reverted changeset:

"Support "name" option for dedicated workers"
https://bugs.webkit.org/show_bug.cgi?id=188779
https://trac.webkit.org/changeset/235128

Location:
trunk
Files:
3 deleted
20 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r235153 r235155  
     12018-08-21  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Unreviewed, rolling out r235128.
     4
     5        The test added with this change is frequently failing.
     6
     7        Reverted changeset:
     8
     9        "Support "name" option for dedicated workers"
     10        https://bugs.webkit.org/show_bug.cgi?id=188779
     11        https://trac.webkit.org/changeset/235128
     12
    1132018-08-21  Megan Gardner  <megan_gardner@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r235128 r235155  
     12018-08-21  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Unreviewed, rolling out r235128.
     4
     5        The test added with this change is frequently failing.
     6
     7        Reverted changeset:
     8
     9        "Support "name" option for dedicated workers"
     10        https://bugs.webkit.org/show_bug.cgi?id=188779
     11        https://trac.webkit.org/changeset/235128
     12
    1132018-08-21  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker-expected.txt

    r235128 r235155  
    6969PASS DedicatedWorkerGlobalScope interface: existence and properties of interface prototype object's "constructor" property
    7070PASS DedicatedWorkerGlobalScope interface: existence and properties of interface prototype object's @@unscopables property
    71 PASS DedicatedWorkerGlobalScope interface: attribute name
     71FAIL DedicatedWorkerGlobalScope interface: attribute name assert_own_property: The global object must have a property "name" expected property "name" missing
    7272PASS Unscopable handled correctly for name property on DedicatedWorkerGlobalScope
    7373PASS DedicatedWorkerGlobalScope interface: operation postMessage(any, [object Object])
     
    8787PASS DedicatedWorkerGlobalScope must be primary interface of self
    8888PASS Stringification of self
    89 PASS DedicatedWorkerGlobalScope interface: self must inherit property "name" with the proper type
     89FAIL DedicatedWorkerGlobalScope interface: self must inherit property "name" with the proper type assert_own_property: expected property "name" missing
    9090PASS DedicatedWorkerGlobalScope interface: self must inherit property "postMessage(any, [object Object])" with the proper type
    9191PASS DedicatedWorkerGlobalScope interface: calling postMessage(any, [object Object]) on self with too few arguments must throw TypeError
  • trunk/LayoutTests/imported/w3c/web-platform-tests/workers/name-property-expected.txt

    r235128 r235155  
    22
    33FAIL Test the name property of shared and dedicated workers via the name constructor option ReferenceError: Can't find variable: SharedWorker
    4 PASS name property value for DedicatedWorkerGlobalScope
     4PASS Declaring name as an accidental global must not cause a harness error for DedicatedWorkerGlobalScope
     5FAIL name property value for DedicatedWorkerGlobalScope assert_true: property exists on the global expected true got false
    56PASS name property is replaceable for DedicatedWorkerGlobalScope
    6 PASS Declaring name as an accidental global must not cause a harness error for DedicatedWorkerGlobalScope
    77
  • trunk/Source/WebCore/ChangeLog

    r235152 r235155  
     12018-08-21  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Unreviewed, rolling out r235128.
     4
     5        The test added with this change is frequently failing.
     6
     7        Reverted changeset:
     8
     9        "Support "name" option for dedicated workers"
     10        https://bugs.webkit.org/show_bug.cgi?id=188779
     11        https://trac.webkit.org/changeset/235128
     12
    1132018-08-21  Commit Queue  <commit-queue@webkit.org>
    214
  • trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.cpp

    r235128 r235155  
    4242namespace WebCore {
    4343
    44 Ref<DedicatedWorkerGlobalScope> DedicatedWorkerGlobalScope::create(const URL& url, Ref<SecurityOrigin>&& origin, const String& name, const String& identifier, const String& userAgent, bool isOnline, DedicatedWorkerThread& thread, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, PAL::SessionID sessionID)
     44Ref<DedicatedWorkerGlobalScope> DedicatedWorkerGlobalScope::create(const URL& url, Ref<SecurityOrigin>&& origin, const String& identifier, const String& userAgent, bool isOnline, DedicatedWorkerThread& thread, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, PAL::SessionID sessionID)
    4545{
    46     auto context = adoptRef(*new DedicatedWorkerGlobalScope(url, WTFMove(origin), name, identifier, userAgent, isOnline, thread, shouldBypassMainWorldContentSecurityPolicy, WTFMove(topOrigin), timeOrigin, connectionProxy, socketProvider, sessionID));
     46    auto context = adoptRef(*new DedicatedWorkerGlobalScope(url, WTFMove(origin), identifier, userAgent, isOnline, thread, shouldBypassMainWorldContentSecurityPolicy, WTFMove(topOrigin), timeOrigin, connectionProxy, socketProvider, sessionID));
    4747    if (!shouldBypassMainWorldContentSecurityPolicy)
    4848        context->applyContentSecurityPolicyResponseHeaders(contentSecurityPolicyResponseHeaders);
     
    5050}
    5151
    52 DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope(const URL& url, Ref<SecurityOrigin>&& origin, const String& name, const String& identifier, const String& userAgent, bool isOnline, DedicatedWorkerThread& thread, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, PAL::SessionID sessionID)
     52DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope(const URL& url, Ref<SecurityOrigin>&& origin, const String& identifier, const String& userAgent, bool isOnline, DedicatedWorkerThread& thread, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, PAL::SessionID sessionID)
    5353    : WorkerGlobalScope(url, WTFMove(origin), identifier, userAgent, isOnline, thread, shouldBypassMainWorldContentSecurityPolicy, WTFMove(topOrigin), timeOrigin, connectionProxy, socketProvider, sessionID)
    54     , m_name(name)
    5554{
    5655}
  • trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.h

    r235128 r235155  
    4949class DedicatedWorkerGlobalScope final : public WorkerGlobalScope {
    5050public:
    51     static Ref<DedicatedWorkerGlobalScope> create(const URL&, Ref<SecurityOrigin>&&, const String& name, const String& identifier, const String& userAgent, bool isOnline, DedicatedWorkerThread&, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, PAL::SessionID);
     51    static Ref<DedicatedWorkerGlobalScope> create(const URL&, Ref<SecurityOrigin>&&, const String& identifier, const String& userAgent, bool isOnline, DedicatedWorkerThread&, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, PAL::SessionID);
    5252    virtual ~DedicatedWorkerGlobalScope();
    53 
    54     const String& name() const { return m_name; }
    5553
    5654    ExceptionOr<void> postMessage(JSC::ExecState&, JSC::JSValue message, Vector<JSC::Strong<JSC::JSObject>>&&);
     
    6159    using Base = WorkerGlobalScope;
    6260
    63     DedicatedWorkerGlobalScope(const URL&, Ref<SecurityOrigin>&&, const String& name, const String& identifier, const String& userAgent, bool isOnline, DedicatedWorkerThread&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, PAL::SessionID);
     61    DedicatedWorkerGlobalScope(const URL&, Ref<SecurityOrigin>&&, const String& identifier, const String& userAgent, bool isOnline, DedicatedWorkerThread&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, PAL::SessionID);
    6462
    6563    bool isDedicatedWorkerGlobalScope() const final { return true; }
    6664    ExceptionOr<void> importScripts(const Vector<String>& urls) final;
    6765    EventTargetInterface eventTargetInterface() const final;
    68 
    69     String m_name;
    7066};
    7167
  • trunk/Source/WebCore/workers/DedicatedWorkerGlobalScope.idl

    r235128 r235155  
    3838    IsImmutablePrototypeExoticObjectOnPrototype,
    3939] interface DedicatedWorkerGlobalScope : WorkerGlobalScope {
    40     [Replaceable] readonly attribute DOMString name;
    41 
    4240    [CallWith=ScriptState, MayThrowException] void postMessage(any message, optional sequence<object> transfer = []);
    4341
  • trunk/Source/WebCore/workers/DedicatedWorkerThread.cpp

    r235128 r235155  
    3939namespace WebCore {
    4040
    41 DedicatedWorkerThread::DedicatedWorkerThread(const URL& url, const String& name, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerDebuggerProxy& workerDebuggerProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, JSC::RuntimeFlags runtimeFlags, PAL::SessionID sessionID)
    42     : WorkerThread(url, name, identifier, userAgent, isOnline, sourceCode, workerLoaderProxy, workerDebuggerProxy, workerObjectProxy, startMode, contentSecurityPolicyResponseHeaders, shouldBypassMainWorldContentSecurityPolicy, topOrigin, timeOrigin, connectionProxy, socketProvider, runtimeFlags, sessionID)
     41DedicatedWorkerThread::DedicatedWorkerThread(const URL& url, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerDebuggerProxy& workerDebuggerProxy, WorkerObjectProxy& workerObjectProxy, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, JSC::RuntimeFlags runtimeFlags, PAL::SessionID sessionID)
     42    : WorkerThread(url, identifier, userAgent, isOnline, sourceCode, workerLoaderProxy, workerDebuggerProxy, workerObjectProxy, startMode, contentSecurityPolicyResponseHeaders, shouldBypassMainWorldContentSecurityPolicy, topOrigin, timeOrigin, connectionProxy, socketProvider, runtimeFlags, sessionID)
    4343    , m_workerObjectProxy(workerObjectProxy)
    4444{
     
    4747DedicatedWorkerThread::~DedicatedWorkerThread() = default;
    4848
    49 Ref<WorkerGlobalScope> DedicatedWorkerThread::createWorkerGlobalScope(const URL& url, Ref<SecurityOrigin>&& origin, const String& name, const String& identifier, const String& userAgent, bool isOnline, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID sessionID)
     49Ref<WorkerGlobalScope> DedicatedWorkerThread::createWorkerGlobalScope(const URL& url, Ref<SecurityOrigin>&& origin, const String& identifier, const String& userAgent, bool isOnline, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID sessionID)
    5050{
    51     return DedicatedWorkerGlobalScope::create(url, WTFMove(origin), name, identifier, userAgent, isOnline, *this, contentSecurityPolicyResponseHeaders, shouldBypassMainWorldContentSecurityPolicy, WTFMove(topOrigin), timeOrigin, idbConnectionProxy(), socketProvider(), sessionID);
     51    return DedicatedWorkerGlobalScope::create(url, WTFMove(origin), identifier, userAgent, isOnline, *this, contentSecurityPolicyResponseHeaders, shouldBypassMainWorldContentSecurityPolicy, WTFMove(topOrigin), timeOrigin, idbConnectionProxy(), socketProvider(), sessionID);
    5252}
    5353
  • trunk/Source/WebCore/workers/DedicatedWorkerThread.h

    r235128 r235155  
    5050
    5151protected:
    52     Ref<WorkerGlobalScope> createWorkerGlobalScope(const URL&, Ref<SecurityOrigin>&&, const String& name, const String& identifier, const String& userAgent, bool isOnline, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID) override;
     52    Ref<WorkerGlobalScope> createWorkerGlobalScope(const URL&, Ref<SecurityOrigin>&&, const String& identifier, const String& userAgent, bool isOnline, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID) override;
    5353    void runEventLoop() override;
    5454
    5555private:
    56     DedicatedWorkerThread(const URL&, const String& name, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerLoaderProxy&, WorkerDebuggerProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, JSC::RuntimeFlags, PAL::SessionID);
     56    DedicatedWorkerThread(const URL&, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerLoaderProxy&, WorkerDebuggerProxy&, WorkerObjectProxy&, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, JSC::RuntimeFlags, PAL::SessionID);
    5757
    5858    WorkerObjectProxy& m_workerObjectProxy;
  • trunk/Source/WebCore/workers/Worker.cpp

    r235128 r235155  
    5858}
    5959
    60 inline Worker::Worker(ScriptExecutionContext& context, JSC::RuntimeFlags runtimeFlags, const Options& options)
     60inline Worker::Worker(ScriptExecutionContext& context, JSC::RuntimeFlags runtimeFlags)
    6161    : ActiveDOMObject(&context)
    62     , m_name(options.name)
    6362    , m_identifier("worker:" + Inspector::IdentifiersFactory::createIdentifier())
    6463    , m_contextProxy(WorkerGlobalScopeProxy::create(*this))
     
    7574}
    7675
    77 ExceptionOr<Ref<Worker>> Worker::create(ScriptExecutionContext& context, JSC::RuntimeFlags runtimeFlags, const String& url, const Options& options)
     76ExceptionOr<Ref<Worker>> Worker::create(ScriptExecutionContext& context, JSC::RuntimeFlags runtimeFlags, const String& url)
    7877{
    7978    ASSERT(isMainThread());
     
    8281    ASSERT_WITH_SECURITY_IMPLICATION(context.isDocument());
    8382
    84     auto worker = adoptRef(*new Worker(context, runtimeFlags, options));
     83    auto worker = adoptRef(*new Worker(context, runtimeFlags));
    8584
    8685    worker->suspendIfNeeded();
     
    105104    request.setInitiatorIdentifier(worker->m_identifier);
    106105
    107     FetchOptions fetchOptions;
    108     fetchOptions.mode = FetchOptions::Mode::SameOrigin;
    109     fetchOptions.cache = FetchOptions::Cache::Default;
    110     fetchOptions.redirect = FetchOptions::Redirect::Follow;
    111     fetchOptions.destination = FetchOptions::Destination::Worker;
    112     worker->m_scriptLoader->loadAsynchronously(context, WTFMove(request), WTFMove(fetchOptions), contentSecurityPolicyEnforcement, ServiceWorkersMode::All, worker);
     106    FetchOptions options;
     107    options.mode = FetchOptions::Mode::SameOrigin;
     108    options.cache = FetchOptions::Cache::Default;
     109    options.redirect = FetchOptions::Redirect::Follow;
     110    options.destination = FetchOptions::Destination::Worker;
     111    worker->m_scriptLoader->loadAsynchronously(context, WTFMove(request), WTFMove(options), contentSecurityPolicyEnforcement, ServiceWorkersMode::All, worker);
    113112    return WTFMove(worker);
    114113}
     
    187186        bool isOnline = platformStrategies()->loaderStrategy()->isOnLine();
    188187        const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders = m_contentSecurityPolicyResponseHeaders ? m_contentSecurityPolicyResponseHeaders.value() : scriptExecutionContext()->contentSecurityPolicy()->responseHeaders();
    189         m_contextProxy.startWorkerGlobalScope(m_scriptLoader->url(), m_name, scriptExecutionContext()->userAgent(m_scriptLoader->url()), isOnline, m_scriptLoader->script(), contentSecurityPolicyResponseHeaders, m_shouldBypassMainWorldContentSecurityPolicy, m_workerCreationTime, m_runtimeFlags, sessionID);
     188        m_contextProxy.startWorkerGlobalScope(m_scriptLoader->url(), scriptExecutionContext()->userAgent(m_scriptLoader->url()), isOnline, m_scriptLoader->script(), contentSecurityPolicyResponseHeaders, m_shouldBypassMainWorldContentSecurityPolicy, m_workerCreationTime, m_runtimeFlags, sessionID);
    190189        InspectorInstrumentation::scriptImported(*scriptExecutionContext(), m_scriptLoader->identifier(), m_scriptLoader->script());
    191190    }
  • trunk/Source/WebCore/workers/Worker.h

    r235128 r235155  
    5151class Worker final : public AbstractWorker, public ActiveDOMObject, private WorkerScriptLoaderClient {
    5252public:
    53     struct Options {
    54         String name;
    55     };
    56     static ExceptionOr<Ref<Worker>> create(ScriptExecutionContext&, JSC::RuntimeFlags, const String& url, const Options&);
     53    static ExceptionOr<Ref<Worker>> create(ScriptExecutionContext&, JSC::RuntimeFlags, const String& url);
    5754    virtual ~Worker();
    5855
     
    6865
    6966private:
    70     explicit Worker(ScriptExecutionContext&, JSC::RuntimeFlags, const Options&);
     67    explicit Worker(ScriptExecutionContext&, JSC::RuntimeFlags);
    7168
    7269    EventTargetInterface eventTargetInterface() const final { return WorkerEventTargetInterfaceType; }
     
    8481
    8582    RefPtr<WorkerScriptLoader> m_scriptLoader;
    86     String m_name;
    8783    String m_identifier;
    8884    WorkerGlobalScopeProxy& m_contextProxy; // The proxy outlives the worker to perform thread shutdown.
  • trunk/Source/WebCore/workers/Worker.idl

    r235128 r235155  
    2727[
    2828    ActiveDOMObject,
    29     Constructor(USVString scriptUrl, optional WorkerOptions options),
     29    Constructor(USVString scriptUrl),
    3030    ConstructorCallWith=ScriptExecutionContext&RuntimeFlags,
    3131    ConstructorMayThrowException
     
    3737};
    3838
    39 dictionary WorkerOptions {
    40     DOMString name = "";
    41 };
    42 
    4339Worker implements AbstractWorker;
  • trunk/Source/WebCore/workers/WorkerGlobalScopeProxy.h

    r235128 r235155  
    5151    static WorkerGlobalScopeProxy& create(Worker&);
    5252
    53     virtual void startWorkerGlobalScope(const URL& scriptURL, const String& name, const String& userAgent, bool isOnline, const String& sourceCode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags, PAL::SessionID) = 0;
     53    virtual void startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, bool isOnline, const String& sourceCode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags, PAL::SessionID) = 0;
    5454    virtual void terminateWorkerGlobalScope() = 0;
    5555    virtual void postMessageToWorkerGlobalScope(MessageWithMessagePorts&&) = 0;
  • trunk/Source/WebCore/workers/WorkerMessagingProxy.cpp

    r235128 r235155  
    7373}
    7474
    75 void WorkerMessagingProxy::startWorkerGlobalScope(const URL& scriptURL, const String& name, const String& userAgent, bool isOnline, const String& sourceCode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags runtimeFlags, PAL::SessionID sessionID)
     75void WorkerMessagingProxy::startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, bool isOnline, const String& sourceCode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags runtimeFlags, PAL::SessionID sessionID)
    7676{
    7777    // FIXME: This need to be revisited when we support nested worker one day
     
    8989    SocketProvider* socketProvider = document.socketProvider();
    9090
    91     auto thread = DedicatedWorkerThread::create(scriptURL, name, identifier, userAgent, isOnline, sourceCode, *this, *this, *this, startMode, contentSecurityPolicyResponseHeaders, shouldBypassMainWorldContentSecurityPolicy, document.topOrigin(), timeOrigin, proxy, socketProvider, runtimeFlags, sessionID);
     91    auto thread = DedicatedWorkerThread::create(scriptURL, identifier, userAgent, isOnline, sourceCode, *this, *this, *this, startMode, contentSecurityPolicyResponseHeaders, shouldBypassMainWorldContentSecurityPolicy, document.topOrigin(), timeOrigin, proxy, socketProvider, runtimeFlags, sessionID);
    9292
    9393    workerThreadCreated(thread.get());
  • trunk/Source/WebCore/workers/WorkerMessagingProxy.h

    r235128 r235155  
    4747    // Implementations of WorkerGlobalScopeProxy.
    4848    // (Only use these functions in the worker object thread.)
    49     void startWorkerGlobalScope(const URL& scriptURL, const String& name, const String& userAgent, bool isOnline, const String& sourceCode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags, PAL::SessionID) final;
     49    void startWorkerGlobalScope(const URL& scriptURL, const String& userAgent, bool isOnline, const String& sourceCode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, MonotonicTime timeOrigin, JSC::RuntimeFlags, PAL::SessionID) final;
    5050    void terminateWorkerGlobalScope() final;
    5151    void postMessageToWorkerGlobalScope(MessageWithMessagePorts&&) final;
  • trunk/Source/WebCore/workers/WorkerThread.cpp

    r235128 r235155  
    7373    WTF_MAKE_NONCOPYABLE(WorkerThreadStartupData); WTF_MAKE_FAST_ALLOCATED;
    7474public:
    75     WorkerThreadStartupData(const URL& scriptURL, const String& name, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, PAL::SessionID);
     75    WorkerThreadStartupData(const URL& scriptURL, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, PAL::SessionID);
    7676
    7777    URL m_scriptURL;
    7878    Ref<SecurityOrigin> m_origin;
    79     String m_name;
    8079    String m_identifier;
    8180    String m_userAgent;
     
    9089};
    9190
    92 WorkerThreadStartupData::WorkerThreadStartupData(const URL& scriptURL, const String& name, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, PAL::SessionID sessionID)
     91WorkerThreadStartupData::WorkerThreadStartupData(const URL& scriptURL, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, PAL::SessionID sessionID)
    9392    : m_scriptURL(scriptURL.isolatedCopy())
    9493    , m_origin(SecurityOrigin::create(m_scriptURL)->isolatedCopy())
    95     , m_name(name.isolatedCopy())
    9694    , m_identifier(identifier.isolatedCopy())
    9795    , m_userAgent(userAgent.isolatedCopy())
     
    107105}
    108106
    109 WorkerThread::WorkerThread(const URL& scriptURL, const String& name, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerDebuggerProxy& workerDebuggerProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, JSC::RuntimeFlags runtimeFlags, PAL::SessionID sessionID)
     107WorkerThread::WorkerThread(const URL& scriptURL, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerLoaderProxy& workerLoaderProxy, WorkerDebuggerProxy& workerDebuggerProxy, WorkerReportingProxy& workerReportingProxy, WorkerThreadStartMode startMode, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy* connectionProxy, SocketProvider* socketProvider, JSC::RuntimeFlags runtimeFlags, PAL::SessionID sessionID)
    110108    : m_workerLoaderProxy(workerLoaderProxy)
    111109    , m_workerDebuggerProxy(workerDebuggerProxy)
    112110    , m_workerReportingProxy(workerReportingProxy)
    113111    , m_runtimeFlags(runtimeFlags)
    114     , m_startupData(std::make_unique<WorkerThreadStartupData>(scriptURL, name, identifier, userAgent, isOnline, sourceCode, startMode, contentSecurityPolicyResponseHeaders, shouldBypassMainWorldContentSecurityPolicy, topOrigin, timeOrigin, sessionID))
     112    , m_startupData(std::make_unique<WorkerThreadStartupData>(scriptURL, identifier, userAgent, isOnline, sourceCode, startMode, contentSecurityPolicyResponseHeaders, shouldBypassMainWorldContentSecurityPolicy, topOrigin, timeOrigin, sessionID))
    115113#if ENABLE(INDEXED_DATABASE)
    116114    , m_idbConnectionProxy(connectionProxy)
     
    170168        // be called before we've finished creating the WorkerGlobalScope.
    171169        LockHolder lock(m_threadCreationAndWorkerGlobalScopeMutex);
    172         m_workerGlobalScope = createWorkerGlobalScope(m_startupData->m_scriptURL, WTFMove(m_startupData->m_origin), m_startupData->m_name, m_startupData->m_identifier, m_startupData->m_userAgent, m_startupData->m_isOnline, m_startupData->m_contentSecurityPolicyResponseHeaders, m_startupData->m_shouldBypassMainWorldContentSecurityPolicy, WTFMove(m_startupData->m_topOrigin), m_startupData->m_timeOrigin, m_startupData->m_sessionID);
     170        m_workerGlobalScope = createWorkerGlobalScope(m_startupData->m_scriptURL, WTFMove(m_startupData->m_origin), m_startupData->m_identifier, m_startupData->m_userAgent, m_startupData->m_isOnline, m_startupData->m_contentSecurityPolicyResponseHeaders, m_startupData->m_shouldBypassMainWorldContentSecurityPolicy, WTFMove(m_startupData->m_topOrigin), m_startupData->m_timeOrigin, m_startupData->m_sessionID);
    173171
    174172        scriptController = m_workerGlobalScope->script();
  • trunk/Source/WebCore/workers/WorkerThread.h

    r235128 r235155  
    8888
    8989protected:
    90     WorkerThread(const URL&, const String& name, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerLoaderProxy&, WorkerDebuggerProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, JSC::RuntimeFlags, PAL::SessionID);
     90    WorkerThread(const URL&, const String& identifier, const String& userAgent, bool isOnline, const String& sourceCode, WorkerLoaderProxy&, WorkerDebuggerProxy&, WorkerReportingProxy&, WorkerThreadStartMode, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, const SecurityOrigin& topOrigin, MonotonicTime timeOrigin, IDBClient::IDBConnectionProxy*, SocketProvider*, JSC::RuntimeFlags, PAL::SessionID);
    9191
    9292    // Factory method for creating a new worker context for the thread.
    93     virtual Ref<WorkerGlobalScope> createWorkerGlobalScope(const URL&, Ref<SecurityOrigin>&&, const String& name, const String& identifier, const String& userAgent, bool isOnline, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID) = 0;
     93    virtual Ref<WorkerGlobalScope> createWorkerGlobalScope(const URL&, Ref<SecurityOrigin>&&, const String& identifier, const String& userAgent, bool isOnline, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID) = 0;
    9494
    9595    // Executes the event loop for the worker thread. Derived classes can override to perform actions before/after entering the event loop.
  • trunk/Source/WebCore/workers/service/context/ServiceWorkerThread.cpp

    r235128 r235155  
    7373
    7474ServiceWorkerThread::ServiceWorkerThread(const ServiceWorkerContextData& data, PAL::SessionID, String&& userAgent, WorkerLoaderProxy& loaderProxy, WorkerDebuggerProxy& debuggerProxy, IDBClient::IDBConnectionProxy* idbConnectionProxy, SocketProvider* socketProvider)
    75     : WorkerThread(data.scriptURL, emptyString(), "serviceworker:" + Inspector::IdentifiersFactory::createIdentifier(), WTFMove(userAgent), platformStrategies()->loaderStrategy()->isOnLine(), data.script, loaderProxy, debuggerProxy, DummyServiceWorkerThreadProxy::shared(), WorkerThreadStartMode::Normal, data.contentSecurityPolicy, false, data.registration.key.topOrigin().securityOrigin().get(), MonotonicTime::now(), idbConnectionProxy, socketProvider, JSC::RuntimeFlags::createAllEnabled(), data.sessionID)
     75    : WorkerThread(data.scriptURL, "serviceworker:" + Inspector::IdentifiersFactory::createIdentifier(), WTFMove(userAgent), platformStrategies()->loaderStrategy()->isOnLine(), data.script, loaderProxy, debuggerProxy, DummyServiceWorkerThreadProxy::shared(), WorkerThreadStartMode::Normal, data.contentSecurityPolicy, false, data.registration.key.topOrigin().securityOrigin().get(), MonotonicTime::now(), idbConnectionProxy, socketProvider, JSC::RuntimeFlags::createAllEnabled(), data.sessionID)
    7676    , m_data(data.isolatedCopy())
    7777    , m_workerObjectProxy(DummyServiceWorkerThreadProxy::shared())
     
    8282ServiceWorkerThread::~ServiceWorkerThread() = default;
    8383
    84 Ref<WorkerGlobalScope> ServiceWorkerThread::createWorkerGlobalScope(const URL& url, Ref<SecurityOrigin>&& origin, const String& name, const String& identifier, const String& userAgent, bool isOnline, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicy, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID sessionID)
     84Ref<WorkerGlobalScope> ServiceWorkerThread::createWorkerGlobalScope(const URL& url, Ref<SecurityOrigin>&& origin, const String& identifier, const String& userAgent, bool isOnline, const ContentSecurityPolicyResponseHeaders& contentSecurityPolicy, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID sessionID)
    8585{
    86     UNUSED_PARAM(name);
    8786    return ServiceWorkerGlobalScope::create(m_data, url, WTFMove(origin), identifier, userAgent, isOnline, *this, contentSecurityPolicy, shouldBypassMainWorldContentSecurityPolicy, WTFMove(topOrigin), timeOrigin, idbConnectionProxy(), socketProvider(), sessionID);
    8887}
  • trunk/Source/WebCore/workers/service/context/ServiceWorkerThread.h

    r235128 r235155  
    6767
    6868protected:
    69     Ref<WorkerGlobalScope> createWorkerGlobalScope(const URL&, Ref<SecurityOrigin>&&, const String& name, const String& identifier, const String& userAgent, bool isOnline, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID) final;
     69    Ref<WorkerGlobalScope> createWorkerGlobalScope(const URL&, Ref<SecurityOrigin>&&, const String& identifier, const String& userAgent, bool isOnline, const ContentSecurityPolicyResponseHeaders&, bool shouldBypassMainWorldContentSecurityPolicy, Ref<SecurityOrigin>&& topOrigin, MonotonicTime timeOrigin, PAL::SessionID) final;
    7070    void runEventLoop() override;
    7171
Note: See TracChangeset for help on using the changeset viewer.