Changeset 161994 in webkit for trunk/Source/JavaScriptCore


Ignore:
Timestamp:
Jan 14, 2014, 12:23:41 PM (11 years ago)
Author:
[email protected]
Message:

Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
https://bugs.webkit.org/show_bug.cgi?id=126995

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2014-01-14
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/remote/RemoteInspector.mm:

(Inspector::RemoteInspector::listingForDebuggable):
For each WebView, list the parent process. Listing the parent per WebView
is already supported back when we supported processes that could host WebViews
for multiple applications.

  • inspector/remote/RemoteInspectorConstants.h:

Add a separate key for the bundle identifier, separate from application identifier.

  • inspector/remote/RemoteInspectorDebuggable.cpp:

(Inspector::RemoteInspectorDebuggable::info):

  • inspector/remote/RemoteInspectorDebuggable.h:

(Inspector::RemoteInspectorDebuggableInfo::RemoteInspectorDebuggableInfo):
(Inspector::RemoteInspectorDebuggableInfo::hasParentProcess):
If a RemoteInspectorDebuggable has a non-zero parent process identifier
it is a proxy for the parent process.

Source/WebCore:

  • inspector/InspectorClient.h:

(WebCore::InspectorClient::parentProcessIdentifier):
Client method intended for WebKit2 so a WebProcess can link to its UIProcess.

  • page/PageDebuggable.h:
  • page/PageDebuggable.cpp:

(WebCore::PageDebuggable::parentProcessIdentifier):
Provide parent process identifier if there is one.

Source/WebKit2:

  • WebProcess/WebCoreSupport/WebInspectorClient.h:
  • WebProcess/WebCoreSupport/WebInspectorClient.cpp:

(WebKit::WebInspectorClient::parentProcessIdentifier):
WebProcesses are proxies for a parent UIProcess.

Location:
trunk/Source/JavaScriptCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r161988 r161994  
     12014-01-14  Joseph Pecoraro  <[email protected]>
     2
     3        Web Inspector: For Remote Inspection link WebProcess's to their parent UIProcess
     4        https://bugs.webkit.org/show_bug.cgi?id=126995
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * inspector/remote/RemoteInspector.mm:
     9        (Inspector::RemoteInspector::listingForDebuggable):
     10        For each WebView, list the parent process. Listing the parent per WebView
     11        is already supported back when we supported processes that could host WebViews
     12        for multiple applications.
     13
     14        * inspector/remote/RemoteInspectorConstants.h:
     15        Add a separate key for the bundle identifier, separate from application identifier.
     16
     17        * inspector/remote/RemoteInspectorDebuggable.cpp:
     18        (Inspector::RemoteInspectorDebuggable::info):
     19        * inspector/remote/RemoteInspectorDebuggable.h:
     20        (Inspector::RemoteInspectorDebuggableInfo::RemoteInspectorDebuggableInfo):
     21        (Inspector::RemoteInspectorDebuggableInfo::hasParentProcess):
     22        If a RemoteInspectorDebuggable has a non-zero parent process identifier
     23        it is a proxy for the parent process.
     24
    1252014-01-14  Brian J. Burg  <[email protected]>
    226
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm

    r161953 r161994  
    298298        [debuggableDetails setObject:@YES forKey:WIRHasLocalDebuggerKey];
    299299
     300    if (debuggableInfo.hasParentProcess()) {
     301        NSString *parentApplicationIdentifier = [NSString stringWithFormat:@"PID:%lu", (unsigned long)debuggableInfo.parentProcessIdentifier];
     302        [debuggableDetails setObject:parentApplicationIdentifier forKey:WIRHostApplicationIdentifierKey];
     303    }
     304
    300305    return debuggableDetails;
    301306}
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h

    r160887 r161994  
    4141
    4242#define WIRApplicationIdentifierKey             @"WIRApplicationIdentifierKey"
     43#define WIRApplicationBundleIdentifierKey       @"WIRApplicationBundleIdentifierKey"
    4344#define WIRApplicationNameKey                   @"WIRApplicationNameKey"
    4445#define WIRIsApplicationProxyKey                @"WIRIsApplicationProxyKey"
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggable.cpp

    r160099 r161994  
    7474    info.hasLocalDebugger = hasLocalDebugger();
    7575    info.remoteDebuggingAllowed = remoteDebuggingAllowed();
     76    info.parentProcessIdentifier = parentProcessIdentifier();
    7677    return info;
    7778}
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggable.h

    r160099 r161994  
    5757    virtual String url() const { return String(); } // Web
    5858    virtual bool hasLocalDebugger() const = 0;
     59    virtual pid_t parentProcessIdentifier() const { return 0; }
    5960
    6061    virtual void connect(InspectorFrontendChannel*) = 0;
     
    7475        , hasLocalDebugger(false)
    7576        , remoteDebuggingAllowed(false)
     77        , parentProcessIdentifier(0)
    7678    {
    7779    }
     80
     81    bool hasParentProcess() const { return !!parentProcessIdentifier; }
    7882
    7983    unsigned identifier;
     
    8387    bool hasLocalDebugger;
    8488    bool remoteDebuggingAllowed;
     89    pid_t parentProcessIdentifier;
    8590};
    8691
Note: See TracChangeset for help on using the changeset viewer.