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

Side by Side Diff: src/promise.js

Issue 374103002: Change some names in Promise instrumentation events. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/es6/debug-promises-async-task-event.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 "use strict"; 5 "use strict";
6 6
7 // This file relies on the fact that the following declaration has been made 7 // This file relies on the fact that the following declaration has been made
8 // in runtime.js: 8 // in runtime.js:
9 // var $Object = global.Object 9 // var $Object = global.Object
10 // var $WeakMap = global.WeakMap 10 // var $WeakMap = global.WeakMap
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 for (var i = 0; i < tasks.length; i += 2) { 133 for (var i = 0; i < tasks.length; i += 2) {
134 PromiseHandle(value, tasks[i], tasks[i + 1]) 134 PromiseHandle(value, tasks[i], tasks[i + 1])
135 } 135 }
136 if (instrumenting) { 136 if (instrumenting) {
137 %DebugAsyncTaskEvent({ type: "didHandle", id: id, name: name }); 137 %DebugAsyncTaskEvent({ type: "didHandle", id: id, name: name });
138 } 138 }
139 }); 139 });
140 if (instrumenting) { 140 if (instrumenting) {
141 id = ++lastMicrotaskId; 141 id = ++lastMicrotaskId;
142 name = status > 0 ? "Promise.Resolved" : "Promise.Rejected"; 142 name = status > 0 ? "Promise.resolve" : "Promise.reject";
143 %DebugAsyncTaskEvent({ type: "enqueue", id: id, name: name }); 143 %DebugAsyncTaskEvent({ type: "enqueue", id: id, name: name });
144 } 144 }
145 } 145 }
146 146
147 function PromiseIdResolveHandler(x) { return x } 147 function PromiseIdResolveHandler(x) { return x }
148 function PromiseIdRejectHandler(r) { throw r } 148 function PromiseIdRejectHandler(r) { throw r }
149 149
150 function PromiseNopResolver() {} 150 function PromiseNopResolver() {}
151 151
152 // ------------------------------------------------------------------- 152 // -------------------------------------------------------------------
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 "race", PromiseOne, 334 "race", PromiseOne,
335 "resolve", PromiseCast 335 "resolve", PromiseCast
336 ]); 336 ]);
337 InstallFunctions($Promise.prototype, DONT_ENUM, [ 337 InstallFunctions($Promise.prototype, DONT_ENUM, [
338 "chain", PromiseChain, 338 "chain", PromiseChain,
339 "then", PromiseThen, 339 "then", PromiseThen,
340 "catch", PromiseCatch 340 "catch", PromiseCatch
341 ]); 341 ]);
342 342
343 })(); 343 })();
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/es6/debug-promises-async-task-event.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698