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

Unified Diff: src/js/promise.js

Issue 2572623002: PromiseHandle port to TF (Closed)
Patch Set: Address comments 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
« no previous file with comments | « src/isolate.cc ('k') | src/objects.h » ('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 a8553dd605fe65c13ce267225b402b274ad59fe4..d66ae1a9ca40b293886ba6745ab866e7b94f3042 100644
--- a/src/js/promise.js
+++ b/src/js/promise.js
@@ -39,31 +39,6 @@ utils.Import(function(from) {
// Core functionality.
-function PromiseHandle(value, handler, deferred) {
- var debug_is_active = DEBUG_IS_ACTIVE;
- try {
- if (debug_is_active) %DebugPushPromise(deferred.promise);
- var result = handler(value);
- if (IS_UNDEFINED(deferred.resolve)) {
- %promise_resolve(deferred.promise, result);
- } else {
- %_Call(deferred.resolve, UNDEFINED, result);
- }
- } %catch (exception) { // Natives syntax to mark this catch block.
- try {
- if (IS_UNDEFINED(deferred.reject)) {
- // Pass false for debugEvent so .then chaining or throwaway promises
- // in async functions do not trigger redundant ExceptionEvents.
- %PromiseReject(deferred.promise, exception, false);
- } else {
- %_Call(deferred.reject, UNDEFINED, exception);
- }
- } catch (e) { }
- } finally {
- if (debug_is_active) %DebugPopPromise();
- }
-}
-
function PromiseDebugGetInfo(deferreds, status) {
var id, name, instrumenting = DEBUG_IS_ACTIVE;
@@ -394,7 +369,6 @@ utils.InstallGetter(GlobalPromise, speciesSymbol, PromiseSpecies);
"promise_reject", DoRejectPromise,
// TODO(gsathya): Remove this once we update the promise builtin.
"promise_internal_reject", RejectPromise,
- "promise_handle", PromiseHandle,
"promise_debug_get_info", PromiseDebugGetInfo,
"new_promise_capability", NewPromiseCapability,
"internal_promise_capability", CreateInternalPromiseCapability,
« no previous file with comments | « src/isolate.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698