Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(373)

Side by Side Diff: src/bootstrapper.cc

Issue 397953009: Bootstrapper::DetachGlobal also need to unset global_proxy's constructor to remove all refs to cont… (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: modify copied map Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2686 return from + sizeof(NestingCounterType); 2687 return from + sizeof(NestingCounterType);
2687 } 2688 }
2688 2689
2689 2690
2690 // Called when the top-level V8 mutex is destroyed. 2691 // Called when the top-level V8 mutex is destroyed.
2691 void Bootstrapper::FreeThreadResources() { 2692 void Bootstrapper::FreeThreadResources() {
2692 ASSERT(!IsActive()); 2693 ASSERT(!IsActive());
2693 } 2694 }
2694 2695
2695 } } // namespace v8::internal 2696 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698