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

Unified Diff: src/js/v8natives.js

Issue 1423663006: [es7] Implement async functions parsing Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months 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
« no previous file with comments | « src/globals.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/v8natives.js
diff --git a/src/js/v8natives.js b/src/js/v8natives.js
index 7c2ea48aae07b5d9832e16d2cddb270433443ee4..43f2be8113615e41c310838c406b829e2f066fe8 100644
--- a/src/js/v8natives.js
+++ b/src/js/v8natives.js
@@ -1683,10 +1683,11 @@ function FunctionSourceString(func) {
: %FunctionGetName(func);
var isGenerator = %FunctionIsGenerator(func);
+ var isAsync = %FunctionIsAsync(func);
var head = %FunctionIsConciseMethod(func)
? (isGenerator ? '*' : '')
: (isGenerator ? 'function* ' : 'function ');
- return head + name + source;
+ return (isAsync ? 'async ' : '') + head + name + source;
}
« no previous file with comments | « src/globals.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698