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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 259 utils.OverrideFunction = OverrideFunction; | 259 utils.OverrideFunction = OverrideFunction; |
| 260 utils.SetUpLockedPrototype = SetUpLockedPrototype; | 260 utils.SetUpLockedPrototype = SetUpLockedPrototype; |
| 261 utils.PostNatives = PostNatives; | 261 utils.PostNatives = PostNatives; |
| 262 utils.PostExperimentals = PostExperimentals; | 262 utils.PostExperimentals = PostExperimentals; |
| 263 utils.PostDebug = PostDebug; | 263 utils.PostDebug = PostDebug; |
| 264 | 264 |
| 265 %ToFastProperties(utils); | 265 %ToFastProperties(utils); |
| 266 | 266 |
| 267 // ----------------------------------------------------------------------- | 267 // ----------------------------------------------------------------------- |
| 268 | 268 |
| 269 %OptimizeObjectForAddingMultipleProperties(extrasUtils, 5); | 269 %OptimizeObjectForAddingMultipleProperties(extrasUtils, 7); |
| 270 | 270 |
| 271 extrasUtils.logStackTrace = function logStackTrace() { | 271 extrasUtils.logStackTrace = function logStackTrace() { |
| 272 %DebugTrace(); | 272 %DebugTrace(); |
| 273 }; | 273 }; |
| 274 | 274 |
| 275 extrasUtils.log = function log() { | 275 extrasUtils.log = function log() { |
| 276 let message = ''; | 276 let message = ''; |
| 277 for (const arg of arguments) { | 277 for (const arg of arguments) { |
| 278 message += arg; | 278 message += arg; |
| 279 } | 279 } |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 300 return %reflect_apply(func, thisArg, args); | 300 return %reflect_apply(func, thisArg, args); |
| 301 }; | 301 }; |
| 302 }; | 302 }; |
| 303 | 303 |
| 304 extrasUtils.uncurryThis = function uncurryThis(func) { | 304 extrasUtils.uncurryThis = function uncurryThis(func) { |
| 305 return function(thisArg, ...args) { | 305 return function(thisArg, ...args) { |
| 306 return %reflect_apply(func, thisArg, args); | 306 return %reflect_apply(func, thisArg, args); |
| 307 }; | 307 }; |
| 308 }; | 308 }; |
| 309 | 309 |
| 310 extrasUtils.rejectPromise = function DoRejectPromise(promise, reason) { | |
|
adamk
2017/01/13 21:43:37
s/DoRejectPromise/rejectPromise/
gsathya
2017/01/13 22:34:46
Done.
| |
| 311 %promise_internal_reject(promise, reason, true); | |
|
adamk
2017/01/13 21:43:37
and a comment for true here too
gsathya
2017/01/13 22:34:46
Done.
| |
| 312 } | |
| 313 | |
| 314 extrasUtils.markPromiseAsHandled = function markPromiseAsHandled(promise) { | |
| 315 %PromiseMarkAsHandled(promise); | |
| 316 }; | |
| 317 | |
| 310 %ToFastProperties(extrasUtils); | 318 %ToFastProperties(extrasUtils); |
| 311 | 319 |
| 312 }) | 320 }) |
| OLD | NEW |