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/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/extensions/externalize-string-extension.h" | 9 #include "src/extensions/externalize-string-extension.h" |
10 #include "src/extensions/free-buffer-extension.h" | 10 #include "src/extensions/free-buffer-extension.h" |
(...skipping 2195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2206 Object::GetProperty(isolate, global, "Error").ToHandleChecked()); | 2206 Object::GetProperty(isolate, global, "Error").ToHandleChecked()); |
2207 Handle<String> name = | 2207 Handle<String> name = |
2208 factory->InternalizeOneByteString(STATIC_ASCII_VECTOR("stackTraceLimit")); | 2208 factory->InternalizeOneByteString(STATIC_ASCII_VECTOR("stackTraceLimit")); |
2209 Handle<Smi> stack_trace_limit(Smi::FromInt(FLAG_stack_trace_limit), isolate); | 2209 Handle<Smi> stack_trace_limit(Smi::FromInt(FLAG_stack_trace_limit), isolate); |
2210 JSObject::AddProperty(Error, name, stack_trace_limit, NONE); | 2210 JSObject::AddProperty(Error, name, stack_trace_limit, NONE); |
2211 | 2211 |
2212 // Expose the natives in global if a name for it is specified. | 2212 // Expose the natives in global if a name for it is specified. |
2213 if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) { | 2213 if (FLAG_expose_natives_as != NULL && strlen(FLAG_expose_natives_as) != 0) { |
2214 Handle<String> natives = | 2214 Handle<String> natives = |
2215 factory->InternalizeUtf8String(FLAG_expose_natives_as); | 2215 factory->InternalizeUtf8String(FLAG_expose_natives_as); |
| 2216 uint32_t dummy_index; |
| 2217 if (natives->AsArrayIndex(&dummy_index)) return true; |
2216 JSObject::AddProperty(global, natives, handle(global->builtins()), | 2218 JSObject::AddProperty(global, natives, handle(global->builtins()), |
2217 DONT_ENUM); | 2219 DONT_ENUM); |
2218 } | 2220 } |
2219 | 2221 |
2220 // Expose the stack trace symbol to native JS. | 2222 // Expose the stack trace symbol to native JS. |
2221 RETURN_ON_EXCEPTION_VALUE( | 2223 RETURN_ON_EXCEPTION_VALUE( |
2222 isolate, | 2224 isolate, |
2223 JSObject::SetOwnPropertyIgnoreAttributes( | 2225 JSObject::SetOwnPropertyIgnoreAttributes( |
2224 handle(native_context->builtins(), isolate), | 2226 handle(native_context->builtins(), isolate), |
2225 factory->InternalizeOneByteString( | 2227 factory->InternalizeOneByteString( |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2726 return from + sizeof(NestingCounterType); | 2728 return from + sizeof(NestingCounterType); |
2727 } | 2729 } |
2728 | 2730 |
2729 | 2731 |
2730 // Called when the top-level V8 mutex is destroyed. | 2732 // Called when the top-level V8 mutex is destroyed. |
2731 void Bootstrapper::FreeThreadResources() { | 2733 void Bootstrapper::FreeThreadResources() { |
2732 DCHECK(!IsActive()); | 2734 DCHECK(!IsActive()); |
2733 } | 2735 } |
2734 | 2736 |
2735 } } // namespace v8::internal | 2737 } } // namespace v8::internal |
OLD | NEW |