WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
135098
esprima
Web Inspector: Add esprima to the WebInspector.
https://bugs.webkit.org/show_bug.cgi?id=135098
Summary
Web Inspector: Add esprima to the WebInspector.
Saam Barati
Reported
2014-07-19 15:10:17 PDT
Add the AST library Esprima to the WebInspector so that we can parse JavaScript into an AST. (More information on Esprima at:
http://esprima.org
)
Attachments
patch
(123.71 KB, patch)
2014-07-19 15:19 PDT
,
Saam Barati
joepeck
: review+
joepeck
: commit-queue-
Details
Formatted Diff
Diff
patch
(124.21 KB, patch)
2014-07-21 12:22 PDT
,
Saam Barati
joepeck
: review+
joepeck
: commit-queue-
Details
Formatted Diff
Diff
patch
(124.09 KB, patch)
2014-07-21 16:28 PDT
,
Saam Barati
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2014-07-19 15:10:39 PDT
<
rdar://problem/17739150
>
Saam Barati
Comment 2
2014-07-19 15:19:34 PDT
Created
attachment 235176
[details]
patch This patch includes Esprima into the WebInspector and attaches its exported function onto the WebInspector namespace object.
Joseph Pecoraro
Comment 3
2014-07-21 10:58:42 PDT
Comment on
attachment 235176
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=235176&action=review
> Source/WebInspectorUI/ChangeLog:11 > + * UserInterface/External/esprima.js: Added.
Lets make a subfolder for this, like other External libraries. UserInterface/External/Esprima/esprima.js
> Source/WebInspectorUI/UserInterface/External/esprima.js:1 > +/*
We will want to minify this script in production builds. See how this script handles CodeMirror: Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl This could be done in a follow-up.
> Source/WebInspectorUI/UserInterface/External/esprima.js:34 > +WebInspector._esprima = {};
You should mention the edits you've made in a comment in this file. I suspect this, and its use below, are the only changes you made.
Saam Barati
Comment 4
2014-07-21 12:22:39 PDT
Created
attachment 235238
[details]
patch This patch includes Esprima into the WebInspector and attaches its exported function onto the WebInspector namespace object. (Will modify the minifying pearl script in another patch).
Joseph Pecoraro
Comment 5
2014-07-21 13:37:07 PDT
Comment on
attachment 235238
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=235238&action=review
> Source/WebInspectorUI/UserInterface/External/Esprima/esprima.js:35 > +// I delted the code that determines the context esprima is loaded in (node.js, the browser, etc.) and replaced it with WebInspector._esprima.
We should not have "I" in a comment. Someone reading this will not know who that refers too, and any one individual does not necessary own a file. This is more of a "we" meaning the project / contributors as a whole. Something like this would be sufficient: // WebKit Modifications: // - replaced code that automatically determines Esprima execution context (node, browser, etc.) with WebInspector._esprima The idea here is to make it easier for the next person who updates Esprima by documenting the changes we've made.
Saam Barati
Comment 6
2014-07-21 16:28:35 PDT
Created
attachment 235252
[details]
patch This patch includes Esprima into the WebInspector and attaches its exported function onto the WebInspector namespace object. (Comment modifications taken into account).
Joseph Pecoraro
Comment 7
2014-07-21 19:04:42 PDT
Comment on
attachment 235252
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=235252&action=review
> Source/WebInspectorUI/ChangeLog:13 > + (.):
Nit: prepare-ChangeLog left a turd. In the future you can remove these.
WebKit Commit Bot
Comment 8
2014-07-21 19:36:55 PDT
Comment on
attachment 235252
[details]
patch Clearing flags on attachment: 235252 Committed
r171334
: <
http://trac.webkit.org/changeset/171334
>
WebKit Commit Bot
Comment 9
2014-07-21 19:36:59 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug