| 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 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2197 // debugger but without tanking the whole context. | 2197 // debugger but without tanking the whole context. |
| 2198 Debug* debug = isolate->debug(); | 2198 Debug* debug = isolate->debug(); |
| 2199 if (!debug->Load()) return true; | 2199 if (!debug->Load()) return true; |
| 2200 Handle<Context> debug_context = debug->debug_context(); | 2200 Handle<Context> debug_context = debug->debug_context(); |
| 2201 // Set the security token for the debugger context to the same as | 2201 // Set the security token for the debugger context to the same as |
| 2202 // the shell native context to allow calling between these (otherwise | 2202 // the shell native context to allow calling between these (otherwise |
| 2203 // exposing debug global object doesn't make much sense). | 2203 // exposing debug global object doesn't make much sense). |
| 2204 debug_context->set_security_token(native_context->security_token()); | 2204 debug_context->set_security_token(native_context->security_token()); |
| 2205 Handle<String> debug_string = | 2205 Handle<String> debug_string = |
| 2206 factory->InternalizeUtf8String(FLAG_expose_debug_as); | 2206 factory->InternalizeUtf8String(FLAG_expose_debug_as); |
| 2207 uint32_t index; |
| 2208 if (debug_string->AsArrayIndex(&index)) return true; |
| 2207 Handle<Object> global_proxy(debug_context->global_proxy(), isolate); | 2209 Handle<Object> global_proxy(debug_context->global_proxy(), isolate); |
| 2208 JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM); | 2210 JSObject::AddProperty(global, debug_string, global_proxy, DONT_ENUM); |
| 2209 } | 2211 } |
| 2210 return true; | 2212 return true; |
| 2211 } | 2213 } |
| 2212 | 2214 |
| 2213 | 2215 |
| 2214 static uint32_t Hash(RegisteredExtension* extension) { | 2216 static uint32_t Hash(RegisteredExtension* extension) { |
| 2215 return v8::internal::ComputePointerHash(extension); | 2217 return v8::internal::ComputePointerHash(extension); |
| 2216 } | 2218 } |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2691 return from + sizeof(NestingCounterType); | 2693 return from + sizeof(NestingCounterType); |
| 2692 } | 2694 } |
| 2693 | 2695 |
| 2694 | 2696 |
| 2695 // Called when the top-level V8 mutex is destroyed. | 2697 // Called when the top-level V8 mutex is destroyed. |
| 2696 void Bootstrapper::FreeThreadResources() { | 2698 void Bootstrapper::FreeThreadResources() { |
| 2697 DCHECK(!IsActive()); | 2699 DCHECK(!IsActive()); |
| 2698 } | 2700 } |
| 2699 | 2701 |
| 2700 } } // namespace v8::internal | 2702 } } // namespace v8::internal |
| OLD | NEW |