Changeset 161691 in webkit


Ignore:
Timestamp:
Jan 10, 2014 3:55:09 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Remove unimplemented or static ScriptDebugServer features
https://bugs.webkit.org/show_bug.cgi?id=126784

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

Source/JavaScriptCore:

  • inspector/protocol/Debugger.json:

Source/WebCore:

These features are unimplemented in the backend, and unused by the
current frontend. Most deal with features that were supported by v8
and are as yet unimplemented by JSC. If we decide to add such features
we can reimplement without conforming to an old implementation.

  • bindings/js/ScriptDebugServer.cpp:
  • bindings/js/ScriptDebugServer.h:
  • bindings/js/ScriptProfiler.h:
  • inspector/InspectorDebuggerAgent.cpp:

(WebCore::InspectorDebuggerAgent::disable):

  • inspector/InspectorDebuggerAgent.h:
  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::reload):
(WebCore::InspectorPageAgent::frameNavigated):

  • inspector/InspectorPageAgent.h:
  • inspector/InspectorProfilerAgent.cpp:
  • inspector/InspectorProfilerAgent.h:
  • inspector/PageDebuggerAgent.cpp:

(WebCore::PageDebuggerAgent::didClearMainFrameWindowObject):

  • inspector/protocol/Page.json:
  • inspector/protocol/Profiler.json:

Source/WebInspectorUI:

  • UserInterface/InspectorJSBackendCommands.js:
  • UserInterface/InspectorWebBackendCommands.js:
  • UserInterface/Legacy/6.0/InspectorWebBackendCommands.js:
  • UserInterface/Legacy/7.0/InspectorWebBackendCommands.js:
  • Versions/Inspector-iOS-6.0.json:
  • Versions/Inspector-iOS-7.0.json:
Location:
trunk/Source
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r161686 r161691  
     12014-01-10  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Remove unimplemented or static ScriptDebugServer features
     4        https://bugs.webkit.org/show_bug.cgi?id=126784
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * inspector/protocol/Debugger.json:
     9
    1102014-01-10  Michael Saboff  <msaboff@apple.com>
    211
  • trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json

    r160683 r161691  
    8383    "commands": [
    8484        {
    85             "name": "causesRecompilation",
    86             "returns": [
    87                 { "name": "result", "type": "boolean", "description": "True if enabling debugger causes scripts recompilation." }
    88             ],
    89             "description": "Tells whether enabling debugger causes scripts recompilation."
    90         },
    91         {
    92             "name": "supportsSeparateScriptCompilationAndExecution",
    93             "returns": [
    94                 { "name": "result", "type": "boolean", "description": "True if debugger supports separate script compilation and execution." }
    95             ],
    96             "description": "Tells whether debugger supports separate script compilation and execution."
    97         },
    98         {
    9985            "name": "enable",
    10086            "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received."
     
    184170            ],
    185171            "description": "Searches for given string in script content."
    186         },
    187         {
    188             "name": "canSetScriptSource",
    189             "returns": [
    190                 { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." }
    191             ],
    192             "description": "Tells whether <code>setScriptSource</code> is supported."
    193         },
    194         {
    195             "name": "setScriptSource",
    196             "parameters": [
    197                 { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to edit." },
    198                 { "name": "scriptSource", "type": "string", "description": "New content of the script." },
    199                 { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code." }
    200             ],
    201             "returns": [
    202                 { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame"}, "description": "New stack trace in case editing has happened while VM was stopped." },
    203                 { "name": "result", "type": "object", "optional": true, "description": "VM-specific description of the changes applied." }
    204             ],
    205             "description": "Edits JavaScript source live."
    206172        },
    207173        {
     
    248214            ],
    249215            "description": "Evaluates expression on a given call frame."
    250         },
    251         {
    252             "name": "compileScript",
    253             "parameters": [
    254                 { "name": "expression", "type": "string", "description": "Expression to compile." },
    255                 { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." }
    256             ],
    257             "returns": [
    258                 { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." },
    259                 { "name": "syntaxErrorMessage", "type": "string", "optional": true, "description": "Syntax error message if compilation failed." }
    260             ],
    261             "description": "Compiles expression."
    262         },
    263         {
    264             "name": "runScript",
    265             "parameters": [
    266                 { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." },
    267                 { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." },
    268                 { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
    269                 { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." }
    270             ],
    271             "returns": [
    272                 { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Run result." },
    273                 { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the script run." }
    274             ],
    275             "description": "Runs script with given id in a given context."
    276216        },
    277217        {
  • trunk/Source/WebCore/ChangeLog

    r161690 r161691  
     12014-01-10  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Remove unimplemented or static ScriptDebugServer features
     4        https://bugs.webkit.org/show_bug.cgi?id=126784
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        These features are unimplemented in the backend, and unused by the
     9        current frontend. Most deal with features that were supported by v8
     10        and are as yet unimplemented by JSC. If we decide to add such features
     11        we can reimplement without conforming to an old implementation.
     12
     13        * bindings/js/ScriptDebugServer.cpp:
     14        * bindings/js/ScriptDebugServer.h:
     15        * bindings/js/ScriptProfiler.h:
     16        * inspector/InspectorDebuggerAgent.cpp:
     17        (WebCore::InspectorDebuggerAgent::disable):
     18        * inspector/InspectorDebuggerAgent.h:
     19        * inspector/InspectorPageAgent.cpp:
     20        (WebCore::InspectorPageAgent::reload):
     21        (WebCore::InspectorPageAgent::frameNavigated):
     22        * inspector/InspectorPageAgent.h:
     23        * inspector/InspectorProfilerAgent.cpp:
     24        * inspector/InspectorProfilerAgent.h:
     25        * inspector/PageDebuggerAgent.cpp:
     26        (WebCore::PageDebuggerAgent::didClearMainFrameWindowObject):
     27        * inspector/protocol/Page.json:
     28        * inspector/protocol/Profiler.json:
     29
    1302014-01-10  David Kilzer  <ddkilzer@apple.com>
    231
  • trunk/Source/WebCore/bindings/js/ScriptDebugServer.cpp

    r161638 r161691  
    132132}
    133133
    134 bool ScriptDebugServer::canSetScriptSource()
    135 {
    136     return false;
    137 }
    138 
    139 bool ScriptDebugServer::setScriptSource(const String&, const String&, bool, String*, Deprecated::ScriptValue*, Deprecated::ScriptObject*)
    140 {
    141     // FIXME(40300): implement this.
    142     return false;
    143 }
    144 
    145 
    146 void ScriptDebugServer::updateCallStack(Deprecated::ScriptValue*)
    147 {
    148     // This method is used for restart frame feature that is not implemented yet.
    149     // FIXME(40300): implement this.
    150 }
    151 
    152134void ScriptDebugServer::dispatchDidPause(ScriptDebugListener* listener)
    153135{
     
    332314}
    333315
    334 void ScriptDebugServer::compileScript(JSC::ExecState*, const String&, const String&, String*, String*)
    335 {
    336     // FIXME(89652): implement this.
    337 }
    338 
    339 void ScriptDebugServer::clearCompiledScripts()
    340 {
    341     // FIXME(89652): implement this.
    342 }
    343 
    344 void ScriptDebugServer::runScript(JSC::ExecState*, const String&, Deprecated::ScriptValue*, bool*, String*)
    345 {
    346     // FIXME(89652): implement this.
    347 }
    348 
    349316} // namespace WebCore
    350317
  • trunk/Source/WebCore/bindings/js/ScriptDebugServer.h

    r160682 r161691  
    6060    void clearBreakpoints();
    6161
    62     bool canSetScriptSource();
    63     bool setScriptSource(const String& sourceID, const String& newContent, bool preview, String* error, Deprecated::ScriptValue* newCallFrames, Deprecated::ScriptObject* result);
    64     void updateCallStack(Deprecated::ScriptValue* callFrame);
    65 
    66     bool causesRecompilation() { return true; }
    67     bool supportsSeparateScriptCompilationAndExecution() { return false; }
    68 
    6962    void recompileAllJSFunctionsSoon();
    7063    virtual void recompileAllJSFunctions(Timer<ScriptDebugServer>* = 0) = 0;
    7164
    72     void setScriptPreprocessor(const String&)
    73     {
    74         // FIXME(webkit.org/b/82203): Implement preprocessor.
    75     }
    76 
    7765    bool runningNestedMessageLoop() { return m_runningNestedMessageLoop; }
    78 
    79     void compileScript(JSC::ExecState*, const String& expression, const String& sourceURL, String* scriptID, String* exceptionMessage);
    80     void clearCompiledScripts();
    81     void runScript(JSC::ExecState*, const String& scriptID, Deprecated::ScriptValue* result, bool* wasThrown, String* exceptionMessage);
    8266
    8367    class Task {
  • trunk/Source/WebCore/bindings/js/ScriptProfiler.h

    r161382 r161691  
    6868    static PassRefPtr<ScriptProfile> stopForWorkerGlobalScope(WorkerGlobalScope*, const String& title);
    6969    static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String&, HeapSnapshotProgress*) { return 0; }
    70     static bool causesRecompilation() { return true; }
    7170    static bool isSampling() { return false; }
    7271    static bool hasHeapProfiler() { return false; }
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r161563 r161691  
    9696    stopListeningScriptDebugServer();
    9797    scriptDebugServer().clearBreakpoints();
    98     scriptDebugServer().clearCompiledScripts();
    9998    scriptDebugServer().continueProgram();
    10099    clear();
     
    104103
    105104    m_enabled = false;
    106 }
    107 
    108 void InspectorDebuggerAgent::causesRecompilation(ErrorString*, bool* result)
    109 {
    110     *result = scriptDebugServer().causesRecompilation();
    111 }
    112 
    113 void InspectorDebuggerAgent::canSetScriptSource(ErrorString*, bool* result)
    114 {
    115     *result = scriptDebugServer().canSetScriptSource();
    116 }
    117 
    118 void InspectorDebuggerAgent::supportsSeparateScriptCompilationAndExecution(ErrorString*, bool* result)
    119 {
    120     *result = scriptDebugServer().supportsSeparateScriptCompilationAndExecution();
    121105}
    122106
     
    413397}
    414398
    415 static PassRefPtr<InspectorObject> scriptToInspectorObject(Deprecated::ScriptObject scriptObject)
    416 {
    417     if (scriptObject.hasNoValue())
    418         return 0;
    419     RefPtr<InspectorValue> value = scriptObject.toInspectorValue(scriptObject.scriptState());
    420     if (!value)
    421         return 0;
    422     return value->asObject();
    423 }
    424 
    425399void InspectorDebuggerAgent::searchInContent(ErrorString* error, const String& scriptIDStr, const String& query, const bool* const optionalCaseSensitive, const bool* const optionalIsRegex, RefPtr<Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>>& results)
    426400{
     
    434408    else
    435409        *error = "No script for id: " + scriptIDStr;
    436 }
    437 
    438 void InspectorDebuggerAgent::setScriptSource(ErrorString* error, const String& scriptID, const String& newContent, const bool* const preview, RefPtr<Array<Inspector::TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<InspectorObject>& result)
    439 {
    440     bool previewOnly = preview && *preview;
    441     Deprecated::ScriptObject resultObject;
    442     if (!scriptDebugServer().setScriptSource(scriptID, newContent, previewOnly, error, &m_currentCallStack, &resultObject))
    443         return;
    444     newCallFrames = currentCallFrames();
    445     RefPtr<InspectorObject> object = scriptToInspectorObject(resultObject);
    446     if (object)
    447         result = object;
    448410}
    449411
     
    564526
    565527    if (doNotPauseOnExceptionsAndMuteConsole ? *doNotPauseOnExceptionsAndMuteConsole : false) {
    566         unmuteConsole();
    567         if (scriptDebugServer().pauseOnExceptionsState() != previousPauseOnExceptionsState)
    568             scriptDebugServer().setPauseOnExceptionsState(previousPauseOnExceptionsState);
    569     }
    570 }
    571 
    572 void InspectorDebuggerAgent::compileScript(ErrorString* errorString, const String& expression, const String& sourceURL, Inspector::TypeBuilder::OptOutput<ScriptId>* scriptID, Inspector::TypeBuilder::OptOutput<String>* syntaxErrorMessage)
    573 {
    574     InjectedScript injectedScript = injectedScriptForEval(errorString, 0);
    575     if (injectedScript.hasNoValue()) {
    576         *errorString = "Inspected frame has gone";
    577         return;
    578     }
    579 
    580     String scriptIDValue;
    581     String exceptionMessage;
    582     scriptDebugServer().compileScript(injectedScript.scriptState(), expression, sourceURL, &scriptIDValue, &exceptionMessage);
    583     if (!scriptIDValue && !exceptionMessage) {
    584         *errorString = "Script compilation failed";
    585         return;
    586     }
    587     *syntaxErrorMessage = exceptionMessage;
    588     *scriptID = scriptIDValue;
    589 }
    590 
    591 void InspectorDebuggerAgent::runScript(ErrorString* errorString, const ScriptId& scriptID, const int* executionContextId, const String* const objectGroup, const bool* const doNotPauseOnExceptionsAndMuteConsole, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown)
    592 {
    593     InjectedScript injectedScript = injectedScriptForEval(errorString, executionContextId);
    594     if (injectedScript.hasNoValue()) {
    595         *errorString = "Inspected frame has gone";
    596         return;
    597     }
    598 
    599     ScriptDebugServer::PauseOnExceptionsState previousPauseOnExceptionsState = scriptDebugServer().pauseOnExceptionsState();
    600     if (doNotPauseOnExceptionsAndMuteConsole && *doNotPauseOnExceptionsAndMuteConsole) {
    601         if (previousPauseOnExceptionsState != ScriptDebugServer::DontPauseOnExceptions)
    602             scriptDebugServer().setPauseOnExceptionsState(ScriptDebugServer::DontPauseOnExceptions);
    603         muteConsole();
    604     }
    605 
    606     Deprecated::ScriptValue value;
    607     bool wasThrownValue;
    608     String exceptionMessage;
    609     scriptDebugServer().runScript(injectedScript.scriptState(), scriptID, &value, &wasThrownValue, &exceptionMessage);
    610     *wasThrown = wasThrownValue;
    611     if (value.hasNoValue()) {
    612         *errorString = "Script execution failed";
    613         return;
    614     }
    615     result = injectedScript.wrapObject(value, objectGroup ? *objectGroup : "");
    616     if (wasThrownValue)
    617         result->setDescription(exceptionMessage);
    618 
    619     if (doNotPauseOnExceptionsAndMuteConsole && *doNotPauseOnExceptionsAndMuteConsole) {
    620528        unmuteConsole();
    621529        if (scriptDebugServer().pauseOnExceptionsState() != previousPauseOnExceptionsState)
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r161563 r161691  
    7171    virtual ~InspectorDebuggerAgent();
    7272
    73     virtual void causesRecompilation(ErrorString*, bool*);
    74     virtual void canSetScriptSource(ErrorString*, bool*);
    75     virtual void supportsSeparateScriptCompilationAndExecution(ErrorString*, bool*);
    76 
    7773    virtual void didCreateFrontendAndBackend(Inspector::InspectorFrontendChannel*, Inspector::InspectorBackendDispatcher*) OVERRIDE;
    7874    virtual void willDestroyFrontendAndBackend() OVERRIDE;
     
    9389
    9490    virtual void searchInContent(ErrorString*, const String& scriptID, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::GenericTypes::SearchMatch>>&);
    95     virtual void setScriptSource(ErrorString*, const String& scriptID, const String& newContent, const bool* preview, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Debugger::CallFrame>>& newCallFrames, RefPtr<Inspector::InspectorObject>& result);
    9691    virtual void getScriptSource(ErrorString*, const String& scriptID, String* scriptSource);
    9792    virtual void getFunctionDetails(ErrorString*, const String& functionId, RefPtr<Inspector::TypeBuilder::Debugger::FunctionDetails>&);
     
    112107                             RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result,
    113108                             Inspector::TypeBuilder::OptOutput<bool>* wasThrown);
    114     void compileScript(ErrorString*, const String& expression, const String& sourceURL, Inspector::TypeBuilder::OptOutput<Inspector::TypeBuilder::Debugger::ScriptId>*, Inspector::TypeBuilder::OptOutput<String>* syntaxErrorMessage);
    115     void runScript(ErrorString*, const Inspector::TypeBuilder::Debugger::ScriptId&, const int* executionContextId, const String* objectGroup, const bool* doNotPauseOnExceptionsAndMuteConsole, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result, Inspector::TypeBuilder::OptOutput<bool>* wasThrown);
    116109    virtual void setOverlayMessage(ErrorString*, const String*);
    117110
  • trunk/Source/WebCore/inspector/InspectorPageAgent.cpp

    r161633 r161691  
    427427}
    428428
    429 void InspectorPageAgent::reload(ErrorString*, const bool* const optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad, const String* optionalScriptPreprocessor)
     429void InspectorPageAgent::reload(ErrorString*, const bool* const optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad)
    430430{
    431431    m_pendingScriptToEvaluateOnLoadOnce = optionalScriptToEvaluateOnLoad ? *optionalScriptToEvaluateOnLoad : "";
    432     m_pendingScriptPreprocessor = optionalScriptPreprocessor ? *optionalScriptPreprocessor : "";
    433432    m_page->mainFrame().loader().reload(optionalIgnoreCache ? *optionalIgnoreCache : false);
    434433}
     
    785784    if (loader->frame()->isMainFrame()) {
    786785        m_scriptToEvaluateOnLoadOnce = m_pendingScriptToEvaluateOnLoadOnce;
    787         m_scriptPreprocessor = m_pendingScriptPreprocessor;
    788786        m_pendingScriptToEvaluateOnLoadOnce = String();
    789         m_pendingScriptPreprocessor = String();
    790787    }
    791788    m_frontendDispatcher->frameNavigated(buildObjectForFrame(loader->frame()));
  • trunk/Source/WebCore/inspector/InspectorPageAgent.h

    r161633 r161691  
    100100    virtual void addScriptToEvaluateOnLoad(ErrorString*, const String& source, String* result);
    101101    virtual void removeScriptToEvaluateOnLoad(ErrorString*, const String& identifier);
    102     virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad, const String* optionalScriptPreprocessor);
     102    virtual void reload(ErrorString*, const bool* optionalIgnoreCache, const String* optionalScriptToEvaluateOnLoad);
    103103    virtual void navigate(ErrorString*, const String& url);
    104104    virtual void getCookies(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Page::Cookie>>& cookies);
     
    161161    Frame* findFrameWithSecurityOrigin(const String& originRawString);
    162162    Frame* assertFrame(ErrorString*, const String& frameId);
    163     String scriptPreprocessor() { return m_scriptPreprocessor; }
    164163    static DocumentLoader* assertDocumentLoader(ErrorString*, Frame*);
    165164
     
    183182    String m_pendingScriptToEvaluateOnLoadOnce;
    184183    String m_scriptToEvaluateOnLoadOnce;
    185     String m_pendingScriptPreprocessor;
    186     String m_scriptPreprocessor;
    187184    HashMap<Frame*, String> m_frameToIdentifier;
    188185    HashMap<String, Frame*> m_identifierToFrame;
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp

    r161563 r161691  
    191191}
    192192
    193 void InspectorProfilerAgent::causesRecompilation(ErrorString*, bool* result)
    194 {
    195     *result = ScriptProfiler::causesRecompilation();
    196 }
    197 
    198193void InspectorProfilerAgent::isSampling(ErrorString*, bool* result)
    199194{
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.h

    r161563 r161691  
    7474    void resetState();
    7575
    76     virtual void causesRecompilation(ErrorString*, bool*);
    7776    virtual void recompileScript() = 0;
    7877    virtual void isSampling(ErrorString*, bool*);
  • trunk/Source/WebCore/inspector/PageDebuggerAgent.cpp

    r161563 r161691  
    122122{
    123123    reset();
    124     scriptDebugServer().setScriptPreprocessor(m_pageAgent->scriptPreprocessor());
    125124}
    126125
  • trunk/Source/WebCore/inspector/protocol/Page.json

    r161556 r161691  
    112112            "parameters": [
    113113                { "name": "ignoreCache", "type": "boolean", "optional": true, "description": "If true, browser cache is ignored (as if the user pressed Shift+refresh)." },
    114                 { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." },
    115                 { "name": "scriptPreprocessor", "type": "string", "optional": true, "description": "Script body that should evaluate to function that will preprocess all the scripts before their compilation." }
     114                { "name": "scriptToEvaluateOnLoad", "type": "string", "optional": true, "description": "If set, the script will be injected into all frames of the inspected page after reload." }
    116115            ],
    117116            "description": "Reloads given page optionally ignoring the cache."
  • trunk/Source/WebCore/inspector/protocol/Profiler.json

    r159233 r161691  
    4747    ],
    4848    "commands": [
    49         {
    50             "name": "causesRecompilation",
    51             "returns": [
    52                 { "name": "result", "type": "boolean" }
    53             ]
    54         },
    5549        {
    5650            "name": "isSampling",
  • trunk/Source/WebInspectorUI/ChangeLog

    r161689 r161691  
     12014-01-10  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Remove unimplemented or static ScriptDebugServer features
     4        https://bugs.webkit.org/show_bug.cgi?id=126784
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * UserInterface/InspectorJSBackendCommands.js:
     9        * UserInterface/InspectorWebBackendCommands.js:
     10        * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js:
     11        * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js:
     12        * Versions/Inspector-iOS-6.0.json:
     13        * Versions/Inspector-iOS-7.0.json:
     14
    1152014-01-10  Timothy Hatcher  <timothy@apple.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/InspectorJSBackendCommands.js

    r160588 r161691  
    1717InspectorBackend.registerEvent("Debugger.paused", ["callFrames", "reason", "data"]);
    1818InspectorBackend.registerEvent("Debugger.resumed", []);
    19 InspectorBackend.registerCommand("Debugger.causesRecompilation", [], ["result"]);
    20 InspectorBackend.registerCommand("Debugger.supportsSeparateScriptCompilationAndExecution", [], ["result"]);
    2119InspectorBackend.registerCommand("Debugger.enable", [], []);
    2220InspectorBackend.registerCommand("Debugger.disable", [], []);
     
    3230InspectorBackend.registerCommand("Debugger.resume", [], []);
    3331InspectorBackend.registerCommand("Debugger.searchInContent", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "query", "type": "string", "optional": false}, {"name": "caseSensitive", "type": "boolean", "optional": true}, {"name": "isRegex", "type": "boolean", "optional": true}], ["result"]);
    34 InspectorBackend.registerCommand("Debugger.canSetScriptSource", [], ["result"]);
    35 InspectorBackend.registerCommand("Debugger.setScriptSource", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "scriptSource", "type": "string", "optional": false}, {"name": "preview", "type": "boolean", "optional": true}], ["callFrames", "result"]);
    3632InspectorBackend.registerCommand("Debugger.getScriptSource", [{"name": "scriptId", "type": "string", "optional": false}], ["scriptSource"]);
    3733InspectorBackend.registerCommand("Debugger.getFunctionDetails", [{"name": "functionId", "type": "string", "optional": false}], ["details"]);
    3834InspectorBackend.registerCommand("Debugger.setPauseOnExceptions", [{"name": "state", "type": "string", "optional": false}], []);
    3935InspectorBackend.registerCommand("Debugger.evaluateOnCallFrame", [{"name": "callFrameId", "type": "string", "optional": false}, {"name": "expression", "type": "string", "optional": false}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "includeCommandLineAPI", "type": "boolean", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}, {"name": "returnByValue", "type": "boolean", "optional": true}, {"name": "generatePreview", "type": "boolean", "optional": true}], ["result", "wasThrown"]);
    40 InspectorBackend.registerCommand("Debugger.compileScript", [{"name": "expression", "type": "string", "optional": false}, {"name": "sourceURL", "type": "string", "optional": false}], ["scriptId", "syntaxErrorMessage"]);
    41 InspectorBackend.registerCommand("Debugger.runScript", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "contextId", "type": "number", "optional": true}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}], ["result", "wasThrown"]);
    4236InspectorBackend.registerCommand("Debugger.setOverlayMessage", [{"name": "message", "type": "string", "optional": true}], []);
    4337
  • trunk/Source/WebInspectorUI/UserInterface/InspectorWebBackendCommands.js

    r161556 r161691  
    251251InspectorBackend.registerCommand("Page.addScriptToEvaluateOnLoad", [{"name": "scriptSource", "type": "string", "optional": false}], ["identifier"]);
    252252InspectorBackend.registerCommand("Page.removeScriptToEvaluateOnLoad", [{"name": "identifier", "type": "string", "optional": false}], []);
    253 InspectorBackend.registerCommand("Page.reload", [{"name": "ignoreCache", "type": "boolean", "optional": true}, {"name": "scriptToEvaluateOnLoad", "type": "string", "optional": true}, {"name": "scriptPreprocessor", "type": "string", "optional": true}], []);
     253InspectorBackend.registerCommand("Page.reload", [{"name": "ignoreCache", "type": "boolean", "optional": true}, {"name": "scriptToEvaluateOnLoad", "type": "string", "optional": true}], []);
    254254InspectorBackend.registerCommand("Page.navigate", [{"name": "url", "type": "string", "optional": false}], []);
    255255InspectorBackend.registerCommand("Page.getCookies", [], ["cookies"]);
     
    287287InspectorBackend.registerEvent("Profiler.resetProfiles", []);
    288288InspectorBackend.registerEvent("Profiler.reportHeapSnapshotProgress", ["done", "total"]);
    289 InspectorBackend.registerCommand("Profiler.causesRecompilation", [], ["result"]);
    290289InspectorBackend.registerCommand("Profiler.isSampling", [], ["result"]);
    291290InspectorBackend.registerCommand("Profiler.hasHeapProfiler", [], ["result"]);
  • trunk/Source/WebInspectorUI/UserInterface/Legacy/6.0/InspectorWebBackendCommands.js

    r161556 r161691  
    224224InspectorBackend.registerEvent("Debugger.paused", ["callFrames", "reason", "data"]);
    225225InspectorBackend.registerEvent("Debugger.resumed", []);
    226 InspectorBackend.registerCommand("Debugger.causesRecompilation", [], ["result"]);
    227226InspectorBackend.registerCommand("Debugger.supportsNativeBreakpoints", [], ["result"]);
    228227InspectorBackend.registerCommand("Debugger.enable", [], []);
     
    239238InspectorBackend.registerCommand("Debugger.resume", [], []);
    240239InspectorBackend.registerCommand("Debugger.searchInContent", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "query", "type": "string", "optional": false}, {"name": "caseSensitive", "type": "boolean", "optional": true}, {"name": "isRegex", "type": "boolean", "optional": true}], ["result"]);
    241 InspectorBackend.registerCommand("Debugger.canSetScriptSource", [], ["result"]);
    242 InspectorBackend.registerCommand("Debugger.setScriptSource", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "scriptSource", "type": "string", "optional": false}, {"name": "preview", "type": "boolean", "optional": true}], ["callFrames", "result"]);
    243240InspectorBackend.registerCommand("Debugger.getScriptSource", [{"name": "scriptId", "type": "string", "optional": false}], ["scriptSource"]);
    244241InspectorBackend.registerCommand("Debugger.getFunctionDetails", [{"name": "functionId", "type": "string", "optional": false}], ["details"]);
     
    266263InspectorBackend.registerEvent("Profiler.resetProfiles", []);
    267264InspectorBackend.registerEvent("Profiler.reportHeapSnapshotProgress", ["done", "total"]);
    268 InspectorBackend.registerCommand("Profiler.causesRecompilation", [], ["result"]);
    269265InspectorBackend.registerCommand("Profiler.isSampling", [], ["result"]);
    270266InspectorBackend.registerCommand("Profiler.hasHeapProfiler", [], ["result"]);
  • trunk/Source/WebInspectorUI/UserInterface/Legacy/7.0/InspectorWebBackendCommands.js

    r161556 r161691  
    260260InspectorBackend.registerEvent("Debugger.paused", ["callFrames", "reason", "data"]);
    261261InspectorBackend.registerEvent("Debugger.resumed", []);
    262 InspectorBackend.registerCommand("Debugger.causesRecompilation", [], ["result"]);
    263 InspectorBackend.registerCommand("Debugger.supportsSeparateScriptCompilationAndExecution", [], ["result"]);
    264262InspectorBackend.registerCommand("Debugger.enable", [], []);
    265263InspectorBackend.registerCommand("Debugger.disable", [], []);
     
    275273InspectorBackend.registerCommand("Debugger.resume", [], []);
    276274InspectorBackend.registerCommand("Debugger.searchInContent", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "query", "type": "string", "optional": false}, {"name": "caseSensitive", "type": "boolean", "optional": true}, {"name": "isRegex", "type": "boolean", "optional": true}], ["result"]);
    277 InspectorBackend.registerCommand("Debugger.canSetScriptSource", [], ["result"]);
    278 InspectorBackend.registerCommand("Debugger.setScriptSource", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "scriptSource", "type": "string", "optional": false}, {"name": "preview", "type": "boolean", "optional": true}], ["callFrames", "result"]);
    279275InspectorBackend.registerCommand("Debugger.restartFrame", [{"name": "callFrameId", "type": "string", "optional": false}], ["callFrames", "result"]);
    280276InspectorBackend.registerCommand("Debugger.getScriptSource", [{"name": "scriptId", "type": "string", "optional": false}], ["scriptSource"]);
     
    282278InspectorBackend.registerCommand("Debugger.setPauseOnExceptions", [{"name": "state", "type": "string", "optional": false}], []);
    283279InspectorBackend.registerCommand("Debugger.evaluateOnCallFrame", [{"name": "callFrameId", "type": "string", "optional": false}, {"name": "expression", "type": "string", "optional": false}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "includeCommandLineAPI", "type": "boolean", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}, {"name": "returnByValue", "type": "boolean", "optional": true}, {"name": "generatePreview", "type": "boolean", "optional": true}], ["result", "wasThrown"]);
    284 InspectorBackend.registerCommand("Debugger.compileScript", [{"name": "expression", "type": "string", "optional": false}, {"name": "sourceURL", "type": "string", "optional": false}], ["scriptId", "syntaxErrorMessage"]);
    285 InspectorBackend.registerCommand("Debugger.runScript", [{"name": "scriptId", "type": "string", "optional": false}, {"name": "contextId", "type": "number", "optional": true}, {"name": "objectGroup", "type": "string", "optional": true}, {"name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true}], ["result", "wasThrown"]);
    286280InspectorBackend.registerCommand("Debugger.setOverlayMessage", [{"name": "message", "type": "string", "optional": true}], []);
    287281InspectorBackend.registerCommand("Debugger.setVariableValue", [{"name": "scopeNumber", "type": "number", "optional": false}, {"name": "variableName", "type": "string", "optional": false}, {"name": "newValue", "type": "object", "optional": false}, {"name": "callFrameId", "type": "string", "optional": true}, {"name": "functionObjectId", "type": "string", "optional": true}], []);
     
    307301InspectorBackend.registerEvent("Profiler.resetProfiles", []);
    308302InspectorBackend.registerEvent("Profiler.reportHeapSnapshotProgress", ["done", "total"]);
    309 InspectorBackend.registerCommand("Profiler.causesRecompilation", [], ["result"]);
    310303InspectorBackend.registerCommand("Profiler.isSampling", [], ["result"]);
    311304InspectorBackend.registerCommand("Profiler.hasHeapProfiler", [], ["result"]);
  • trunk/Source/WebInspectorUI/Versions/Inspector-iOS-6.0.json

    r161556 r161691  
    21972197        "commands": [
    21982198            {
    2199                 "name": "causesRecompilation",
    2200                 "returns": [
    2201                     { "name": "result", "type": "boolean", "description": "True if enabling debugger causes scripts recompilation." }
    2202                 ],
    2203                 "hidden": true,
    2204                 "description": "Tells whether enabling debugger causes scripts recompilation."
    2205             },
    2206             {
    22072199                "name": "supportsNativeBreakpoints",
    22082200                "returns": [
     
    23002292                ],
    23012293                "description": "Searches for given string in script content."
    2302             },
    2303             {
    2304                 "name": "canSetScriptSource",
    2305                 "returns": [
    2306                     { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." }
    2307                 ],
    2308                 "description": "Tells whether <code>setScriptSource</code> is supported."
    2309             },
    2310             {
    2311                 "name": "setScriptSource",
    2312                 "parameters": [
    2313                     { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to edit." },
    2314                     { "name": "scriptSource", "type": "string", "description": "New content of the script." },
    2315                     { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code.", "hidden": true }
    2316                 ],
    2317                 "returns": [
    2318                     { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame"}, "description": "New stack trace in case editing has happened while VM was stopped." },
    2319                     { "name": "result", "type": "object", "optional": true, "description": "VM-specific description of the changes applied.", "hidden": true }
    2320                 ],
    2321                 "description": "Edits JavaScript source live."
    23222294            },
    23232295            {
     
    25202492        "commands": [
    25212493            {
    2522                 "name": "causesRecompilation",
    2523                 "returns": [
    2524                     { "name": "result", "type": "boolean" }
    2525                 ]
    2526             },
    2527             {
    25282494                "name": "isSampling",
    25292495                "returns": [
  • trunk/Source/WebInspectorUI/Versions/Inspector-iOS-7.0.json

    r161556 r161691  
    25162516        "commands": [
    25172517            {
    2518                 "name": "causesRecompilation",
    2519                 "returns": [
    2520                     { "name": "result", "type": "boolean", "description": "True if enabling debugger causes scripts recompilation." }
    2521                 ],
    2522                 "description": "Tells whether enabling debugger causes scripts recompilation."
    2523             },
    2524             {
    2525                 "name": "supportsSeparateScriptCompilationAndExecution",
    2526                 "returns": [
    2527                     { "name": "result", "type": "boolean", "description": "True if debugger supports separate script compilation and execution." }
    2528                 ],
    2529                 "description": "Tells whether debugger supports separate script compilation and execution."
    2530             },
    2531             {
    25322518                "name": "enable",
    25332519                "description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received."
     
    26172603                ],
    26182604                "description": "Searches for given string in script content."
    2619             },
    2620             {
    2621                 "name": "canSetScriptSource",
    2622                 "returns": [
    2623                     { "name": "result", "type": "boolean", "description": "True if <code>setScriptSource</code> is supported." }
    2624                 ],
    2625                 "description": "Tells whether <code>setScriptSource</code> is supported."
    2626             },
    2627             {
    2628                 "name": "setScriptSource",
    2629                 "parameters": [
    2630                     { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to edit." },
    2631                     { "name": "scriptSource", "type": "string", "description": "New content of the script." },
    2632                     { "name": "preview", "type": "boolean", "optional": true, "description": " If true the change will not actually be applied. Preview mode may be used to get result description without actually modifying the code." }
    2633                 ],
    2634                 "returns": [
    2635                     { "name": "callFrames", "type": "array", "optional": true, "items": { "$ref": "CallFrame"}, "description": "New stack trace in case editing has happened while VM was stopped." },
    2636                     { "name": "result", "type": "object", "optional": true, "description": "VM-specific description of the changes applied." }
    2637                 ],
    2638                 "description": "Edits JavaScript source live."
    26392605            },
    26402606            {
     
    26922658                ],
    26932659                "description": "Evaluates expression on a given call frame."
    2694             },
    2695             {
    2696                 "name": "compileScript",
    2697                 "parameters": [
    2698                     { "name": "expression", "type": "string", "description": "Expression to compile." },
    2699                     { "name": "sourceURL", "type": "string", "description": "Source url to be set for the script." }
    2700                 ],
    2701                 "returns": [
    2702                     { "name": "scriptId", "$ref": "ScriptId", "optional": true, "description": "Id of the script." },
    2703                     { "name": "syntaxErrorMessage", "type": "string", "optional": true, "description": "Syntax error message if compilation failed." }
    2704                 ],
    2705                 "description": "Compiles expression."
    2706             },
    2707             {
    2708                 "name": "runScript",
    2709                 "parameters": [
    2710                     { "name": "scriptId", "$ref": "ScriptId", "description": "Id of the script to run." },
    2711                     { "name": "contextId", "$ref": "Runtime.ExecutionContextId", "optional": true, "description": "Specifies in which isolated context to perform script run. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 the evaluation will be performed in the context of the inspected page." },
    2712                     { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." },
    2713                     { "name": "doNotPauseOnExceptionsAndMuteConsole", "type": "boolean", "optional": true, "description": "Specifies whether script run should stop on exceptions and mute console. Overrides setPauseOnException state." }
    2714                 ],
    2715                 "returns": [
    2716                     { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Run result." },
    2717                     { "name": "wasThrown", "type": "boolean", "optional": true, "description": "True if the result was thrown during the script run." }
    2718                 ],
    2719                 "description": "Runs script with given id in a given context."
    27202660            },
    27212661            {
     
    29122852        ],
    29132853        "commands": [
    2914             {
    2915                 "name": "causesRecompilation",
    2916                 "returns": [
    2917                     { "name": "result", "type": "boolean" }
    2918                 ]
    2919             },
    29202854            {
    29212855                "name": "isSampling",
Note: See TracChangeset for help on using the changeset viewer.