<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>193147</bug_id>
          
          <creation_ts>2019-01-04 11:00:01 -0800</creation_ts>
          <short_desc>Web Inspector: Include `globalThis` in default JavaScript completions</short_desc>
          <delta_ts>2019-01-04 12:30:36 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph Pecoraro">joepeck</reporter>
          <assigned_to name="Joseph Pecoraro">joepeck</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>hi</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>joepeck</cc>
    
    <cc>keith_miller</cc>
    
    <cc>mark.lam</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1491736</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2019-01-04 11:00:01 -0800</bug_when>
    <thetext>Include `globalThis` in default JavaScript completions</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1491737</commentid>
    <comment_count>1</comment_count>
      <attachid>358336</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2019-01-04 11:00:44 -0800</bug_when>
    <thetext>Created attachment 358336
[PATCH] Proposed Fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1491773</commentid>
    <comment_count>2</comment_count>
      <attachid>358336</attachid>
    <who name="Devin Rousso">hi</who>
    <bug_when>2019-01-04 11:49:59 -0800</bug_when>
    <thetext>Comment on attachment 358336
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=358336&amp;action=review

r=me

Is `globalThis` something we&apos;d also want to always show in the Scope chain when paused?

&gt; Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js:661
&gt;              &quot;return&quot;, &quot;static&quot;, &quot;super&quot;, &quot;switch&quot;, &quot;this&quot;, &quot;throw&quot;, &quot;true&quot;, &quot;try&quot;,

Should we be including `&quot;globalThis&quot;` in `allKeywords` as well?

Ditto (727) (I can&apos;t comment on it because it&apos;s outside of this diff&apos;s range)

&gt; Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js:664
&gt; +        var valueKeywords = [&quot;false&quot;, &quot;Infinity&quot;, &quot;NaN&quot;, &quot;null&quot;, &quot;this&quot;, &quot;true&quot;, &quot;undefined&quot;, &quot;globalThis&quot;];

`&quot;globalThis&quot;` should be placed before `&quot;Infinity&quot;` if we want to keep it alphabetized.

NIT: considering how small this patch is, I wouldn&apos;t be against a bit of refactoring (e.g. `.keySet()` to `new Set()`)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1491784</commentid>
    <comment_count>3</comment_count>
      <attachid>358336</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2019-01-04 12:04:04 -0800</bug_when>
    <thetext>Comment on attachment 358336
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=358336&amp;action=review

&gt;&gt; Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js:661
&gt;&gt;              &quot;return&quot;, &quot;static&quot;, &quot;super&quot;, &quot;switch&quot;, &quot;this&quot;, &quot;throw&quot;, &quot;true&quot;, &quot;try&quot;,
&gt; 
&gt; Should we be including `&quot;globalThis&quot;` in `allKeywords` as well?
&gt; 
&gt; Ditto (727) (I can&apos;t comment on it because it&apos;s outside of this diff&apos;s range)

`globalThis` is not a keyword.

&gt;&gt; Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js:664
&gt;&gt; +        var valueKeywords = [&quot;false&quot;, &quot;Infinity&quot;, &quot;NaN&quot;, &quot;null&quot;, &quot;this&quot;, &quot;true&quot;, &quot;undefined&quot;, &quot;globalThis&quot;];
&gt; 
&gt; `&quot;globalThis&quot;` should be placed before `&quot;Infinity&quot;` if we want to keep it alphabetized.
&gt; 
&gt; NIT: considering how small this patch is, I wouldn&apos;t be against a bit of refactoring (e.g. `.keySet()` to `new Set()`)

Good idea but I&apos;ll keep the code as is for now to avoid breaking something inadvertently.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1491804</commentid>
    <comment_count>4</comment_count>
      <attachid>358336</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-01-04 12:29:34 -0800</bug_when>
    <thetext>Comment on attachment 358336
[PATCH] Proposed Fix

Clearing flags on attachment: 358336

Committed r239630: &lt;https://trac.webkit.org/changeset/239630&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1491805</commentid>
    <comment_count>5</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-01-04 12:29:36 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1491806</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-01-04 12:30:36 -0800</bug_when>
    <thetext>&lt;rdar://problem/47054614&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>358336</attachid>
            <date>2019-01-04 11:00:44 -0800</date>
            <delta_ts>2019-01-04 12:29:34 -0800</delta_ts>
            <desc>[PATCH] Proposed Fix</desc>
            <filename>globalthis-1.patch</filename>
            <type>text/plain</type>
            <size>1710</size>
            <attacher name="Joseph Pecoraro">joepeck</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJJbnNwZWN0b3JVSS9DaGFuZ2VMb2cgYi9Tb3VyY2UvV2Vi
SW5zcGVjdG9yVUkvQ2hhbmdlTG9nCmluZGV4IDFlYTk2OGZmZWI0Li40MTA5YzhkZDIzMyAxMDA2
NDQKLS0tIGEvU291cmNlL1dlYkluc3BlY3RvclVJL0NoYW5nZUxvZworKysgYi9Tb3VyY2UvV2Vi
SW5zcGVjdG9yVUkvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTMgQEAKKzIwMTktMDEtMDQgIEpvc2Vw
aCBQZWNvcmFybyAgPHBlY29yYXJvQGFwcGxlLmNvbT4KKworICAgICAgICBXZWIgSW5zcGVjdG9y
OiBJbmNsdWRlIGBnbG9iYWxUaGlzYCBpbiBkZWZhdWx0IEphdmFTY3JpcHQgY29tcGxldGlvbnMK
KyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE5MzE0Nwor
CisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgICogVXNlcklu
dGVyZmFjZS9Db250cm9sbGVycy9Db2RlTWlycm9yQ29tcGxldGlvbkNvbnRyb2xsZXIuanM6Cisg
ICAgICAgIEFkZCBgZ2xvYmFsVGhpc2Agd2hpY2ggaXMgYSBuZXcgZ2xvYmFsIHZhbHVlLgorCiAy
MDE5LTAxLTAyICBOaWtpdGEgVmFzaWx5ZXYgIDxudmFzaWx5ZXZAYXBwbGUuY29tPgogCiAgICAg
ICAgIFdlYiBJbnNwZWN0b3I6IFN0eWxlczogc2VsZWN0aW9uIGxvc3Qgd2hlbiBpbnNwZWN0b3Ig
aXM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