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

Unified Diff: src/promise.js

Issue 194663003: API support for promises (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Sven's comments Created 6 years, 9 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/contexts.h ('k') | src/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/promise.js
diff --git a/src/promise.js b/src/promise.js
index 2c36d4d55a3d71de243659cd3d043695b0ab0389..9d30e58d928ff7deb1a82e0987d20260b7ac0fbd 100644
--- a/src/promise.js
+++ b/src/promise.js
@@ -102,6 +102,15 @@ function PromiseReject(promise, r) {
}
+// For API.
+
+function PromiseNopResolver() {}
+
+function PromiseCreate() {
+ return new Promise(PromiseNopResolver)
+}
+
+
// Convenience.
function PromiseDeferred() {
« no previous file with comments | « src/contexts.h ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698