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

Side by Side Diff: src/bootstrapper.cc

Issue 898663005: Add a flag to track detached contexts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « include/v8.h ('k') | src/flag-definitions.h » ('j') | 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 JSObject::MigrateToMap(object, new_map); 366 JSObject::MigrateToMap(object, new_map);
367 } 367 }
368 368
369 369
370 void Bootstrapper::DetachGlobal(Handle<Context> env) { 370 void Bootstrapper::DetachGlobal(Handle<Context> env) {
371 Factory* factory = env->GetIsolate()->factory(); 371 Factory* factory = env->GetIsolate()->factory();
372 Handle<JSGlobalProxy> global_proxy(JSGlobalProxy::cast(env->global_proxy())); 372 Handle<JSGlobalProxy> global_proxy(JSGlobalProxy::cast(env->global_proxy()));
373 global_proxy->set_native_context(*factory->null_value()); 373 global_proxy->set_native_context(*factory->null_value());
374 SetObjectPrototype(global_proxy, factory->null_value()); 374 SetObjectPrototype(global_proxy, factory->null_value());
375 global_proxy->map()->set_constructor(*factory->null_value()); 375 global_proxy->map()->set_constructor(*factory->null_value());
376 if (FLAG_track_detached_contexts) {
377 env->GetIsolate()->AddDetachedContext(env);
378 }
376 } 379 }
377 380
378 381
379 static Handle<JSFunction> InstallFunction(Handle<JSObject> target, 382 static Handle<JSFunction> InstallFunction(Handle<JSObject> target,
380 const char* name, 383 const char* name,
381 InstanceType type, 384 InstanceType type,
382 int instance_size, 385 int instance_size,
383 MaybeHandle<JSObject> maybe_prototype, 386 MaybeHandle<JSObject> maybe_prototype,
384 Builtins::Name call) { 387 Builtins::Name call) {
385 Isolate* isolate = target->GetIsolate(); 388 Isolate* isolate = target->GetIsolate();
(...skipping 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after
2879 return from + sizeof(NestingCounterType); 2882 return from + sizeof(NestingCounterType);
2880 } 2883 }
2881 2884
2882 2885
2883 // Called when the top-level V8 mutex is destroyed. 2886 // Called when the top-level V8 mutex is destroyed.
2884 void Bootstrapper::FreeThreadResources() { 2887 void Bootstrapper::FreeThreadResources() {
2885 DCHECK(!IsActive()); 2888 DCHECK(!IsActive());
2886 } 2889 }
2887 2890
2888 } } // namespace v8::internal 2891 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698