X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/81345200c95645a1b0d2635520f96ad55dfde63f..refs/heads/master:/runtime/JSGlobalObjectDebuggable.cpp diff --git a/runtime/JSGlobalObjectDebuggable.cpp b/runtime/JSGlobalObjectDebuggable.cpp index 05e0d87..eecc5ba 100644 --- a/runtime/JSGlobalObjectDebuggable.cpp +++ b/runtime/JSGlobalObjectDebuggable.cpp @@ -31,6 +31,7 @@ #include "InspectorAgentBase.h" #include "InspectorFrontendChannel.h" #include "JSGlobalObject.h" +#include "JSLock.h" #include "RemoteInspector.h" using namespace Inspector; @@ -48,18 +49,25 @@ String JSGlobalObjectDebuggable::name() const return name.isEmpty() ? ASCIILiteral("JSContext") : name; } -void JSGlobalObjectDebuggable::connect(InspectorFrontendChannel* frontendChannel) +void JSGlobalObjectDebuggable::connect(FrontendChannel* frontendChannel, bool automaticInspection) { JSLockHolder locker(&m_globalObject.vm()); - m_globalObject.inspectorController().connectFrontend(frontendChannel); + m_globalObject.inspectorController().connectFrontend(frontendChannel, automaticInspection); } void JSGlobalObjectDebuggable::disconnect() { JSLockHolder locker(&m_globalObject.vm()); - m_globalObject.inspectorController().disconnectFrontend(InspectorDisconnectReason::InspectorDestroyed); + m_globalObject.inspectorController().disconnectFrontend(DisconnectReason::InspectorDestroyed); +} + +void JSGlobalObjectDebuggable::pause() +{ + JSLockHolder locker(&m_globalObject.vm()); + + m_globalObject.inspectorController().pause(); } void JSGlobalObjectDebuggable::dispatchMessageFromRemoteFrontend(const String& message) @@ -69,6 +77,12 @@ void JSGlobalObjectDebuggable::dispatchMessageFromRemoteFrontend(const String& m m_globalObject.inspectorController().dispatchMessageFromFrontend(message); } +void JSGlobalObjectDebuggable::pauseWaitingForAutomaticInspection() +{ + JSC::JSLock::DropAllLocks dropAllLocks(&m_globalObject.vm()); + RemoteInspectorDebuggable::pauseWaitingForAutomaticInspection(); +} + } // namespace JSC #endif // ENABLE(REMOTE_INSPECTOR)