⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 194259 in webkit


Ignore:
Timestamp:
Dec 17, 2015, 8:18:01 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Remove "local" scope type from the protocol
​https://bugs.webkit.org/show_bug.cgi?id=152409

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2015-12-17
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

After r194251 the backend no longer sends this scope type.
So remove it from the protocol.

The concept of a Local Scope should be calculatable by the
frontend. In fact the way the backend used to do this could
easily be done by the frontend. To be done in a follow-up.

  • inspector/InjectedScriptSource.js:
  • inspector/JSJavaScriptCallFrame.h:
  • inspector/protocol/Debugger.json:

Source/WebInspectorUI:

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r194253 r194259  
     12015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Remove "local" scope type from the protocol
     4        https://bugs.webkit.org/show_bug.cgi?id=152409
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        After r194251 the backend no longer sends this scope type.
     9        So remove it from the protocol.
     10
     11        The concept of a Local Scope should be calculatable by the
     12        frontend. In fact the way the backend used to do this could
     13        easily be done by the frontend. To be done in a follow-up.
     14
     15        * inspector/InjectedScriptSource.js:
     16        * inspector/JSJavaScriptCallFrame.h:
     17        * inspector/protocol/Debugger.json:
     18
    1192015-12-17  Sukolsak Sakshuwong  <sukolsak@gmail.com>
    220
  • trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js

    r194251 r194259  
    13641364InjectedScript.CallFrameProxy._scopeTypeNames = {
    13651365    0: "global", // GLOBAL_SCOPE
    1366     1: "local", // LOCAL_SCOPE
    1367     2: "with", // WITH_SCOPE
    1368     3: "closure", // CLOSURE_SCOPE
    1369     4: "catch", // CATCH_SCOPE
    1370     5: "functionName", // FUNCTION_NAME_SCOPE
    1371     6: "globalLexicalEnvironment", // GLOBAL_LEXICAL_ENVIRONMENT_SCOPE
    1372     7: "nestedLexical", // NESTED_LEXICAL_SCOPE
     1366    1: "with", // WITH_SCOPE
     1367    2: "closure", // CLOSURE_SCOPE
     1368    3: "catch", // CATCH_SCOPE
     1369    4: "functionName", // FUNCTION_NAME_SCOPE
     1370    5: "globalLexicalEnvironment", // GLOBAL_LEXICAL_ENVIRONMENT_SCOPE
     1371    6: "nestedLexical", // NESTED_LEXICAL_SCOPE
    13731372}
    13741373
  • trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.h

    r194251 r194259  
    7373    // Constants.
    7474    static const unsigned short GLOBAL_SCOPE = 0;
    75     static const unsigned short LOCAL_SCOPE = 1;
    76     static const unsigned short WITH_SCOPE = 2;
    77     static const unsigned short CLOSURE_SCOPE = 3;
    78     static const unsigned short CATCH_SCOPE = 4;
    79     static const unsigned short FUNCTION_NAME_SCOPE = 5;
    80     static const unsigned short GLOBAL_LEXICAL_ENVIRONMENT_SCOPE = 6;
    81     static const unsigned short NESTED_LEXICAL_SCOPE = 7;
     75    static const unsigned short WITH_SCOPE = 1;
     76    static const unsigned short CLOSURE_SCOPE = 2;
     77    static const unsigned short CATCH_SCOPE = 3;
     78    static const unsigned short FUNCTION_NAME_SCOPE = 4;
     79    static const unsigned short GLOBAL_LEXICAL_ENVIRONMENT_SCOPE = 5;
     80    static const unsigned short NESTED_LEXICAL_SCOPE = 6;
    8281
    8382protected:
  • trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json

    r194251 r194259  
    8282            "type": "object",
    8383            "properties": [
    84                 { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "functionName", "globalLexicalEnvironment", "nestedLexical"], "description": "Scope type." },
     84                { "name": "type", "type": "string", "enum": ["global", "with", "closure", "catch", "functionName", "globalLexicalEnvironment", "nestedLexical"], "description": "Scope type." },
    8585                { "name": "object", "$ref": "Runtime.RemoteObject", "description": "Object representing the scope. For <code>global</code> and <code>with</code> scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties." }
    8686            ],
  • trunk/Source/WebInspectorUI/ChangeLog

    r194258 r194259  
     12015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Remove "local" scope type from the protocol
     4        https://bugs.webkit.org/show_bug.cgi?id=152409
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * UserInterface/Controllers/DebuggerManager.js:
     9        (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
     10
    1112015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
    212
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js

    r194251 r194259  
    586586        var type = null;
    587587        switch (payload.type) {
    588         case DebuggerAgent.ScopeType.Local:
    589             type = WebInspector.ScopeChainNode.Type.Local;
    590             break;
    591588        case DebuggerAgent.ScopeType.Global:
    592589            type = WebInspector.ScopeChainNode.Type.Global;
    … …  
    610607            type = WebInspector.ScopeChainNode.Type.GlobalLexicalEnvironment;
    611608            break;
     609
     610        // COMPATIBILITY (iOS 9): Debugger.ScopeType.Local used to be provided by the backend.
     611        // Newer backends no longer send this enum value, it should be computed by the frontend.
     612        case DebuggerAgent.ScopeType.Local:
     613            type = WebInspector.ScopeChainNode.Type.Local;
     614            break;
     615
    612616        default:
    613617            console.error("Unknown type: " + payload.type);
Note: See TracChangeset for help on using the changeset viewer.