| 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/utils/random-number-generator.h" | 9 #include "src/base/utils/random-number-generator.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2737 | 2737 |
| 2738 // Expose the stack trace symbol to native JS. | 2738 // Expose the stack trace symbol to native JS. |
| 2739 RETURN_ON_EXCEPTION_VALUE(isolate, | 2739 RETURN_ON_EXCEPTION_VALUE(isolate, |
| 2740 JSObject::SetOwnPropertyIgnoreAttributes( | 2740 JSObject::SetOwnPropertyIgnoreAttributes( |
| 2741 handle(native_context->builtins(), isolate), | 2741 handle(native_context->builtins(), isolate), |
| 2742 factory->InternalizeOneByteString( | 2742 factory->InternalizeOneByteString( |
| 2743 STATIC_CHAR_VECTOR("$stackTraceSymbol")), | 2743 STATIC_CHAR_VECTOR("$stackTraceSymbol")), |
| 2744 factory->stack_trace_symbol(), NONE), | 2744 factory->stack_trace_symbol(), NONE), |
| 2745 false); | 2745 false); |
| 2746 | 2746 |
| 2747 // Expose the internal error symbol to native JS |
| 2748 RETURN_ON_EXCEPTION_VALUE(isolate, |
| 2749 JSObject::SetOwnPropertyIgnoreAttributes( |
| 2750 handle(native_context->builtins(), isolate), |
| 2751 factory->InternalizeOneByteString( |
| 2752 STATIC_CHAR_VECTOR("$internalErrorSymbol")), |
| 2753 factory->internal_error_symbol(), NONE), |
| 2754 false); |
| 2755 |
| 2747 // Expose the debug global object in global if a name for it is specified. | 2756 // Expose the debug global object in global if a name for it is specified. |
| 2748 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { | 2757 if (FLAG_expose_debug_as != NULL && strlen(FLAG_expose_debug_as) != 0) { |
| 2749 // If loading fails we just bail out without installing the | 2758 // If loading fails we just bail out without installing the |
| 2750 // debugger but without tanking the whole context. | 2759 // debugger but without tanking the whole context. |
| 2751 Debug* debug = isolate->debug(); | 2760 Debug* debug = isolate->debug(); |
| 2752 if (!debug->Load()) return true; | 2761 if (!debug->Load()) return true; |
| 2753 Handle<Context> debug_context = debug->debug_context(); | 2762 Handle<Context> debug_context = debug->debug_context(); |
| 2754 // Set the security token for the debugger context to the same as | 2763 // Set the security token for the debugger context to the same as |
| 2755 // the shell native context to allow calling between these (otherwise | 2764 // the shell native context to allow calling between these (otherwise |
| 2756 // exposing debug global object doesn't make much sense). | 2765 // exposing debug global object doesn't make much sense). |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3253 } | 3262 } |
| 3254 | 3263 |
| 3255 | 3264 |
| 3256 // Called when the top-level V8 mutex is destroyed. | 3265 // Called when the top-level V8 mutex is destroyed. |
| 3257 void Bootstrapper::FreeThreadResources() { | 3266 void Bootstrapper::FreeThreadResources() { |
| 3258 DCHECK(!IsActive()); | 3267 DCHECK(!IsActive()); |
| 3259 } | 3268 } |
| 3260 | 3269 |
| 3261 } // namespace internal | 3270 } // namespace internal |
| 3262 } // namespace v8 | 3271 } // namespace v8 |
| OLD | NEW |