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

Changeset 194251 in webkit


Ignore:
Timestamp:
Dec 17, 2015, 5:09:13 PM (11 years ago)
Author:
Joseph Pecoraro
Message:

Provide a way to distinguish a nested lexical block from a function's lexical block
​https://bugs.webkit.org/show_bug.cgi?id=152361

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::initializeDefaultParameterValuesAndSetupFunctionScopeStack):
(JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
(JSC::BytecodeGenerator::emitPushFunctionNameScope):
(JSC::BytecodeGenerator::emitPushCatchScope):
Each of these are specialized scopes. They are not nested lexical scopes.

(JSC::BytecodeGenerator::pushLexicalScope):
(JSC::BytecodeGenerator::pushLexicalScopeInternal):
Include an extra parameter to mark the SymbolTable as a nested lexical or not.

  • bytecompiler/NodesCodegen.cpp:

(JSC::BlockNode::emitBytecode):
(JSC::ForNode::emitBytecode):
(JSC::ForInNode::emitMultiLoopBytecode):
(JSC::ForOfNode::emitBytecode):
(JSC::SwitchNode::emitBytecode):
(JSC::ClassExprNode::emitBytecode):
Each of these are cases of non-function nested lexical scopes.
So mark the SymbolTable as nested.

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

Include a new scope type.

  • inspector/JSJavaScriptCallFrame.h:
  • inspector/JSJavaScriptCallFrame.cpp:

(Inspector::JSJavaScriptCallFrame::scopeType):
Use the new "NestedLexical" scope type for nested, non-function,
lexical scopes. The Inspector can use this to better describe
this scope in the frontend.

  • debugger/DebuggerScope.cpp:

(JSC::DebuggerScope::isNestedLexicalScope):

  • debugger/DebuggerScope.h:
  • runtime/JSScope.cpp:

(JSC::JSScope::isNestedLexicalScope):

  • runtime/JSScope.h:
  • runtime/SymbolTable.cpp:

(JSC::SymbolTable::SymbolTable):
(JSC::SymbolTable::cloneScopePart):

  • runtime/SymbolTable.h:

Access the isNestedLexicalScope bit.

Source/WebInspectorUI:

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Views/ScopeChainDetailsSidebarPanel.js:

(WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
New "Block Variables" string.

  • UserInterface/Models/ScopeChainNode.js:

New "Block" scope type, and update existing types.

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
Parse the protocol type to frontend types. Use the protocol generated enum.

LayoutTests:

  • inspector/debugger/breakpoint-scope-expected.txt:

We will soon remove the backend sending a "Local" scope.
The backend was just marking the first closure scope as local.
The frontend can do this itself and do a better job of it.

  • inspector/model/resources/all-scopes.js: Added.

(testAllScopes.innerScope):
(testAllScopes):

  • inspector/model/resources/block-scopes.js: Added.

(testBlockScopes):
(testBlockScopes.method):

  • inspector/model/resources/function-name-scopes.js: Added.

(testFunctionNameScope1):

  • inspector/model/scope-chain-node-expected.txt: Added.
  • inspector/model/scope-chain-node.html: Added.

Tests for ways to get all the different scope types and
specific cases of certain scope types.

Location:
trunk
Files:
6 added
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r194248 r194251  
     12015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Provide a way to distinguish a nested lexical block from a function's lexical block
     4        https://bugs.webkit.org/show_bug.cgi?id=152361
     5
     6        Reviewed by Saam Barati.
     7
     8        * inspector/debugger/breakpoint-scope-expected.txt:
     9        We will soon remove the backend sending a "Local" scope.
     10        The backend was just marking the first closure scope as local.
     11        The frontend can do this itself and do a better job of it.
     12
     13        * inspector/model/resources/all-scopes.js: Added.
     14        (testAllScopes.innerScope):
     15        (testAllScopes):
     16        * inspector/model/resources/block-scopes.js: Added.
     17        (testBlockScopes):
     18        (testBlockScopes.method):
     19        * inspector/model/resources/function-name-scopes.js: Added.
     20        (testFunctionNameScope1):
     21        * inspector/model/scope-chain-node-expected.txt: Added.
     22        * inspector/model/scope-chain-node.html: Added.
     23        Tests for ways to get all the different scope types and
     24        specific cases of certain scope types.
     25
    1262015-12-17  Keith Miller  <keith_miller@apple.com>
    227
  • trunk/LayoutTests/inspector/debugger/breakpoint-scope-expected.txt

    r193425 r194251  
    44Starting Test
    55Hit breakpoint at line: 4, column: 8
    6 scope-chain-type-local properties:
     6scope-chain-type-closure properties:
    77    resolve
    88    reject
    99scope-chain-type-closure properties:
    1010    p
    11 scope-chain-type-globalLexicalEnvironment properties:
     11scope-chain-type-global-lexical-environment properties:
    1212    lexicalVariable
    1313scope-chain-type-global (properties not listed)
  • trunk/Source/JavaScriptCore/ChangeLog

    r194249 r194251  
     12015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Provide a way to distinguish a nested lexical block from a function's lexical block
     4        https://bugs.webkit.org/show_bug.cgi?id=152361
     5
     6        Reviewed by Saam Barati.
     7
     8        * bytecompiler/BytecodeGenerator.h:
     9        * bytecompiler/BytecodeGenerator.cpp:
     10        (JSC::BytecodeGenerator::initializeDefaultParameterValuesAndSetupFunctionScopeStack):
     11        (JSC::BytecodeGenerator::initializeArrowFunctionContextScopeIfNeeded):
     12        (JSC::BytecodeGenerator::emitPushFunctionNameScope):
     13        (JSC::BytecodeGenerator::emitPushCatchScope):
     14        Each of these are specialized scopes. They are not nested lexical scopes.
     15       
     16        (JSC::BytecodeGenerator::pushLexicalScope):
     17        (JSC::BytecodeGenerator::pushLexicalScopeInternal):
     18        Include an extra parameter to mark the SymbolTable as a nested lexical or not.
     19
     20        * bytecompiler/NodesCodegen.cpp:
     21        (JSC::BlockNode::emitBytecode):
     22        (JSC::ForNode::emitBytecode):
     23        (JSC::ForInNode::emitMultiLoopBytecode):
     24        (JSC::ForOfNode::emitBytecode):
     25        (JSC::SwitchNode::emitBytecode):
     26        (JSC::ClassExprNode::emitBytecode):
     27        Each of these are cases of non-function nested lexical scopes.
     28        So mark the SymbolTable as nested.
     29
     30        * inspector/protocol/Debugger.json:
     31        * inspector/InjectedScriptSource.js:
     32        Include a new scope type.
     33
     34        * inspector/JSJavaScriptCallFrame.h:
     35        * inspector/JSJavaScriptCallFrame.cpp:
     36        (Inspector::JSJavaScriptCallFrame::scopeType):
     37        Use the new "NestedLexical" scope type for nested, non-function,
     38        lexical scopes. The Inspector can use this to better describe
     39        this scope in the frontend.
     40
     41        * debugger/DebuggerScope.cpp:
     42        (JSC::DebuggerScope::isNestedLexicalScope):
     43        * debugger/DebuggerScope.h:
     44        * runtime/JSScope.cpp:
     45        (JSC::JSScope::isNestedLexicalScope):
     46        * runtime/JSScope.h:
     47        * runtime/SymbolTable.cpp:
     48        (JSC::SymbolTable::SymbolTable):
     49        (JSC::SymbolTable::cloneScopePart):
     50        * runtime/SymbolTable.h:
     51        Access the isNestedLexicalScope bit.
     52
    1532015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
    254
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r194248 r194251  
    810810       
    811811        // This implements step 25 of section 9.2.12.
    812         pushLexicalScopeInternal(environment, true, nullptr, TDZRequirement::UnderTDZ, ScopeType::LetConstScope, ScopeRegisterType::Block);
     812        pushLexicalScopeInternal(environment, true, false, nullptr, TDZRequirement::UnderTDZ, ScopeType::LetConstScope, ScopeRegisterType::Block);
    813813
    814814        RefPtr<RegisterID> temp = newTemporary();
    … …  
    928928
    929929    size_t size = m_symbolTableStack.size();
    930     pushLexicalScopeInternal(environment, true, nullptr, TDZRequirement::UnderTDZ, ScopeType::LetConstScope, ScopeRegisterType::Block);
     930    pushLexicalScopeInternal(environment, true, false, nullptr, TDZRequirement::UnderTDZ, ScopeType::LetConstScope, ScopeRegisterType::Block);
    931931
    932932    ASSERT_UNUSED(size, m_symbolTableStack.size() == size + 1);
    … …  
    17981798}
    17991799
    1800 void BytecodeGenerator::pushLexicalScope(VariableEnvironmentNode* node, bool canOptimizeTDZChecks, RegisterID** constantSymbolTableResult)
     1800void BytecodeGenerator::pushLexicalScope(VariableEnvironmentNode* node, bool canOptimizeTDZChecks, bool isNestedLexicalScope, RegisterID** constantSymbolTableResult)
    18011801{
    18021802    VariableEnvironment& environment = node->lexicalVariables();
    1803     pushLexicalScopeInternal(environment, canOptimizeTDZChecks, constantSymbolTableResult, TDZRequirement::UnderTDZ, ScopeType::LetConstScope, ScopeRegisterType::Block);
    1804 }
    1805 
    1806 void BytecodeGenerator::pushLexicalScopeInternal(VariableEnvironment& environment, bool canOptimizeTDZChecks,
     1803    pushLexicalScopeInternal(environment, canOptimizeTDZChecks, isNestedLexicalScope, constantSymbolTableResult, TDZRequirement::UnderTDZ, ScopeType::LetConstScope, ScopeRegisterType::Block);
     1804}
     1805
     1806void BytecodeGenerator::pushLexicalScopeInternal(VariableEnvironment& environment, bool canOptimizeTDZChecks, bool isNestedLexicalScope,
    18071807    RegisterID** constantSymbolTableResult, TDZRequirement tdzRequirement, ScopeType scopeType, ScopeRegisterType scopeRegisterType)
    18081808{
    … …  
    18251825        break;
    18261826    }
     1827
     1828    if (isNestedLexicalScope)
     1829        symbolTable->markIsNestedLexicalScope();
    18271830
    18281831    auto lookUpVarKind = [] (UniquedStringImpl*, const VariableEnvironmentEntry& entry) -> VarKind {
    … …  
    35643567    addResult.iterator->value.setIsConst(); // The function name scope name acts like a const variable.
    35653568    unsigned numVars = m_codeBlock->m_numVars;
    3566     pushLexicalScopeInternal(nameScopeEnvironment, true, nullptr, TDZRequirement::NotUnderTDZ, ScopeType::FunctionNameScope, ScopeRegisterType::Var);
     3569    pushLexicalScopeInternal(nameScopeEnvironment, true, false, nullptr, TDZRequirement::NotUnderTDZ, ScopeType::FunctionNameScope, ScopeRegisterType::Var);
    35673570    ASSERT_UNUSED(numVars, m_codeBlock->m_numVars == static_cast<int>(numVars + 1)); // Should have only created one new "var" for the function name scope.
    35683571    bool shouldTreatAsLexicalVariable = isStrictMode();
    … …  
    35903593{
    35913594    RELEASE_ASSERT(environment.contains(property.impl()));
    3592     pushLexicalScopeInternal(environment, true, nullptr, TDZRequirement::NotUnderTDZ, ScopeType::CatchScope, ScopeRegisterType::Block);
     3595    pushLexicalScopeInternal(environment, true, false, nullptr, TDZRequirement::NotUnderTDZ, ScopeType::CatchScope, ScopeRegisterType::Block);
    35933596    Variable exceptionVar = variable(property);
    35943597    RELEASE_ASSERT(exceptionVar.isResolved());
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h

    r194248 r194251  
    705705        enum class ScopeType { CatchScope, LetConstScope, FunctionNameScope };
    706706        enum class ScopeRegisterType { Var, Block };
    707         void pushLexicalScopeInternal(VariableEnvironment&, bool canOptimizeTDZChecks, RegisterID** constantSymbolTableResult, TDZRequirement, ScopeType, ScopeRegisterType);
     707        void pushLexicalScopeInternal(VariableEnvironment&, bool canOptimizeTDZChecks, bool isNestedLexicalScope, RegisterID** constantSymbolTableResult, TDZRequirement, ScopeType, ScopeRegisterType);
    708708        void popLexicalScopeInternal(VariableEnvironment&, TDZRequirement);
    709709        template<typename LookUpVarKindFunctor>
    … …  
    716716
    717717    public:
    718         void pushLexicalScope(VariableEnvironmentNode*, bool canOptimizeTDZChecks, RegisterID** constantSymbolTableResult = nullptr);
     718        void pushLexicalScope(VariableEnvironmentNode*, bool canOptimizeTDZChecks, bool isNestedLexicalScope = false, RegisterID** constantSymbolTableResult = nullptr);
    719719        void popLexicalScope(VariableEnvironmentNode*);
    720720        void prepareLexicalScopeForNextForLoopIteration(VariableEnvironmentNode*, RegisterID* loopSymbolTable);
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r194248 r194251  
    20502050    if (!m_statements)
    20512051        return;
    2052     generator.pushLexicalScope(this, true);
     2052    generator.pushLexicalScope(this, true, true);
    20532053    m_statements->emitBytecode(generator, dst);
    20542054    generator.popLexicalScope(this);
    … …  
    22552255
    22562256    RegisterID* forLoopSymbolTable = nullptr;
    2257     generator.pushLexicalScope(this, true, &forLoopSymbolTable);
     2257    generator.pushLexicalScope(this, true, true, &forLoopSymbolTable);
    22582258
    22592259    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
    … …  
    23832383
    23842384    RegisterID* forLoopSymbolTable = nullptr;
    2385     generator.pushLexicalScope(this, true, &forLoopSymbolTable);
     2385    generator.pushLexicalScope(this, true, true, &forLoopSymbolTable);
    23862386
    23872387    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
    … …  
    25332533
    25342534    RegisterID* forLoopSymbolTable = nullptr;
    2535     generator.pushLexicalScope(this, true, &forLoopSymbolTable);
     2535    generator.pushLexicalScope(this, true, true, &forLoopSymbolTable);
    25362536    generator.emitDebugHook(WillExecuteStatement, firstLine(), startOffset(), lineStartOffset());
    25372537    auto extractor = [this, dst](BytecodeGenerator& generator, RegisterID* value)
    … …  
    28492849    RefPtr<RegisterID> r0 = generator.emitNode(m_expr);
    28502850
    2851     generator.pushLexicalScope(this, false);
     2851    generator.pushLexicalScope(this, false, true);
    28522852    m_block->emitBytecodeForBlock(generator, r0.get(), dst);
    28532853    generator.popLexicalScope(this);
    … …  
    31823182{
    31833183    if (!m_name.isNull())
    3184         generator.pushLexicalScope(this, true);
     3184        generator.pushLexicalScope(this, true, true);
    31853185
    31863186    RefPtr<RegisterID> superclass;
  • trunk/Source/JavaScriptCore/debugger/DebuggerScope.cpp

    r189279 r194251  
    198198}
    199199
     200bool DebuggerScope::isNestedLexicalScope() const
     201{
     202    return m_scope->isNestedLexicalScope();
     203}
     204
    200205JSValue DebuggerScope::caughtValue(ExecState* exec) const
    201206{
  • trunk/Source/JavaScriptCore/debugger/DebuggerScope.h

    r189279 r194251  
    9292    bool isClosureScope() const;
    9393    bool isGlobalLexicalEnvironment() const;
     94    bool isNestedLexicalScope() const;
    9495
    9596    JSValue caughtValue(ExecState*) const;
  • trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js

    r194247 r194251  
    13701370    5: "functionName", // FUNCTION_NAME_SCOPE
    13711371    6: "globalLexicalEnvironment", // GLOBAL_LEXICAL_ENVIRONMENT_SCOPE
     1372    7: "nestedLexical", // NESTED_LEXICAL_SCOPE
    13721373}
    13731374
  • trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.cpp

    r193425 r194251  
    9696    DebuggerScope::iterator end = scopeChain->end();
    9797
    98     bool foundLocalScope = false;
    9998    for (DebuggerScope::iterator iter = scopeChain->begin(); iter != end; ++iter) {
    10099        DebuggerScope* scope = iter.get();
    101 
    102         if (!foundLocalScope && scope->isClosureScope()) {
    103             // First closure scope is the local scope, each successive one is a true closure.
    104             if (!index)
    105                 return jsNumber(JSJavaScriptCallFrame::LOCAL_SCOPE);
    106             foundLocalScope = true;
    107         }
    108100
    109101        if (!index) {
    … …  
    114106            if (scope->isWithScope())
    115107                return jsNumber(JSJavaScriptCallFrame::WITH_SCOPE);
     108            if (scope->isNestedLexicalScope())
     109                return jsNumber(JSJavaScriptCallFrame::NESTED_LEXICAL_SCOPE);
    116110            if (scope->isGlobalLexicalEnvironment())
    117111                return jsNumber(JSJavaScriptCallFrame::GLOBAL_LEXICAL_ENVIRONMENT_SCOPE);
  • trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.h

    r193425 r194251  
    7979    static const unsigned short FUNCTION_NAME_SCOPE = 5;
    8080    static const unsigned short GLOBAL_LEXICAL_ENVIRONMENT_SCOPE = 6;
     81    static const unsigned short NESTED_LEXICAL_SCOPE = 7;
    8182
    8283protected:
  • trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json

    r193425 r194251  
    8282            "type": "object",
    8383            "properties": [
    84                 { "name": "type", "type": "string", "enum": ["global", "local", "with", "closure", "catch", "functionName", "globalLexicalEnvironment"], "description": "Scope type." },
     84                { "name": "type", "type": "string", "enum": ["global", "local", "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/JavaScriptCore/runtime/JSScope.cpp

    r189501 r194251  
    287287}
    288288
     289bool JSScope::isNestedLexicalScope()
     290{
     291    if (JSLexicalEnvironment* environment = jsDynamicCast<JSLexicalEnvironment*>(this))
     292        return environment->symbolTable()->isNestedLexicalScope();
     293    return false;
     294}
     295
    289296JSScope* JSScope::constantScopeForCodeBlock(ResolveType type, CodeBlock* codeBlock)
    290297{
  • trunk/Source/JavaScriptCore/runtime/JSScope.h

    r189339 r194251  
    6262    bool isCatchScope();
    6363    bool isFunctionNameScopeObject();
     64
     65    bool isNestedLexicalScope();
    6466
    6567    ScopeChainIterator begin();
  • trunk/Source/JavaScriptCore/runtime/SymbolTable.cpp

    r187515 r194251  
    8585    : JSCell(vm, vm.symbolTableStructure.get())
    8686    , m_usesNonStrictEval(false)
     87    , m_nestedLexicalScope(false)
    8788    , m_scopeType(VarScope)
    8889{
    … …  
    143144   
    144145    result->m_usesNonStrictEval = m_usesNonStrictEval;
     146    result->m_nestedLexicalScope = m_nestedLexicalScope;
    145147    result->m_scopeType = m_scopeType;
    146148
  • trunk/Source/JavaScriptCore/runtime/SymbolTable.h

    r189279 r194251  
    647647    RefPtr<TypeSet> globalTypeSetForVariable(const ConcurrentJITLocker&, UniquedStringImpl* key, VM&);
    648648
    649     bool usesNonStrictEval() { return m_usesNonStrictEval; }
     649    bool usesNonStrictEval() const { return m_usesNonStrictEval; }
    650650    void setUsesNonStrictEval(bool usesNonStrictEval) { m_usesNonStrictEval = usesNonStrictEval; }
     651
     652    bool isNestedLexicalScope() const { return m_nestedLexicalScope; }
     653    void markIsNestedLexicalScope() { ASSERT(scopeType() == LexicalScope); m_nestedLexicalScope = true; }
    651654
    652655    enum ScopeType {
    … …  
    687690
    688691    bool m_usesNonStrictEval : 1;
     692    bool m_nestedLexicalScope : 1; // Non-function LexicalScope.
    689693    unsigned m_scopeType : 3; // ScopeType
    690694   
  • trunk/Source/WebInspectorUI/ChangeLog

    r194247 r194251  
     12015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Provide a way to distinguish a nested lexical block from a function's lexical block
     4        https://bugs.webkit.org/show_bug.cgi?id=152361
     5
     6        Reviewed by Saam Barati.
     7
     8        * Localizations/en.lproj/localizedStrings.js:
     9        * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
     10        (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
     11        New "Block Variables" string.
     12
     13        * UserInterface/Models/ScopeChainNode.js:
     14        New "Block" scope type, and update existing types.
     15
     16        * UserInterface/Controllers/DebuggerManager.js:
     17        (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
     18        Parse the protocol type to frontend types. Use the protocol generated enum.
     19
    1202015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
    221
  • trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js

    r194243 r194251  
    9696localizedStrings["Basis"] = "Basis";
    9797localizedStrings["Begin Capturing"] = "Begin Capturing";
     98localizedStrings["Block Variables"] = "Block Variables";
    9899localizedStrings["Blur"] = "Blur";
    99100localizedStrings["Border"] = "Border";
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js

    r194247 r194251  
    586586        var type = null;
    587587        switch (payload.type) {
    588         case "local":
     588        case DebuggerAgent.ScopeType.Local:
    589589            type = WebInspector.ScopeChainNode.Type.Local;
    590590            break;
    591         case "global":
     591        case DebuggerAgent.ScopeType.Global:
    592592            type = WebInspector.ScopeChainNode.Type.Global;
    593593            break;
    594         case "with":
     594        case DebuggerAgent.ScopeType.With:
    595595            type = WebInspector.ScopeChainNode.Type.With;
    596596            break;
    597         case "closure":
     597        case DebuggerAgent.ScopeType.Closure:
    598598            type = WebInspector.ScopeChainNode.Type.Closure;
    599599            break;
    600         case "catch":
     600        case DebuggerAgent.ScopeType.Catch:
    601601            type = WebInspector.ScopeChainNode.Type.Catch;
    602602            break;
    603         case "functionName":
     603        case DebuggerAgent.ScopeType.FunctionName:
    604604            type = WebInspector.ScopeChainNode.Type.FunctionName;
    605605            break;
    606         case "globalLexicalEnvironment":
     606        case DebuggerAgent.ScopeType.NestedLexical:
     607            type = WebInspector.ScopeChainNode.Type.Block;
     608            break;
     609        case DebuggerAgent.ScopeType.GlobalLexicalEnvironment:
    607610            type = WebInspector.ScopeChainNode.Type.GlobalLexicalEnvironment;
    608611            break;
  • trunk/Source/WebInspectorUI/UserInterface/Models/ScopeChainNode.js

    r193425 r194251  
    5656    Local: "scope-chain-type-local",
    5757    Global: "scope-chain-type-global",
     58    GlobalLexicalEnvironment: "scope-chain-type-global-lexical-environment",
    5859    With: "scope-chain-type-with",
    5960    Closure: "scope-chain-type-closure",
    6061    Catch: "scope-chain-type-catch",
    61     FunctionName: "scope-chain-type-functionName",
    62     GlobalLexicalEnvironment: "scope-chain-type-globalLexicalEnvironment",
     62    FunctionName: "scope-chain-type-function-name",
     63    Block: "scope-chain-type-block",
    6364};
  • trunk/Source/WebInspectorUI/UserInterface/Views/ScopeChainDetailsSidebarPanel.js

    r194116 r194251  
    185185                    break;
    186186
     187                case WebInspector.ScopeChainNode.Type.Block:
     188                    title = WebInspector.UIString("Block Variables");
     189                    collapsedByDefault = false;
     190                    break;
     191
    187192                case WebInspector.ScopeChainNode.Type.Closure:
    188193                    title = WebInspector.UIString("Closure Variables");
Note: See TracChangeset for help on using the changeset viewer.