diff options
Diffstat (limited to 'deps/v8/src/js/prologue.js')
-rw-r--r-- | deps/v8/src/js/prologue.js | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/deps/v8/src/js/prologue.js b/deps/v8/src/js/prologue.js index dba77d7d8d..e51ab558b6 100644 --- a/deps/v8/src/js/prologue.js +++ b/deps/v8/src/js/prologue.js @@ -112,20 +112,6 @@ function InstallGetter(object, name, getter, attributes, prefix) { } -// Helper function to install a getter/setter accessor property. -function InstallGetterSetter(object, name, getter, setter, attributes) { - %CheckIsBootstrapping(); - if (IS_UNDEFINED(attributes)) attributes = DONT_ENUM; - SetFunctionName(getter, name, "get"); - SetFunctionName(setter, name, "set"); - %FunctionRemovePrototype(getter); - %FunctionRemovePrototype(setter); - %DefineAccessorPropertyUnchecked(object, name, getter, setter, attributes); - %SetNativeFlag(getter); - %SetNativeFlag(setter); -} - - function OverrideFunction(object, name, f, afterInitialBootstrap) { %CheckIsBootstrapping(); %object_define_property(object, name, { value: f, @@ -270,7 +256,6 @@ utils.SetFunctionName = SetFunctionName; utils.InstallConstants = InstallConstants; utils.InstallFunctions = InstallFunctions; utils.InstallGetter = InstallGetter; -utils.InstallGetterSetter = InstallGetterSetter; utils.OverrideFunction = OverrideFunction; utils.SetUpLockedPrototype = SetUpLockedPrototype; utils.PostNatives = PostNatives; @@ -281,7 +266,7 @@ utils.PostDebug = PostDebug; // ----------------------------------------------------------------------- -%OptimizeObjectForAddingMultipleProperties(extrasUtils, 5); +%OptimizeObjectForAddingMultipleProperties(extrasUtils, 7); extrasUtils.logStackTrace = function logStackTrace() { %DebugTrace(); @@ -322,6 +307,15 @@ extrasUtils.uncurryThis = function uncurryThis(func) { }; }; +// We pass true to trigger the debugger's on exception handler. +extrasUtils.rejectPromise = function rejectPromise(promise, reason) { + %promise_internal_reject(promise, reason, true); +} + +extrasUtils.markPromiseAsHandled = function markPromiseAsHandled(promise) { + %PromiseMarkAsHandled(promise); +}; + %ToFastProperties(extrasUtils); }) |