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

Side by Side Diff: src/js/prologue.js

Issue 2796243002: Add isPromise V8 extras util (Closed)
Patch Set: Fix typo Created 3 years, 8 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
« no previous file with comments | « src/bootstrapper.cc ('k') | test/cctest/test-api.cc » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 (function(global, utils, extrasUtils) { 5 (function(global, utils, extrasUtils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 utils.InstallFunctions = InstallFunctions; 161 utils.InstallFunctions = InstallFunctions;
162 utils.InstallGetter = InstallGetter; 162 utils.InstallGetter = InstallGetter;
163 utils.OverrideFunction = OverrideFunction; 163 utils.OverrideFunction = OverrideFunction;
164 utils.SetUpLockedPrototype = SetUpLockedPrototype; 164 utils.SetUpLockedPrototype = SetUpLockedPrototype;
165 utils.PostNatives = PostNatives; 165 utils.PostNatives = PostNatives;
166 166
167 %ToFastProperties(utils); 167 %ToFastProperties(utils);
168 168
169 // ----------------------------------------------------------------------- 169 // -----------------------------------------------------------------------
170 170
171 %OptimizeObjectForAddingMultipleProperties(extrasUtils, 7); 171 %OptimizeObjectForAddingMultipleProperties(extrasUtils, 11);
Dan Ehrenberg 2017/04/06 13:01:30 Nit: If you switch to InstallFunctions or similar
172 172
173 extrasUtils.logStackTrace = function logStackTrace() { 173 extrasUtils.logStackTrace = function logStackTrace() {
174 %DebugTrace(); 174 %DebugTrace();
175 }; 175 };
176 176
177 extrasUtils.log = function log() { 177 extrasUtils.log = function log() {
178 let message = ''; 178 let message = '';
179 for (const arg of arguments) { 179 for (const arg of arguments) {
180 message += arg; 180 message += arg;
181 } 181 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 // [[PromiseState]] values (for extrasUtils.promiseState()) 225 // [[PromiseState]] values (for extrasUtils.promiseState())
226 // These values should be kept in sync with PromiseStatus in globals.h 226 // These values should be kept in sync with PromiseStatus in globals.h
227 extrasUtils.kPROMISE_PENDING = 0; 227 extrasUtils.kPROMISE_PENDING = 0;
228 extrasUtils.kPROMISE_FULFILLED = 1; 228 extrasUtils.kPROMISE_FULFILLED = 1;
229 extrasUtils.kPROMISE_REJECTED = 2; 229 extrasUtils.kPROMISE_REJECTED = 2;
230 230
231 %ToFastProperties(extrasUtils); 231 %ToFastProperties(extrasUtils);
232 232
233 }) 233 })
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698