<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Console: Variables defined with let/const aren't accessible outside of console's scope"
   href="https://bugs.webkit.org/show_bug.cgi?id=150752#c18">Comment # 18</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: Console: Variables defined with let/const aren't accessible outside of console's scope"
   href="https://bugs.webkit.org/show_bug.cgi?id=150752">bug 150752</a>
              from <span class="vcard"><a class="email" href="mailto:joepeck&#64;webkit.org" title="Joseph Pecoraro &lt;joepeck&#64;webkit.org&gt;"> <span class="fn">Joseph Pecoraro</span></a>
</span></b>
        <pre><span class="quote">&gt; &gt; Source/JavaScriptCore/runtime/JSScope.cpp:212
&gt; &gt; +            if (JSScope* globalScopeExtension = scope-&gt;globalObject()-&gt;globalScopeExtension()) {
&gt; &gt; +                JSObject* object = JSScope::objectAtScope(globalScopeExtension);
&gt; &gt; +                if (object-&gt;hasProperty(exec, ident))
&gt; &gt; +                    return object;
&gt; &gt; +            }
&gt; 
&gt; This seems contrary to what you told me offline.  I thought you said wanted
&gt; the global to take precedence over the Inspector's scopeExtension.  Here,
&gt; you're checking for the property in the scope extension first.  Is this
&gt; correct?</span >

Debugging with Mark we found that my impl was mistakenly between the GlobalLexicalEnvironment and the GlobalObject itself. I wasn't aware of global properties on the global object differed from global variables. Examples of that are named properties on the DOMWindowGlobalObject (or static properties on JSGlobalObject, but none conflict with Command Line APIs).

So with this test case:

    &lt;div id=&quot;values&quot;&gt;&lt;/div&gt;

There is a &quot;global property&quot; `values` === `window.values`, that should not be shadowed by the Command Line API function named `values`. I added a test for this and corrected the resolve.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>