Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(771)

Unified Diff: third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js

Issue 2569563002: DevTools: support pretty-print of async/await (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js
diff --git a/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js b/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js
index 9fa7adc9caf11b6489a9343b761135040f8a7d39..45ced4b34388b66019f81bd8e67f46f21b3b18a3 100644
--- a/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js
+++ b/third_party/WebKit/Source/devtools/front_end/formatter_worker/FormatterWorker.js
@@ -97,7 +97,7 @@ FormatterWorker.relaxedJSONParser = function(content) {
* @param {string} content
*/
FormatterWorker.evaluatableJavaScriptSubstring = function(content) {
- var tokenizer = acorn.tokenizer(content, {ecmaVersion: 7});
+ var tokenizer = acorn.tokenizer(content, {ecmaVersion: 8});
var result = '';
try {
var token = tokenizer.getToken();
@@ -139,7 +139,7 @@ FormatterWorker.evaluatableJavaScriptSubstring = function(content) {
* @param {string} content
*/
FormatterWorker.javaScriptIdentifiers = function(content) {
- var root = acorn.parse(content, {ranges: false, ecmaVersion: 6});
+ var root = acorn.parse(content, {ranges: false, ecmaVersion: 8});
/** @type {!Array<!ESTree.Node>} */
var identifiers = [];

Powered by Google App Engine
This is Rietveld 408576698