Commit 390ad8c5 authored by Adam Klein's avatar Adam Klein Committed by Commit Bot

[bootstrapper|cleanup] Simplify creation of Atomics object

The Atomics object is a normal object, just like Math, JSON, etc., so
we should be able to set it up in the same way those are set up
since cff5470a.

Change-Id: I46a9ba990707c0659f1a62f628b2c69204e536f8
Reviewed-on: https://chromium-review.googlesource.com/537076Reviewed-by: 's avatarBen Smith <binji@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45964}
parent cff5470a
......@@ -2751,11 +2751,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
}
{ // -- A t o m i c s
Handle<String> name = factory->InternalizeUtf8String("Atomics");
Handle<JSFunction> cons = factory->NewFunction(name);
JSFunction::SetPrototype(cons, isolate->initial_object_prototype());
Handle<JSObject> atomics_object = factory->NewJSObject(cons, TENURED);
DCHECK(atomics_object->IsJSObject());
Handle<JSObject> atomics_object =
factory->NewJSObject(isolate->object_function(), TENURED);
native_context()->set_atomics_object(*atomics_object);
SimpleInstallFunction(atomics_object, "load", Builtins::kAtomicsLoad, 2,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment