Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 }) |
| OLD | NEW |