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

Unified Diff: src/js/promise.js

Issue 1558113002: Add UseCounters for various standards-related code paths (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix accidental redefinition Created 4 years, 11 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/js/macros.py ('k') | src/js/regexp.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/promise.js
diff --git a/src/js/promise.js b/src/js/promise.js
index ebc5802da12e7147d89908ef3bec7b0a1478d79c..b3d66acefeb6e172547f1c8784637711175d7870 100644
--- a/src/js/promise.js
+++ b/src/js/promise.js
@@ -246,10 +246,12 @@ function NewPromiseCapability(C) {
}
function PromiseDeferred() {
+ %IncrementUseCounter(kPromiseDefer);
return NewPromiseCapability(this);
}
function PromiseResolved(x) {
+ %IncrementUseCounter(kPromiseAccept);
return %_Call(PromiseCast, this, x);
}
@@ -314,6 +316,7 @@ function PromiseThen(onResolve, onReject) {
// Chain is left around for now as an alias for then
function PromiseChain(onResolve, onReject) {
+ %IncrementUseCounter(kPromiseChain);
return %_Call(PromiseThen, this, onResolve, onReject);
}
« no previous file with comments | « src/js/macros.py ('k') | src/js/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698