summaryrefslogtreecommitdiff
path: root/chromium/v8/src/init/bootstrapper.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/v8/src/init/bootstrapper.cc
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/v8/src/init/bootstrapper.cc')
-rw-r--r--chromium/v8/src/init/bootstrapper.cc48
1 files changed, 16 insertions, 32 deletions
diff --git a/chromium/v8/src/init/bootstrapper.cc b/chromium/v8/src/init/bootstrapper.cc
index f4049e328ec..2f71c258e88 100644
--- a/chromium/v8/src/init/bootstrapper.cc
+++ b/chromium/v8/src/init/bootstrapper.cc
@@ -34,7 +34,6 @@
#ifdef V8_INTL_SUPPORT
#include "src/objects/intl-objects.h"
#endif // V8_INTL_SUPPORT
-#include "src/objects/js-aggregate-error.h"
#include "src/objects/js-array-buffer-inl.h"
#include "src/objects/js-array-inl.h"
#ifdef V8_INTL_SUPPORT
@@ -919,13 +918,14 @@ void Genesis::CreateAsyncIteratorMaps(Handle<JSFunction> empty) {
Handle<JSObject> async_from_sync_iterator_prototype = factory()->NewJSObject(
isolate()->object_function(), AllocationType::kOld);
SimpleInstallFunction(isolate(), async_from_sync_iterator_prototype, "next",
- Builtins::kAsyncFromSyncIteratorPrototypeNext, 1, true);
+ Builtins::kAsyncFromSyncIteratorPrototypeNext, 1,
+ false);
SimpleInstallFunction(isolate(), async_from_sync_iterator_prototype, "return",
Builtins::kAsyncFromSyncIteratorPrototypeReturn, 1,
- true);
+ false);
SimpleInstallFunction(isolate(), async_from_sync_iterator_prototype, "throw",
Builtins::kAsyncFromSyncIteratorPrototypeThrow, 1,
- true);
+ false);
InstallToStringTag(isolate(), async_from_sync_iterator_prototype,
"Async-from-Sync Iterator");
@@ -1319,18 +1319,16 @@ static void InstallError(
Isolate* isolate, Handle<JSObject> global, Handle<String> name,
int context_index,
Builtins::Name error_constructor = Builtins::kErrorConstructor,
- InstanceType error_type = JS_ERROR_TYPE, int error_function_length = 1,
- int header_size = JSObject::kHeaderSize) {
+ int error_function_length = 1, int in_object_properties = 2) {
Factory* factory = isolate->factory();
// Most Error objects consist of a message and a stack trace.
// Reserve two in-object properties for these.
- const int kInObjectPropertiesCount = 2;
const int kErrorObjectSize =
- header_size + kInObjectPropertiesCount * kTaggedSize;
+ JSObject::kHeaderSize + in_object_properties * kTaggedSize;
Handle<JSFunction> error_fun = InstallFunction(
- isolate, global, name, error_type, kErrorObjectSize,
- kInObjectPropertiesCount, factory->the_hole_value(), error_constructor);
+ isolate, global, name, JS_ERROR_TYPE, kErrorObjectSize,
+ in_object_properties, factory->the_hole_value(), error_constructor);
error_fun->shared().DontAdaptArguments();
error_fun->shared().set_length(error_function_length);
@@ -2778,7 +2776,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Handle<JSObject> prototype(
JSObject::cast(date_time_format_constructor->prototype()), isolate_);
- InstallToStringTag(isolate_, prototype, factory->Object_string());
+ InstallToStringTag(isolate_, prototype, "Intl.DateTimeFormat");
SimpleInstallFunction(isolate_, prototype, "resolvedOptions",
Builtins::kDateTimeFormatPrototypeResolvedOptions,
@@ -2817,7 +2815,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Handle<JSObject> prototype(
JSObject::cast(number_format_constructor->prototype()), isolate_);
- InstallToStringTag(isolate_, prototype, factory->Object_string());
+ InstallToStringTag(isolate_, prototype, "Intl.NumberFormat");
SimpleInstallFunction(isolate_, prototype, "resolvedOptions",
Builtins::kNumberFormatPrototypeResolvedOptions, 0,
@@ -2845,7 +2843,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Handle<JSObject> prototype(
JSObject::cast(collator_constructor->prototype()), isolate_);
- InstallToStringTag(isolate_, prototype, factory->Object_string());
+ InstallToStringTag(isolate_, prototype, "Intl.Collator");
SimpleInstallFunction(isolate_, prototype, "resolvedOptions",
Builtins::kCollatorPrototypeResolvedOptions, 0,
@@ -2908,7 +2906,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Handle<JSObject> prototype(
JSObject::cast(plural_rules_constructor->prototype()), isolate_);
- InstallToStringTag(isolate_, prototype, factory->Object_string());
+ InstallToStringTag(isolate_, prototype, "Intl.PluralRules");
SimpleInstallFunction(isolate_, prototype, "resolvedOptions",
Builtins::kPluralRulesPrototypeResolvedOptions, 0,
@@ -4234,8 +4232,7 @@ void Genesis::InitializeGlobal_harmony_promise_any() {
InstallError(isolate_, global, factory->AggregateError_string(),
Context::AGGREGATE_ERROR_FUNCTION_INDEX,
- Builtins::kAggregateErrorConstructor, JS_AGGREGATE_ERROR_TYPE, 2,
- JSAggregateError::kHeaderSize);
+ Builtins::kAggregateErrorConstructor, 2, 2);
// Setup %AggregateErrorPrototype%.
Handle<JSFunction> aggregate_error_function(
@@ -4244,26 +4241,13 @@ void Genesis::InitializeGlobal_harmony_promise_any() {
JSObject::cast(aggregate_error_function->instance_prototype()),
isolate());
- Handle<String> getter_name =
- Name::ToFunctionName(isolate_, factory->errors_string(),
- isolate_->factory()->get_string())
- .ToHandleChecked();
-
- Handle<JSFunction> getter = SimpleCreateFunction(
- isolate(), getter_name, Builtins::kAggregateErrorPrototypeErrorsGetter, 0,
- true);
-
- JSObject::DefineAccessor(prototype, factory->errors_string(), getter,
- factory->undefined_value(), DONT_ENUM);
-
Handle<JSFunction> promise_fun(
JSFunction::cast(
isolate()->native_context()->get(Context::PROMISE_FUNCTION_INDEX)),
isolate());
- InstallFunctionWithBuiltinId(isolate_, promise_fun, "any",
- Builtins::kPromiseAny, 1, true);
-
- DCHECK(promise_fun->HasFastProperties());
+ Handle<JSFunction> promise_any = InstallFunctionWithBuiltinId(
+ isolate_, promise_fun, "any", Builtins::kPromiseAny, 1, true);
+ native_context()->set_promise_any(*promise_any);
}
void Genesis::InitializeGlobal_harmony_promise_all_settled() {