OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 4145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4156 } | 4156 } |
4157 | 4157 |
4158 | 4158 |
4159 bool Genesis::InstallSpecialObjects(Handle<Context> native_context) { | 4159 bool Genesis::InstallSpecialObjects(Handle<Context> native_context) { |
4160 Isolate* isolate = native_context->GetIsolate(); | 4160 Isolate* isolate = native_context->GetIsolate(); |
4161 // Don't install extensions into the snapshot. | 4161 // Don't install extensions into the snapshot. |
4162 if (isolate->serializer_enabled()) return true; | 4162 if (isolate->serializer_enabled()) return true; |
4163 | 4163 |
4164 Factory* factory = isolate->factory(); | 4164 Factory* factory = isolate->factory(); |
4165 HandleScope scope(isolate); | 4165 HandleScope scope(isolate); |
4166 Handle<JSGlobalObject> global(JSGlobalObject::cast( | |
4167 native_context->global_object())); | |
4168 | 4166 |
4169 Handle<JSObject> Error = isolate->error_function(); | 4167 Handle<JSObject> Error = isolate->error_function(); |
4170 Handle<String> name = | 4168 Handle<String> name = |
4171 factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("stackTraceLimit")); | 4169 factory->InternalizeOneByteString(STATIC_CHAR_VECTOR("stackTraceLimit")); |
4172 Handle<Smi> stack_trace_limit(Smi::FromInt(FLAG_stack_trace_limit), isolate); | 4170 Handle<Smi> stack_trace_limit(Smi::FromInt(FLAG_stack_trace_limit), isolate); |
4173 JSObject::AddProperty(Error, name, stack_trace_limit, NONE); | 4171 JSObject::AddProperty(Error, name, stack_trace_limit, NONE); |
4174 | 4172 |
4175 WasmJs::Install(isolate, global); | 4173 if (FLAG_expose_wasm || FLAG_validate_asm) { |
| 4174 WasmJs::Install(isolate); |
| 4175 } |
4176 | 4176 |
4177 return true; | 4177 return true; |
4178 } | 4178 } |
4179 | 4179 |
4180 | 4180 |
4181 static uint32_t Hash(RegisteredExtension* extension) { | 4181 static uint32_t Hash(RegisteredExtension* extension) { |
4182 return v8::internal::ComputePointerHash(extension); | 4182 return v8::internal::ComputePointerHash(extension); |
4183 } | 4183 } |
4184 | 4184 |
4185 Genesis::ExtensionStates::ExtensionStates() : map_(8) {} | 4185 Genesis::ExtensionStates::ExtensionStates() : map_(8) {} |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4757 } | 4757 } |
4758 | 4758 |
4759 | 4759 |
4760 // Called when the top-level V8 mutex is destroyed. | 4760 // Called when the top-level V8 mutex is destroyed. |
4761 void Bootstrapper::FreeThreadResources() { | 4761 void Bootstrapper::FreeThreadResources() { |
4762 DCHECK(!IsActive()); | 4762 DCHECK(!IsActive()); |
4763 } | 4763 } |
4764 | 4764 |
4765 } // namespace internal | 4765 } // namespace internal |
4766 } // namespace v8 | 4766 } // namespace v8 |
OLD | NEW |