Changeset 173736 in webkit


Ignore:
Timestamp:
Sep 18, 2014, 3:06:26 PM (11 years ago)
Author:
Joseph Pecoraro
Message:

Unreviewed rollout r173731. Broke multiple builds.

Source/JavaScriptCore:

  • inspector/JSGlobalObjectInspectorController.cpp:

(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::connectFrontend):

  • inspector/JSGlobalObjectInspectorController.h:
  • inspector/remote/RemoteInspector.h:
  • inspector/remote/RemoteInspector.mm:

(Inspector::RemoteInspector::RemoteInspector):
(Inspector::RemoteInspector::setupFailed):
(Inspector::RemoteInspector::start):
(Inspector::RemoteInspector::stopInternal):
(Inspector::RemoteInspector::setupXPCConnectionIfNeeded):
(Inspector::RemoteInspector::xpcConnectionReceivedMessage):
(Inspector::RemoteInspector::xpcConnectionFailed):
(Inspector::RemoteInspector::receivedSetupMessage):
(Inspector::globalAutomaticInspectionState): Deleted.
(Inspector::RemoteInspector::updateDebuggableAutomaticInspectCandidate): Deleted.
(Inspector::RemoteInspector::sendAutomaticInspectionCandidateMessage): Deleted.
(Inspector::RemoteInspector::setupSucceeded): Deleted.
(Inspector::RemoteInspector::waitingForAutomaticInspection): Deleted.
(Inspector::RemoteInspector::receivedAutomaticInspectionConfigurationMessage): Deleted.
(Inspector::RemoteInspector::receivedAutomaticInspectionRejectMessage): Deleted.

  • inspector/remote/RemoteInspectorConstants.h:
  • inspector/remote/RemoteInspectorDebuggable.cpp:

(Inspector::RemoteInspectorDebuggable::setRemoteDebuggingAllowed):
(Inspector::RemoteInspectorDebuggable::pauseWaitingForAutomaticInspection): Deleted.

  • inspector/remote/RemoteInspectorDebuggable.h:
  • inspector/remote/RemoteInspectorDebuggableConnection.h:
  • inspector/remote/RemoteInspectorDebuggableConnection.mm:

(Inspector::RemoteInspectorDebuggableConnection::setup):

  • runtime/JSGlobalObjectDebuggable.cpp:

(JSC::JSGlobalObjectDebuggable::connect):
(JSC::JSGlobalObjectDebuggable::pauseWaitingForAutomaticInspection): Deleted.

  • runtime/JSGlobalObjectDebuggable.h:

Source/WebCore:

  • WebCore.exp.in:
  • inspector/InspectorController.cpp:

(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::show):

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

(WebCore::PageDebuggable::connect):

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

(WebCore::Internals::openDummyInspectorFrontend):

Source/WTF:

  • wtf/Assertions.cpp:
  • wtf/Assertions.h:
Location:
trunk/Source
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r173731 r173736  
     12014-09-18  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Unreviewed rollout r173731. Broke multiple builds.
     4
     5        * inspector/JSGlobalObjectInspectorController.cpp:
     6        (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
     7        (Inspector::JSGlobalObjectInspectorController::connectFrontend):
     8        * inspector/JSGlobalObjectInspectorController.h:
     9        * inspector/remote/RemoteInspector.h:
     10        * inspector/remote/RemoteInspector.mm:
     11        (Inspector::RemoteInspector::RemoteInspector):
     12        (Inspector::RemoteInspector::setupFailed):
     13        (Inspector::RemoteInspector::start):
     14        (Inspector::RemoteInspector::stopInternal):
     15        (Inspector::RemoteInspector::setupXPCConnectionIfNeeded):
     16        (Inspector::RemoteInspector::xpcConnectionReceivedMessage):
     17        (Inspector::RemoteInspector::xpcConnectionFailed):
     18        (Inspector::RemoteInspector::receivedSetupMessage):
     19        (Inspector::globalAutomaticInspectionState): Deleted.
     20        (Inspector::RemoteInspector::updateDebuggableAutomaticInspectCandidate): Deleted.
     21        (Inspector::RemoteInspector::sendAutomaticInspectionCandidateMessage): Deleted.
     22        (Inspector::RemoteInspector::setupSucceeded): Deleted.
     23        (Inspector::RemoteInspector::waitingForAutomaticInspection): Deleted.
     24        (Inspector::RemoteInspector::receivedAutomaticInspectionConfigurationMessage): Deleted.
     25        (Inspector::RemoteInspector::receivedAutomaticInspectionRejectMessage): Deleted.
     26        * inspector/remote/RemoteInspectorConstants.h:
     27        * inspector/remote/RemoteInspectorDebuggable.cpp:
     28        (Inspector::RemoteInspectorDebuggable::setRemoteDebuggingAllowed):
     29        (Inspector::RemoteInspectorDebuggable::pauseWaitingForAutomaticInspection): Deleted.
     30        * inspector/remote/RemoteInspectorDebuggable.h:
     31        * inspector/remote/RemoteInspectorDebuggableConnection.h:
     32        * inspector/remote/RemoteInspectorDebuggableConnection.mm:
     33        (Inspector::RemoteInspectorDebuggableConnection::setup):
     34        * runtime/JSGlobalObjectDebuggable.cpp:
     35        (JSC::JSGlobalObjectDebuggable::connect):
     36        (JSC::JSGlobalObjectDebuggable::pauseWaitingForAutomaticInspection): Deleted.
     37        * runtime/JSGlobalObjectDebuggable.h:
     38
    1392014-09-18  Joseph Pecoraro  <pecoraro@apple.com>
    240
  • trunk/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp

    r173731 r173736  
    6262    auto debuggerAgent = std::make_unique<JSGlobalObjectDebuggerAgent>(m_injectedScriptManager.get(), m_globalObject, consoleAgent.get());
    6363
    64     m_debuggerAgent = debuggerAgent.get();
    6564    m_consoleAgent = consoleAgent.get();
    6665    m_consoleClient = std::make_unique<JSGlobalObjectConsoleClient>(m_consoleAgent);
     
    8685}
    8786
    88 void JSGlobalObjectInspectorController::connectFrontend(InspectorFrontendChannel* frontendChannel, bool isAutomaticInspection)
     87void JSGlobalObjectInspectorController::connectFrontend(InspectorFrontendChannel* frontendChannel)
    8988{
    9089    ASSERT(!m_inspectorFrontendChannel);
     
    9594
    9695    m_agents.didCreateFrontendAndBackend(frontendChannel, m_inspectorBackendDispatcher.get());
    97 
    98     if (isAutomaticInspection) {
    99         // FIXME: We should not always pause for automatic inspection.
    100         // Currently if we don't automatically pause, then we may miss a breakpoint, since breakpoints
    101         // come from the frontend and might be received after some evaluateScript message. We should
    102         // have the frontend signal the backend when its setup messages are complete.
    103         m_debuggerAgent->enable(nullptr);
    104         m_debuggerAgent->pause(nullptr);
    105     }
    10696}
    10797
  • trunk/Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.h

    r173731 r173736  
    4848class InspectorBackendDispatcher;
    4949class InspectorConsoleAgent;
    50 class InspectorDebuggerAgent;
    5150class InspectorFrontendChannel;
    5251class JSGlobalObjectConsoleClient;
     
    6059    ~JSGlobalObjectInspectorController();
    6160
    62     void connectFrontend(InspectorFrontendChannel*, bool isAutomaticInspection);
     61    void connectFrontend(InspectorFrontendChannel*);
    6362    void disconnectFrontend(InspectorDisconnectReason reason);
    6463    void dispatchMessageFromFrontend(const String&);
     
    8786    std::unique_ptr<JSGlobalObjectConsoleClient> m_consoleClient;
    8887    InspectorConsoleAgent* m_consoleAgent;
    89     InspectorDebuggerAgent* m_debuggerAgent;
    9088    InspectorAgentRegistry m_agents;
    9189    InspectorFrontendChannel* m_inspectorFrontendChannel;
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.h

    r173731 r173736  
    5353    void unregisterDebuggable(RemoteInspectorDebuggable*);
    5454    void updateDebuggable(RemoteInspectorDebuggable*);
    55     void updateDebuggableAutomaticInspectCandidate(RemoteInspectorDebuggable*);
    5655    void sendMessageToRemoteFrontend(unsigned identifier, const String& message);
    5756    void setupFailed(unsigned identifier);
    58     void setupSucceeded(unsigned identifier);
    59     bool waitingForAutomaticInspection(unsigned identifier);
    6057
    6158    bool enabled() const { return m_enabled; }
     
    8784    void updateHasActiveDebugSession();
    8885
    89     void sendAutomaticInspectionCandidateMessage();
    90 
    9186    virtual void xpcConnectionReceivedMessage(RemoteInspectorXPCConnection*, NSString *messageName, NSDictionary *userInfo) override;
    9287    virtual void xpcConnectionFailed(RemoteInspectorXPCConnection*) override;
     
    10095    void receivedProxyApplicationSetupMessage(NSDictionary *userInfo);
    10196    void receivedConnectionDiedMessage(NSDictionary *userInfo);
    102     void receivedAutomaticInspectionConfigurationMessage(NSDictionary *userInfo);
    103     void receivedAutomaticInspectionRejectMessage(NSDictionary *userInfo);
    10497
    10598    static bool startEnabled;
     
    125118    RetainPtr<CFDataRef> m_parentProcessAuditData;
    126119    bool m_shouldSendParentProcessInformation;
    127     bool m_automaticInspectionEnabled;
    128     bool m_automaticInspectionPaused;
    129     unsigned m_automaticInspectionCandidateIdentifier;
    130120};
    131121
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspector.mm

    r173731 r173736  
    11/*
    2  * Copyright (C) 2013, 2014 Apple Inc. All Rights Reserved.
     2 * Copyright (C) 2013 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    6969}
    7070
    71 static bool globalAutomaticInspectionState()
    72 {
    73     int token = 0;
    74     if (notify_register_check(WIRAutomaticInspectionEnabledState, &token) != NOTIFY_STATUS_OK)
    75         return false;
    76 
    77     uint64_t automaticInspectionEnabled = 0;
    78     notify_get_state(token, &automaticInspectionEnabled);
    79     return automaticInspectionEnabled == 1;
    80 }
    81 
    8271static void dispatchAsyncOnQueueSafeForAnyDebuggable(void (^block)())
    8372{
     
    124113    , m_parentProcessIdentifier(0)
    125114    , m_shouldSendParentProcessInformation(false)
    126     , m_automaticInspectionEnabled(false)
    127     , m_automaticInspectionPaused(false)
    128     , m_automaticInspectionCandidateIdentifier(0)
    129115{
    130116}
     
    185171}
    186172
    187 void RemoteInspector::updateDebuggableAutomaticInspectCandidate(RemoteInspectorDebuggable* debuggable)
    188 {
    189     {
    190         std::lock_guard<std::mutex> lock(m_mutex);
    191 
    192         unsigned identifier = debuggable->identifier();
    193         if (!identifier)
    194             return;
    195 
    196         auto result = m_debuggableMap.set(identifier, std::make_pair(debuggable, debuggable->info()));
    197         ASSERT_UNUSED(result, !result.isNewEntry);
    198 
    199         // Don't allow automatic inspection unless there is a debugger or we are stopped.
    200         if (!WTFIsDebuggerAttached() || !m_automaticInspectionEnabled || !m_enabled) {
    201             pushListingSoon();
    202             return;
    203         }
    204 
    205         // FIXME: We should handle multiple debuggables trying to pause at the same time on different threads.
    206         // To make this work we will need to change m_automaticInspectionCandidateIdentifier to be a per-thread value.
    207         // Multiple attempts on the same thread should not be possible because our nested run loop is in a special RWI mode.
    208         if (m_automaticInspectionPaused) {
    209             LOG_ERROR("Skipping Automatic Inspection Candidate with pageId(%u) because we are already paused waiting for pageId(%u)", identifier, m_automaticInspectionCandidateIdentifier);
    210             pushListingSoon();
    211             return;
    212         }
    213 
    214         m_automaticInspectionPaused = true;
    215         m_automaticInspectionCandidateIdentifier = identifier;
    216 
    217         // If we are pausing before we have connected to webinspectord the candidate message will be sent as soon as the connection is established.
    218         if (m_xpcConnection) {
    219             pushListingNow();
    220             sendAutomaticInspectionCandidateMessage();
    221         }
    222 
    223         // In case debuggers fail to respond, or we cannot connect to webinspectord, automatically continue after a short period of time.
    224         dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.3 * NSEC_PER_SEC), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
    225             std::lock_guard<std::mutex> lock(m_mutex);
    226             if (m_automaticInspectionCandidateIdentifier == identifier) {
    227                 LOG_ERROR("Skipping Automatic Inspection Candidate with pageId(%u) because we failed to receive a response in time.", m_automaticInspectionCandidateIdentifier);
    228                 m_automaticInspectionPaused = false;
    229             }
    230         });
    231     }
    232 
    233     debuggable->pauseWaitingForAutomaticInspection();
    234 
    235     {
    236         std::lock_guard<std::mutex> lock(m_mutex);
    237 
    238         ASSERT(m_automaticInspectionCandidateIdentifier);
    239         m_automaticInspectionCandidateIdentifier = 0;
    240     }
    241 }
    242 
    243 void RemoteInspector::sendAutomaticInspectionCandidateMessage()
    244 {
    245     ASSERT(m_enabled);
    246     ASSERT(m_automaticInspectionEnabled);
    247     ASSERT(m_automaticInspectionPaused);
    248     ASSERT(m_automaticInspectionCandidateIdentifier);
    249     ASSERT(m_xpcConnection);
    250 
    251     NSDictionary *details = @{WIRPageIdentifierKey: @(m_automaticInspectionCandidateIdentifier)};
    252     m_xpcConnection->sendMessage(WIRAutomaticInspectionCandidateMessage, details);
    253 }
    254 
    255173void RemoteInspector::sendMessageToRemoteFrontend(unsigned identifier, const String& message)
    256174{
     
    281199    updateHasActiveDebugSession();
    282200
    283     if (identifier == m_automaticInspectionCandidateIdentifier)
    284         m_automaticInspectionPaused = false;
    285 
    286201    pushListingSoon();
    287202}
    288203
    289 void RemoteInspector::setupSucceeded(unsigned identifier)
    290 {
    291     std::lock_guard<std::mutex> lock(m_mutex);
    292 
    293     if (identifier == m_automaticInspectionCandidateIdentifier)
    294         m_automaticInspectionPaused = false;
    295 }
    296 
    297 bool RemoteInspector::waitingForAutomaticInspection(unsigned)
    298 {
    299     // We don't take the lock to check this because we assume it will be checked repeatedly.
    300     return m_automaticInspectionPaused;
    301 }
    302 
    303204void RemoteInspector::start()
    304205{
     
    309210
    310211    m_enabled = true;
    311 
    312     // Load the initial automatic inspection state when first started, so we know it before we have even connected to webinspectord.
    313     static dispatch_once_t once;
    314     dispatch_once(&once, ^{
    315         m_automaticInspectionEnabled = globalAutomaticInspectionState();
    316     });
    317212
    318213    notify_register_dispatch(WIRServiceAvailableNotification, &m_notifyToken, m_xpcQueue, ^(int) {
     
    344239
    345240    updateHasActiveDebugSession();
    346 
    347     m_automaticInspectionPaused = false;
    348241
    349242    if (m_xpcConnection) {
     
    378271    xpc_release(connection);
    379272
    380     if (m_automaticInspectionCandidateIdentifier) {
    381         // We already have a debuggable waiting to be automatically inspected.
    382         pushListingNow();
    383         sendAutomaticInspectionCandidateMessage();
    384     } else
    385         pushListingSoon();
     273    pushListingSoon();
    386274}
    387275
     
    427315    else if ([messageName isEqualToString:WIRConnectionDiedMessage])
    428316        receivedConnectionDiedMessage(userInfo);
    429     else if ([messageName isEqualToString:WIRAutomaticInspectionConfigurationMessage])
    430         receivedAutomaticInspectionConfigurationMessage(userInfo);
    431     else if ([messageName isEqualToString:WIRAutomaticInspectionRejectMessage])
    432         receivedAutomaticInspectionRejectMessage(userInfo);
    433317    else
    434318        NSLog(@"Unrecognized RemoteInspector XPC Message: %@", messageName);
     
    450334
    451335    updateHasActiveDebugSession();
    452 
    453     m_automaticInspectionPaused = false;
    454336
    455337    // The connection will close itself.
     
    552434}
    553435
    554 
    555436#pragma mark - Received XPC Messages
    556437
     
    581462    RemoteInspectorDebuggableInfo debuggableInfo = it->value.second;
    582463    RefPtr<RemoteInspectorDebuggableConnection> connection = adoptRef(new RemoteInspectorDebuggableConnection(debuggable, connectionIdentifier, sender, debuggableInfo.type));
    583     bool isAutomaticInspection = m_automaticInspectionCandidateIdentifier == debuggable->identifier();
    584     if (!connection->setup(isAutomaticInspection)) {
     464    if (!connection->setup()) {
    585465        connection->close();
    586466        return;
     
    714594}
    715595
    716 void RemoteInspector::receivedAutomaticInspectionConfigurationMessage(NSDictionary *userInfo)
    717 {
    718     m_automaticInspectionEnabled = [[userInfo objectForKey:WIRAutomaticInspectionEnabledKey] boolValue];
    719 
    720     if (!m_automaticInspectionEnabled && m_automaticInspectionPaused)
    721         m_automaticInspectionPaused = false;
    722 }
    723 
    724 void RemoteInspector::receivedAutomaticInspectionRejectMessage(NSDictionary *userInfo)
    725 {
    726     unsigned rejectionIdentifier = [[userInfo objectForKey:WIRPageIdentifierKey] unsignedIntValue];
    727 
    728     ASSERT(rejectionIdentifier == m_automaticInspectionCandidateIdentifier);
    729     if (rejectionIdentifier == m_automaticInspectionCandidateIdentifier)
    730         m_automaticInspectionPaused = false;
    731 }
    732 
    733596} // namespace Inspector
    734597
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorConstants.h

    r173731 r173736  
    3838#define WIRServiceEnabledNotification           "com.apple.webinspectord.enabled"
    3939#define WIRServiceDisabledNotification          "com.apple.webinspectord.disabled"
    40 #define WIRAutomaticInspectionEnabledState      "com.apple.webinspectord.automatic_inspection_enabled"
    4140
    4241
     
    4544#define WIRApplicationNameKey                   @"WIRApplicationNameKey"
    4645#define WIRIsApplicationProxyKey                @"WIRIsApplicationProxyKey"
    47 #define WIRIsApplicationActiveKey               @"WIRIsApplicationActiveKey"
    4846#define WIRHostApplicationIdentifierKey         @"WIRHostApplicationIdentifierKey"
    4947#define WIRHostApplicationNameKey               @"WIRHostApplicationNameKey"
     
    7472#define WIRTypeWeb                              @"WIRTypeWeb"
    7573
    76 #define WIRAutomaticInspectionEnabledKey           @"WIRAutomaticInspectionEnabledKey"
    77 #define WIRAutomaticInspectionSessionIdentifierKey @"WIRAutomaticInspectionSessionIdentifierKey"
    78 #define WIRAutomaticInspectionConfigurationMessage @"WIRAutomaticInspectionConfigurationMessage"
    79 #define WIRAutomaticInspectionRejectMessage        @"WIRAutomaticInspectionRejectMessage"
    80 #define WIRAutomaticInspectionCandidateMessage     @"WIRAutomaticInspectionCandidateMessage"
    81 
    8274// These definitions are shared with a Simulator webinspectord and
    8375// OS X process communicating with it.
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggable.cpp

    r173731 r173736  
    2929#if ENABLE(REMOTE_INSPECTOR)
    3030
    31 #include "EventLoop.h"
    3231#include "InspectorFrontendChannel.h"
    3332#include "RemoteInspector.h"
     
    6362    m_allowed = allowed;
    6463
    65     if (m_allowed && automaticInspectionAllowed())
    66         RemoteInspector::shared().updateDebuggableAutomaticInspectCandidate(this);
    67     else
    68         RemoteInspector::shared().updateDebuggable(this);
     64    update();
    6965}
    7066
     
    8177}
    8278
    83 void RemoteInspectorDebuggable::pauseWaitingForAutomaticInspection()
    84 {
    85     ASSERT(m_identifier);
    86     ASSERT(m_allowed);
    87     ASSERT(automaticInspectionAllowed());
    88 
    89     EventLoop loop;
    90     while (RemoteInspector::shared().waitingForAutomaticInspection(identifier()) && !loop.ended())
    91         loop.cycle();
    92 }
    93 
    9479} // namespace Inspector
    9580
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggable.h

    r173731 r173736  
    6363    virtual bool hasLocalDebugger() const = 0;
    6464
    65     virtual void connect(InspectorFrontendChannel*, bool isAutomaticInspection) = 0;
     65    virtual void connect(InspectorFrontendChannel*) = 0;
    6666    virtual void disconnect() = 0;
    6767    virtual void dispatchMessageFromRemoteFrontend(const String& message) = 0;
    6868    virtual void setIndicating(bool) { } // Default is to do nothing.
    69 
    70     virtual bool automaticInspectionAllowed() const { return false; }
    71     virtual void pauseWaitingForAutomaticInspection();
    7269
    7370private:
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggableConnection.h

    r173731 r173736  
    8585    unsigned identifier() const { return m_identifier; }
    8686
    87     bool setup(bool isAutomaticInspection);
     87    bool setup();
    8888
    8989    void close();
  • trunk/Source/JavaScriptCore/inspector/remote/RemoteInspectorDebuggableConnection.mm

    r173731 r173736  
    150150}
    151151
    152 bool RemoteInspectorDebuggableConnection::setup(bool isAutomaticInspection)
     152bool RemoteInspectorDebuggableConnection::setup()
    153153{
    154154    std::lock_guard<std::mutex> lock(m_debuggableMutex);
     
    165165                m_debuggable = nullptr;
    166166            } else {
    167                 m_debuggable->connect(this, isAutomaticInspection);
     167                m_debuggable->connect(this);
    168168                m_connected = true;
    169                 RemoteInspector::shared().setupSucceeded(identifier());
    170169            }
    171170        }
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObjectDebuggable.cpp

    r173731 r173736  
    2929#if ENABLE(REMOTE_INSPECTOR)
    3030
    31 #include "JSLock.h"
    3231#include "InspectorAgentBase.h"
    3332#include "InspectorFrontendChannel.h"
     
    5049}
    5150
    52 void JSGlobalObjectDebuggable::connect(InspectorFrontendChannel* frontendChannel, bool automaticInspection)
     51void JSGlobalObjectDebuggable::connect(InspectorFrontendChannel* frontendChannel)
    5352{
    5453    JSLockHolder locker(&m_globalObject.vm());
    5554
    56     m_globalObject.inspectorController().connectFrontend(frontendChannel, automaticInspection);
     55    m_globalObject.inspectorController().connectFrontend(frontendChannel);
    5756}
    5857
     
    7170}
    7271
    73 void JSGlobalObjectDebuggable::pauseWaitingForAutomaticInspection()
    74 {
    75     JSC::JSLock::DropAllLocks dropAllLocks(&m_globalObject.vm());
    76     RemoteInspectorDebuggable::pauseWaitingForAutomaticInspection();
    77 }
    78 
    7972} // namespace JSC
    8073
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObjectDebuggable.h

    r173731 r173736  
    5252    virtual bool hasLocalDebugger() const override { return false; }
    5353
    54     virtual void connect(Inspector::InspectorFrontendChannel*, bool automaticInspection) override;
     54    virtual void connect(Inspector::InspectorFrontendChannel*) override;
    5555    virtual void disconnect() override;
    5656    virtual void dispatchMessageFromRemoteFrontend(const String& message) override;
    57 
    58     virtual bool automaticInspectionAllowed() const override { return true; }
    59     virtual void pauseWaitingForAutomaticInspection() override;
    6057
    6158private:
  • trunk/Source/WTF/ChangeLog

    r173731 r173736  
     12014-09-18  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Unreviewed rollout r173731. Broke multiple builds.
     4
     5        * wtf/Assertions.cpp:
     6        * wtf/Assertions.h:
     7
    182014-09-18  Joseph Pecoraro  <pecoraro@apple.com>
    29
  • trunk/Source/WTF/wtf/Assertions.cpp

    r173731 r173736  
    6464#endif
    6565
    66 #if OS(DARWIN)
    67 #include <sys/sysctl.h>
    68 #include <unistd.h>
    69 #endif
    70 
    7166#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
    7267#include <cxxabi.h>
     
    391386}
    392387
    393 bool WTFIsDebuggerAttached()
    394 {
    395 #if OS(DARWIN)
    396     struct kinfo_proc info;
    397     int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
    398     size_t size = sizeof(info);
    399     if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), &info, &size, nullptr, 0) != 0)
    400         return false;
    401     return (info.kp_proc.p_flag & P_TRACED) != 0;
    402 #else
    403     return false;
    404 #endif
    405 }
    406 
    407388void WTFReportFatalError(const char* file, int line, const char* function, const char* format, ...)
    408389{
  • trunk/Source/WTF/wtf/Assertions.h

    r173731 r173736  
    3939#include <inttypes.h>
    4040#include <stdarg.h>
    41 #include <stdbool.h>
    4241#include <stddef.h>
    4342
     
    146145WTF_EXPORT_PRIVATE void WTFSetCrashHook(WTFCrashHookFunction);
    147146WTF_EXPORT_PRIVATE void WTFInstallReportBacktraceOnCrashHook();
    148 
    149 WTF_EXPORT_PRIVATE bool WTFIsDebuggerAttached();
    150147
    151148#ifdef __cplusplus
  • trunk/Source/WebCore/ChangeLog

    r173734 r173736  
     12014-09-18  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Unreviewed rollout r173731. Broke multiple builds.
     4
     5        * WebCore.exp.in:
     6        * inspector/InspectorController.cpp:
     7        (WebCore::InspectorController::connectFrontend):
     8        (WebCore::InspectorController::show):
     9        * inspector/InspectorController.h:
     10        * page/PageDebuggable.cpp:
     11        (WebCore::PageDebuggable::connect):
     12        * page/PageDebuggable.h:
     13        * testing/Internals.cpp:
     14        (WebCore::Internals::openDummyInspectorFrontend):
     15
    1162014-09-18  Beth Dakin  <bdakin@apple.com>
    217
  • trunk/Source/WebCore/WebCore.exp.in

    r173731 r173736  
    31243124__ZN7WebCore14SchemeRegistry27shouldTreatURLSchemeAsLocalERKN3WTF6StringE
    31253125__ZN7WebCore15InspectorClient31doDispatchMessageOnFrontendPageEPNS_4PageERKN3WTF6StringE
    3126 __ZN7WebCore19InspectorController15connectFrontendEPN9Inspector24InspectorFrontendChannelEb
     3126__ZN7WebCore19InspectorController15connectFrontendEPN9Inspector24InspectorFrontendChannelE
    31273127__ZN7WebCore19InspectorController18disconnectFrontendEN9Inspector25InspectorDisconnectReasonE
    31283128__ZN7WebCore19InspectorController18setProfilerEnabledEb
  • trunk/Source/WebCore/inspector/InspectorController.cpp

    r173731 r173736  
    231231}
    232232
    233 void InspectorController::connectFrontend(InspectorFrontendChannel* frontendChannel, bool)
     233void InspectorController::connectFrontend(InspectorFrontendChannel* frontendChannel)
    234234{
    235235    ASSERT(frontendChannel);
     
    286286        InspectorFrontendChannel* frontendChannel = m_inspectorClient->openInspectorFrontend(this);
    287287        if (frontendChannel)
    288             connectFrontend(frontendChannel, false);
     288            connectFrontend(frontendChannel);
    289289    }
    290290}
  • trunk/Source/WebCore/inspector/InspectorController.h

    r173731 r173736  
    9494    bool hasRemoteFrontend() const;
    9595
    96     WEBCORE_EXPORT void connectFrontend(Inspector::InspectorFrontendChannel*, bool isAutomaticInspection);
     96    WEBCORE_EXPORT void connectFrontend(Inspector::InspectorFrontendChannel*);
    9797    WEBCORE_EXPORT void disconnectFrontend(Inspector::InspectorDisconnectReason);
    9898    void setProcessId(long);
  • trunk/Source/WebCore/page/PageDebuggable.cpp

    r173731 r173736  
    6969}
    7070
    71 void PageDebuggable::connect(Inspector::InspectorFrontendChannel* channel, bool isAutomaticInspection)
     71void PageDebuggable::connect(Inspector::InspectorFrontendChannel* channel)
    7272{
    7373    if (!m_page.settings().developerExtrasEnabled()) {
     
    7979    InspectorController& inspectorController = m_page.inspectorController();
    8080    inspectorController.setHasRemoteFrontend(true);
    81     inspectorController.connectFrontend(reinterpret_cast<WebCore::InspectorFrontendChannel*>(channel), isAutomaticInspection);
     81    inspectorController.connectFrontend(reinterpret_cast<WebCore::InspectorFrontendChannel*>(channel));
    8282}
    8383
  • trunk/Source/WebCore/page/PageDebuggable.h

    r173731 r173736  
    4848    virtual bool hasLocalDebugger() const override;
    4949
    50     virtual void connect(Inspector::InspectorFrontendChannel*, bool isAutomaticInspection) override;
     50    virtual void connect(Inspector::InspectorFrontendChannel*) override;
    5151    virtual void disconnect() override;
    5252    virtual void dispatchMessageFromRemoteFrontend(const String& message) override;
  • trunk/Source/WebCore/testing/Internals.cpp

    r173731 r173736  
    14781478    m_frontendChannel = adoptPtr(new InspectorFrontendChannelDummy(frontendPage));
    14791479
    1480     bool isAutomaticInspection = false;
    1481     page->inspectorController().connectFrontend(m_frontendChannel.get(), isAutomaticInspection);
     1480    page->inspectorController().connectFrontend(m_frontendChannel.get());
    14821481
    14831482    return m_frontendWindow;
Note: See TracChangeset for help on using the changeset viewer.