| 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 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2204 STATIC_ASCII_VECTOR("stackTraceLimit")); | 2204 STATIC_ASCII_VECTOR("stackTraceLimit")); |
| 2205 Handle<Smi> stack_trace_limit( | 2205 Handle<Smi> stack_trace_limit( |
| 2206 Smi::FromInt(FLAG_stack_trace_limit), isolate); | 2206 Smi::FromInt(FLAG_stack_trace_limit), isolate); |
| 2207 RETURN_ON_EXCEPTION_VALUE( | 2207 RETURN_ON_EXCEPTION_VALUE( |
| 2208 isolate, | 2208 isolate, |
| 2209 JSObject::SetOwnPropertyIgnoreAttributes( | 2209 JSObject::SetOwnPropertyIgnoreAttributes( |
| 2210 Handle<JSObject>::cast(Error), name, stack_trace_limit, NONE), | 2210 Handle<JSObject>::cast(Error), name, stack_trace_limit, NONE), |
| 2211 false); | 2211 false); |
| 2212 } | 2212 } |
| 2213 | 2213 |
| 2214 // Expose the stack trace symbol to native JS. | |
| 2215 RETURN_ON_EXCEPTION_VALUE( | |
| 2216 isolate, | |
| 2217 JSObject::SetOwnPropertyIgnoreAttributes( | |
| 2218 handle(native_context->builtins(), isolate), | |
| 2219 factory->InternalizeOneByteString( | |
| 2220 STATIC_ASCII_VECTOR("stack_trace_symbol")), | |
| 2221 factory->stack_trace_symbol(), | |
| 2222 NONE), | |
| 2223 false); | |
| 2224 | |
| 2225 // Expose the debug global object in global if a name for it is specified. | 2214 // Expose the debug global object in global if a name for it is specified. |
| 2226 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { | 2215 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { |
| 2227 // If loading fails we just bail out without installing the | 2216 // If loading fails we just bail out without installing the |
| 2228 // debugger but without tanking the whole context. | 2217 // debugger but without tanking the whole context. |
| 2229 Debug* debug = isolate->debug(); | 2218 Debug* debug = isolate->debug(); |
| 2230 if (!debug->Load()) return true; | 2219 if (!debug->Load()) return true; |
| 2231 Handle<Context> debug_context = debug->debug_context(); | 2220 Handle<Context> debug_context = debug->debug_context(); |
| 2232 // Set the security token for the debugger context to the same as | 2221 // Set the security token for the debugger context to the same as |
| 2233 // the shell native context to allow calling between these (otherwise | 2222 // the shell native context to allow calling between these (otherwise |
| 2234 // exposing debug global object doesn't make much sense). | 2223 // exposing debug global object doesn't make much sense). |
| (...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2752 return from + sizeof(NestingCounterType); | 2741 return from + sizeof(NestingCounterType); |
| 2753 } | 2742 } |
| 2754 | 2743 |
| 2755 | 2744 |
| 2756 // Called when the top-level V8 mutex is destroyed. | 2745 // Called when the top-level V8 mutex is destroyed. |
| 2757 void Bootstrapper::FreeThreadResources() { | 2746 void Bootstrapper::FreeThreadResources() { |
| 2758 ASSERT(!IsActive()); | 2747 ASSERT(!IsActive()); |
| 2759 } | 2748 } |
| 2760 | 2749 |
| 2761 } } // namespace v8::internal | 2750 } } // namespace v8::internal |
| OLD | NEW |