Changeset 224826 in webkit


Ignore:
Timestamp:
Nov 14, 2017, 11:44:18 AM (7 years ago)
Author:
Joseph Pecoraro
Message:

Web Inspector: Add a ServiceWorker domain to get information about an inspected ServiceWorker
https://bugs.webkit.org/show_bug.cgi?id=179640
<rdar://problem/35517361>

Reviewed by Devin Rousso.

Source/JavaScriptCore:

  • CMakeLists.txt:
  • DerivedSources.make:

Gate the ServiceWorker domain on the ENABLE feature flag.

  • inspector/protocol/ServiceWorker.json: Added.

New domain to be made available inside of a ServiceWorker target.

Source/WebCore:

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • inspector/InspectorAllInOne.cpp:

New files.

  • inspector/WorkerInspectorController.cpp:

(WebCore::WorkerInspectorController::createLazyAgents):
Add a ServiceWorkerAgent when the Worker is a ServiceWorker.

  • inspector/agents/worker/ServiceWorkerAgent.h: Added.
  • inspector/agents/worker/ServiceWorkerAgent.cpp: Added.

(WebCore::ServiceWorkerAgent::ServiceWorkerAgent):
(WebCore::ServiceWorkerAgent::didCreateFrontendAndBackend):
(WebCore::ServiceWorkerAgent::willDestroyFrontendAndBackend):
(WebCore::ServiceWorkerAgent::getInitializationInfo):
Populate initialization info.

Location:
trunk/Source
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/Source/JavaScriptCore/CMakeLists.txt

    r224230 r224826  
    454454endif ()
    455455
     456if (ENABLE_SERVICE_WORKER)
     457    list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
     458        ${JAVASCRIPTCORE_DIR}/inspector/protocol/ServiceWorker.json
     459    )
     460endif ()
     461
    456462add_custom_command(
    457463    OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/CombinedDomains.json
  • TabularUnified trunk/Source/JavaScriptCore/ChangeLog

    r224818 r224826  
     12017-11-14  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Add a ServiceWorker domain to get information about an inspected ServiceWorker
     4        https://bugs.webkit.org/show_bug.cgi?id=179640
     5        <rdar://problem/35517361>
     6
     7        Reviewed by Devin Rousso.
     8
     9        * CMakeLists.txt:
     10        * DerivedSources.make:
     11        Gate the ServiceWorker domain on the ENABLE feature flag.
     12
     13        * inspector/protocol/ServiceWorker.json: Added.
     14        New domain to be made available inside of a ServiceWorker target.
     15
    1162017-11-14  Yusuke Suzuki  <utatane.tea@gmail.com>
    217
  • TabularUnified trunk/Source/JavaScriptCore/DerivedSources.make

    r223081 r224826  
    254254endif
    255255
     256ifeq ($(findstring ENABLE_SERVICE_WORKER,$(FEATURE_DEFINES)), ENABLE_SERVICE_WORKER)
     257    INSPECTOR_DOMAINS := $(INSPECTOR_DOMAINS) $(JavaScriptCore)/inspector/protocol/ServiceWorker.json
     258endif
     259
    256260INSPECTOR_GENERATOR_SCRIPTS = \
    257261        $(JavaScriptCore)/inspector/scripts/codegen/__init__.py \
  • TabularUnified trunk/Source/WebCore/ChangeLog

    r224824 r224826  
     12017-11-14  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Add a ServiceWorker domain to get information about an inspected ServiceWorker
     4        https://bugs.webkit.org/show_bug.cgi?id=179640
     5        <rdar://problem/35517361>
     6
     7        Reviewed by Devin Rousso.
     8
     9        * Sources.txt:
     10        * WebCore.xcodeproj/project.pbxproj:
     11        * inspector/InspectorAllInOne.cpp:
     12        New files.
     13
     14        * inspector/WorkerInspectorController.cpp:
     15        (WebCore::WorkerInspectorController::createLazyAgents):
     16        Add a ServiceWorkerAgent when the Worker is a ServiceWorker.
     17
     18        * inspector/agents/worker/ServiceWorkerAgent.h: Added.
     19        * inspector/agents/worker/ServiceWorkerAgent.cpp: Added.
     20        (WebCore::ServiceWorkerAgent::ServiceWorkerAgent):
     21        (WebCore::ServiceWorkerAgent::didCreateFrontendAndBackend):
     22        (WebCore::ServiceWorkerAgent::willDestroyFrontendAndBackend):
     23        (WebCore::ServiceWorkerAgent::getInitializationInfo):
     24        Populate initialization info.
     25
    1262017-11-14  Brady Eidson  <beidson@apple.com>
    227
  • TabularUnified trunk/Source/WebCore/Sources.txt

    r224804 r224826  
    11541154inspector/agents/page/PageRuntimeAgent.cpp
    11551155
     1156inspector/agents/worker/ServiceWorkerAgent.cpp
    11561157inspector/agents/worker/WorkerConsoleAgent.cpp
    11571158inspector/agents/worker/WorkerDebuggerAgent.cpp
  • TabularUnified trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r224804 r224826  
    28392839                A578F43C1DE01423003DFC6A /* JSPromiseRejectionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A578F43A1DE013FB003DFC6A /* JSPromiseRejectionEvent.h */; };
    28402840                A578F43F1DE0B630003DFC6A /* RejectedPromiseTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = A578F43E1DE0B62B003DFC6A /* RejectedPromiseTracker.h */; settings = {ATTRIBUTES = (Private, ); }; };
     2841                A581ED131FB288CF00CED4EC /* ServiceWorkerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = A581ED101FB288C800CED4EC /* ServiceWorkerAgent.h */; };
    28412842                A5840E1D187B74D500843B10 /* InspectorInstrumentationCookie.h in Headers */ = {isa = PBXBuildFile; fileRef = A5840E1B187B74D500843B10 /* InspectorInstrumentationCookie.h */; settings = {ATTRIBUTES = (Private, ); }; };
    28422843                A5840E25187B8AC200843B10 /* WebInjectedScriptHost.h in Headers */ = {isa = PBXBuildFile; fileRef = A5840E23187B8AC200843B10 /* WebInjectedScriptHost.h */; };
     
    1073310734                A578F43D1DE0B62B003DFC6A /* RejectedPromiseTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RejectedPromiseTracker.cpp; sourceTree = "<group>"; };
    1073410735                A578F43E1DE0B62B003DFC6A /* RejectedPromiseTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RejectedPromiseTracker.h; sourceTree = "<group>"; };
     10736                A581ED101FB288C800CED4EC /* ServiceWorkerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerAgent.h; sourceTree = "<group>"; };
     10737                A581ED121FB288C900CED4EC /* ServiceWorkerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerAgent.cpp; sourceTree = "<group>"; };
    1073510738                A5840E1A187B74D500843B10 /* InspectorInstrumentationCookie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorInstrumentationCookie.cpp; sourceTree = "<group>"; };
    1073610739                A5840E1B187B74D500843B10 /* InspectorInstrumentationCookie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorInstrumentationCookie.h; sourceTree = "<group>"; };
     
    2062720630                        isa = PBXGroup;
    2062820631                        children = (
     20632                                A581ED121FB288C900CED4EC /* ServiceWorkerAgent.cpp */,
     20633                                A581ED101FB288C800CED4EC /* ServiceWorkerAgent.h */,
    2062920634                                A5B81CCB1FAA44DA0037D1E6 /* WorkerConsoleAgent.cpp */,
    2063020635                                A5B81CCA1FAA44DA0037D1E6 /* WorkerConsoleAgent.h */,
     
    2898028985                                2D93AEE319DF5641002A86C3 /* ServicesOverlayController.h in Headers */,
    2898128986                                51F1755D1F3EBC8300C74950 /* ServiceWorker.h in Headers */,
     28987                                A581ED131FB288CF00CED4EC /* ServiceWorkerAgent.h in Headers */,
    2898228988                                46EF142D1F97B7D800C2A524 /* ServiceWorkerClient.h in Headers */,
    2898328989                                837D46271FA2A8CE0054E1FA /* ServiceWorkerClientIdentifier.h in Headers */,
  • TabularUnified trunk/Source/WebCore/inspector/InspectorAllInOne.cpp

    r224788 r224826  
    6161#include "PageRuntimeAgent.cpp"
    6262#include "PageScriptDebugServer.cpp"
     63#include "ServiceWorkerAgent.cpp"
    6364#include "TimelineRecordFactory.cpp"
    6465#include "WebConsoleAgent.cpp"
  • TabularUnified trunk/Source/WebCore/inspector/WorkerInspectorController.cpp

    r224788 r224826  
    4848
    4949#if ENABLE(SERVICE_WORKER)
     50#include "ServiceWorkerAgent.h"
    5051#include "ServiceWorkerGlobalScope.h"
    5152#endif
     
    170171#if ENABLE(SERVICE_WORKER)
    171172    auto workerContext = workerAgentContext();
    172     if (is<ServiceWorkerGlobalScope>(m_workerGlobalScope))
     173    if (is<ServiceWorkerGlobalScope>(m_workerGlobalScope)) {
     174        m_agents.append(std::make_unique<ServiceWorkerAgent>(workerContext));
    173175        m_agents.append(std::make_unique<WorkerNetworkAgent>(workerContext));
     176    }
    174177#endif
    175178}
Note: See TracChangeset for help on using the changeset viewer.