Changeset 162970 in webkit


Ignore:
Timestamp:
Jan 28, 2014 3:29:30 PM (10 years ago)
Author:
mark.lam@apple.com
Message:

Remove some unneeded debugger code.
https://bugs.webkit.org/show_bug.cgi?id=127805.

Reviewed by Oliver Hunt.

JSC will now always support the debugger. Hence, the #if ENABLE(JAVASCRIPT_DEBUGGER)
checks can be removed.

DebuggerCallFrame::callFrame() is also unused and will be removed.

  • debugger/Breakpoint.h:
  • debugger/Debugger.cpp:
  • debugger/DebuggerCallFrame.h:
  • inspector/InjectedScript.cpp:

(Inspector::InjectedScript::wrapCallFrames):

  • inspector/InjectedScript.h:
  • inspector/JSGlobalObjectScriptDebugServer.cpp:
  • inspector/JSGlobalObjectScriptDebugServer.h:
  • inspector/JSJavaScriptCallFrame.cpp:
  • inspector/JSJavaScriptCallFrame.h:
  • inspector/JSJavaScriptCallFramePrototype.cpp:
  • inspector/JSJavaScriptCallFramePrototype.h:
  • inspector/JavaScriptCallFrame.cpp:
  • inspector/JavaScriptCallFrame.h:
  • inspector/ScriptDebugListener.h:
  • inspector/ScriptDebugServer.cpp:
  • inspector/ScriptDebugServer.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:
  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorRuntimeAgent.cpp:

(Inspector::InspectorRuntimeAgent::InspectorRuntimeAgent):
(Inspector::setPauseOnExceptionsState):
(Inspector::InspectorRuntimeAgent::evaluate):
(Inspector::InspectorRuntimeAgent::callFunctionOn):
(Inspector::InspectorRuntimeAgent::getProperties):

  • inspector/agents/InspectorRuntimeAgent.h:
Location:
trunk/Source/JavaScriptCore
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r162968 r162970  
     12014-01-28  Mark Lam  <mark.lam@apple.com>
     2
     3        Remove some unneeded debugger code.
     4        https://bugs.webkit.org/show_bug.cgi?id=127805.
     5
     6        Reviewed by Oliver Hunt.
     7
     8        JSC will now always support the debugger. Hence, the #if ENABLE(JAVASCRIPT_DEBUGGER)
     9        checks can be removed.
     10
     11        DebuggerCallFrame::callFrame() is also unused and will be removed.
     12
     13        * debugger/Breakpoint.h:
     14        * debugger/Debugger.cpp:
     15        * debugger/DebuggerCallFrame.h:
     16        * inspector/InjectedScript.cpp:
     17        (Inspector::InjectedScript::wrapCallFrames):
     18        * inspector/InjectedScript.h:
     19        * inspector/JSGlobalObjectScriptDebugServer.cpp:
     20        * inspector/JSGlobalObjectScriptDebugServer.h:
     21        * inspector/JSJavaScriptCallFrame.cpp:
     22        * inspector/JSJavaScriptCallFrame.h:
     23        * inspector/JSJavaScriptCallFramePrototype.cpp:
     24        * inspector/JSJavaScriptCallFramePrototype.h:
     25        * inspector/JavaScriptCallFrame.cpp:
     26        * inspector/JavaScriptCallFrame.h:
     27        * inspector/ScriptDebugListener.h:
     28        * inspector/ScriptDebugServer.cpp:
     29        * inspector/ScriptDebugServer.h:
     30        * inspector/agents/InspectorDebuggerAgent.cpp:
     31        * inspector/agents/InspectorDebuggerAgent.h:
     32        * inspector/agents/InspectorRuntimeAgent.cpp:
     33        (Inspector::InspectorRuntimeAgent::InspectorRuntimeAgent):
     34        (Inspector::setPauseOnExceptionsState):
     35        (Inspector::InspectorRuntimeAgent::evaluate):
     36        (Inspector::InspectorRuntimeAgent::callFunctionOn):
     37        (Inspector::InspectorRuntimeAgent::getProperties):
     38        * inspector/agents/InspectorRuntimeAgent.h:
     39
    1402014-01-28  Geoffrey Garen  <ggaren@apple.com>
    241
  • trunk/Source/JavaScriptCore/debugger/Breakpoint.h

    r162598 r162970  
    2626#ifndef Breakpoint_h
    2727#define Breakpoint_h
    28 
    29 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3028
    3129#include "DebuggerPrimitives.h"
     
    6664} // namespace JSC
    6765
    68 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    69 
    7066#endif // Breakpoint_h
  • trunk/Source/JavaScriptCore/debugger/Debugger.cpp

    r162735 r162970  
    2121
    2222#include "config.h"
    23 #if ENABLE(JAVASCRIPT_DEBUGGER)
    24 
    2523#include "Debugger.h"
    2624
     
    762760
    763761} // namespace JSC
    764 
    765 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
  • trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.h

    r159605 r162970  
    4949    JS_EXPORT_PRIVATE explicit DebuggerCallFrame(CallFrame*);
    5050
    51     CallFrame* callFrame() const { return m_callFrame; }
    5251    JS_EXPORT_PRIVATE PassRefPtr<DebuggerCallFrame> callerFrame();
    5352    ExecState* exec() const { return m_callFrame; }
  • trunk/Source/JavaScriptCore/inspector/InjectedScript.cpp

    r161563 r162970  
    142142}
    143143
    144 #if ENABLE(JAVASCRIPT_DEBUGGER)
    145144PassRefPtr<Array<Inspector::TypeBuilder::Debugger::CallFrame>> InjectedScript::wrapCallFrames(const Deprecated::ScriptValue& callFrames)
    146145{
     
    158157    return Array<Inspector::TypeBuilder::Debugger::CallFrame>::create();
    159158}
    160 #endif
    161159
    162160PassRefPtr<Inspector::TypeBuilder::Runtime::RemoteObject> InjectedScript::wrapObject(const Deprecated::ScriptValue& value, const String& groupName, bool generatePreview) const
  • trunk/Source/JavaScriptCore/inspector/InjectedScript.h

    r161563 r162970  
    6464    void getInternalProperties(ErrorString*, const String& objectId, RefPtr<TypeBuilder::Array<TypeBuilder::Runtime::InternalPropertyDescriptor>>* result);
    6565
    66 #if ENABLE(JAVASCRIPT_DEBUGGER)
    6766    PassRefPtr<TypeBuilder::Array<TypeBuilder::Debugger::CallFrame>> wrapCallFrames(const Deprecated::ScriptValue&);
    68 #endif
    6967    PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapObject(const Deprecated::ScriptValue&, const String& groupName, bool generatePreview = false) const;
    7068    PassRefPtr<TypeBuilder::Runtime::RemoteObject> wrapTable(const Deprecated::ScriptValue& table, const Deprecated::ScriptValue& columns) const;
  • trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.cpp

    r162799 r162970  
    2828
    2929#if ENABLE(INSPECTOR)
    30 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3130
    3231#include "EventLoop.h"
     
    8685} // namespace Inspector
    8786
    88 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    8987#endif // ENABLE(INSPECTOR)
  • trunk/Source/JavaScriptCore/inspector/JSGlobalObjectScriptDebugServer.h

    r162799 r162970  
    2828
    2929#if ENABLE(INSPECTOR)
    30 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3130
    3231#include "ScriptDebugServer.h"
     
    6463} // namespace Inspector
    6564
    66 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    6765#endif // ENABLE(INSPECTOR)
    6866
  • trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.cpp

    r162757 r162970  
    2828
    2929#if ENABLE(INSPECTOR)
    30 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3130
    3231#include "Error.h"
     
    212211} // namespace Inspector
    213212
    214 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    215213#endif // ENABLE(INSPECTOR)
  • trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.h

    r162757 r162970  
    2828
    2929#if ENABLE(INSPECTOR)
    30 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3130
    3231#include "JSDestructibleObject.h"
     
    9796} // namespace Inspector
    9897
    99 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    10098#endif // ENABLE(INSPECTOR)
    10199
  • trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFramePrototype.cpp

    r162757 r162970  
    2828
    2929#if ENABLE(INSPECTOR)
    30 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3130
    3231#include "Error.h"
     
    235234} // namespace Inspector
    236235
    237 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    238236#endif // ENABLE(INSPECTOR)
  • trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFramePrototype.h

    r162757 r162970  
    2828
    2929#if ENABLE(INSPECTOR)
    30 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3130
    3231#include "JSObject.h"
     
    6564} // namespace Inspector
    6665
    67 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    6866#endif // ENABLE(INSPECTOR)
    6967
  • trunk/Source/JavaScriptCore/inspector/JavaScriptCallFrame.cpp

    r162757 r162970  
    2828
    2929#if ENABLE(INSPECTOR)
    30 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3130
    3231using namespace JSC;
     
    5453} // namespace Inspector
    5554
    56 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    5755#endif // ENABLE(INSPECTOR)
  • trunk/Source/JavaScriptCore/inspector/JavaScriptCallFrame.h

    r162757 r162970  
    2828
    2929#if ENABLE(INSPECTOR)
    30 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3130
    3231#include "JSCJSValueInlines.h"
     
    7069} // namespace Inspector
    7170
    72 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    7371#endif // ENABLE(INSPECTOR)
    7472
  • trunk/Source/JavaScriptCore/inspector/ScriptDebugListener.h

    r162757 r162970  
    3030#ifndef ScriptDebugListener_h
    3131#define ScriptDebugListener_h
    32 
    33 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3432
    3533#include "debugger/Debugger.h"
     
    8179} // namespace Inspector
    8280
    83 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    84 
    8581#endif // ScriptDebugListener_h
  • trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.cpp

    r162757 r162970  
    3232#include "ScriptDebugServer.h"
    3333
    34 #if ENABLE(JAVASCRIPT_DEBUGGER)
    35 
    3634#include "DebuggerCallFrame.h"
    3735#include "JSJavaScriptCallFrame.h"
     
    339337
    340338} // namespace Inspector
    341 
    342 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
  • trunk/Source/JavaScriptCore/inspector/ScriptDebugServer.h

    r162757 r162970  
    3030#ifndef ScriptDebugServer_h
    3131#define ScriptDebugServer_h
    32 
    33 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3432
    3533#include "ScriptBreakpoint.h"
     
    116114} // namespace Inspector
    117115
    118 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    119 
    120116#endif // ScriptDebugServer_h
  • trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp

    r162918 r162970  
    3232
    3333#if ENABLE(INSPECTOR)
    34 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3534
    3635#include "ContentSearchUtilities.h"
     
    734733} // namespace Inspector
    735734
    736 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    737735#endif // ENABLE(INSPECTOR)
  • trunk/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h

    r162799 r162970  
    3232
    3333#if ENABLE(INSPECTOR)
    34 #if ENABLE(JAVASCRIPT_DEBUGGER)
    3534
    3635#include "InspectorJSBackendDispatchers.h"
     
    170169} // namespace Inspector
    171170
    172 #endif // ENABLE(JAVASCRIPT_DEBUGGER)
    173171#endif // ENABLE(INSPECTOR)
    174172
  • trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.cpp

    r162767 r162970  
    4141#include "JSLock.h"
    4242#include "ParserError.h"
     43#include "ScriptDebugServer.h"
    4344#include "SourceCode.h"
    4445#include <wtf/PassRefPtr.h>
    45 
    46 #if ENABLE(JAVASCRIPT_DEBUGGER)
    47 #include "ScriptDebugServer.h"
    48 #endif
    4946
    5047using namespace JSC;
     
    6057    : InspectorAgentBase(ASCIILiteral("Runtime"))
    6158    , m_injectedScriptManager(injectedScriptManager)
    62 #if ENABLE(JAVASCRIPT_DEBUGGER)
    6359    , m_scriptDebugServer(nullptr)
    64 #endif
    6560    , m_enabled(false)
    6661{
     
    7166}
    7267
    73 #if ENABLE(JAVASCRIPT_DEBUGGER)
    7468static ScriptDebugServer::PauseOnExceptionsState setPauseOnExceptionsState(ScriptDebugServer* scriptDebugServer, ScriptDebugServer::PauseOnExceptionsState newState)
    7569{
     
    8074    return presentState;
    8175}
    82 #endif
    8376
    8477static PassRefPtr<Inspector::TypeBuilder::Runtime::ErrorRange> buildErrorRangeObject(const JSTokenLocation& tokenLocation)
     
    125118        return;
    126119
    127 #if ENABLE(JAVASCRIPT_DEBUGGER)
    128120    ScriptDebugServer::PauseOnExceptionsState previousPauseOnExceptionsState = ScriptDebugServer::DontPauseOnExceptions;
    129121    if (asBool(doNotPauseOnExceptionsAndMuteConsole))
    130122        previousPauseOnExceptionsState = setPauseOnExceptionsState(m_scriptDebugServer, ScriptDebugServer::DontPauseOnExceptions);
    131 #endif
    132123    if (asBool(doNotPauseOnExceptionsAndMuteConsole))
    133124        muteConsole();
     
    137128    if (asBool(doNotPauseOnExceptionsAndMuteConsole)) {
    138129        unmuteConsole();
    139 #if ENABLE(JAVASCRIPT_DEBUGGER)
    140130        setPauseOnExceptionsState(m_scriptDebugServer, previousPauseOnExceptionsState);
    141 #endif
    142131    }
    143132}
     
    155144        arguments = (*optionalArguments)->toJSONString();
    156145
    157 #if ENABLE(JAVASCRIPT_DEBUGGER)
    158146    ScriptDebugServer::PauseOnExceptionsState previousPauseOnExceptionsState = ScriptDebugServer::DontPauseOnExceptions;
    159147    if (asBool(doNotPauseOnExceptionsAndMuteConsole))
    160148        previousPauseOnExceptionsState = setPauseOnExceptionsState(m_scriptDebugServer, ScriptDebugServer::DontPauseOnExceptions);
    161 #endif
    162149    if (asBool(doNotPauseOnExceptionsAndMuteConsole))
    163150        muteConsole();
     
    167154    if (asBool(doNotPauseOnExceptionsAndMuteConsole)) {
    168155        unmuteConsole();
    169 #if ENABLE(JAVASCRIPT_DEBUGGER)
    170156        setPauseOnExceptionsState(m_scriptDebugServer, previousPauseOnExceptionsState);
    171 #endif
    172157    }
    173158}
     
    181166    }
    182167
    183 #if ENABLE(JAVASCRIPT_DEBUGGER)
    184168    ScriptDebugServer::PauseOnExceptionsState previousPauseOnExceptionsState = setPauseOnExceptionsState(m_scriptDebugServer, ScriptDebugServer::DontPauseOnExceptions);
    185 #endif
    186169    muteConsole();
    187170
     
    190173
    191174    unmuteConsole();
    192 #if ENABLE(JAVASCRIPT_DEBUGGER)
    193175    setPauseOnExceptionsState(m_scriptDebugServer, previousPauseOnExceptionsState);
    194 #endif
    195176}
    196177
  • trunk/Source/JavaScriptCore/inspector/agents/InspectorRuntimeAgent.h

    r162767 r162970  
    6868    virtual void run(ErrorString*) override;
    6969
    70 #if ENABLE(JAVASCRIPT_DEBUGGER)
    7170    void setScriptDebugServer(ScriptDebugServer* scriptDebugServer) { m_scriptDebugServer = scriptDebugServer; }
    72 #endif
    7371
    7472    bool enabled() const { return m_enabled; }
     
    8785private:
    8886    InjectedScriptManager* m_injectedScriptManager;
    89 #if ENABLE(JAVASCRIPT_DEBUGGER)
    9087    ScriptDebugServer* m_scriptDebugServer;
    91 #endif
    9288    bool m_enabled;
    9389};
Note: See TracChangeset for help on using the changeset viewer.