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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 new_map->set_prototype(*proto); | 348 new_map->set_prototype(*proto); |
349 JSObject::MigrateToMap(object, new_map); | 349 JSObject::MigrateToMap(object, new_map); |
350 } | 350 } |
351 | 351 |
352 | 352 |
353 void Bootstrapper::DetachGlobal(Handle<Context> env) { | 353 void Bootstrapper::DetachGlobal(Handle<Context> env) { |
354 Factory* factory = env->GetIsolate()->factory(); | 354 Factory* factory = env->GetIsolate()->factory(); |
355 Handle<JSGlobalProxy> global_proxy(JSGlobalProxy::cast(env->global_proxy())); | 355 Handle<JSGlobalProxy> global_proxy(JSGlobalProxy::cast(env->global_proxy())); |
356 global_proxy->set_native_context(*factory->null_value()); | 356 global_proxy->set_native_context(*factory->null_value()); |
357 SetObjectPrototype(global_proxy, factory->null_value()); | 357 SetObjectPrototype(global_proxy, factory->null_value()); |
| 358 global_proxy->map()->set_constructor(*factory->null_value()); |
358 } | 359 } |
359 | 360 |
360 | 361 |
361 static Handle<JSFunction> InstallFunction(Handle<JSObject> target, | 362 static Handle<JSFunction> InstallFunction(Handle<JSObject> target, |
362 const char* name, | 363 const char* name, |
363 InstanceType type, | 364 InstanceType type, |
364 int instance_size, | 365 int instance_size, |
365 MaybeHandle<JSObject> maybe_prototype, | 366 MaybeHandle<JSObject> maybe_prototype, |
366 Builtins::Name call) { | 367 Builtins::Name call) { |
367 Isolate* isolate = target->GetIsolate(); | 368 Isolate* isolate = target->GetIsolate(); |
(...skipping 2324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2692 return from + sizeof(NestingCounterType); | 2693 return from + sizeof(NestingCounterType); |
2693 } | 2694 } |
2694 | 2695 |
2695 | 2696 |
2696 // Called when the top-level V8 mutex is destroyed. | 2697 // Called when the top-level V8 mutex is destroyed. |
2697 void Bootstrapper::FreeThreadResources() { | 2698 void Bootstrapper::FreeThreadResources() { |
2698 ASSERT(!IsActive()); | 2699 ASSERT(!IsActive()); |
2699 } | 2700 } |
2700 | 2701 |
2701 } } // namespace v8::internal | 2702 } } // namespace v8::internal |
OLD | NEW |