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

Side by Side Diff: src/api.cc

Issue 1358703003: Changed scavenge GC to collect unmodified references (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Checks if the object is not active inaddition to unmodified before reclaiming it. The browser test … Created 5 years, 2 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 7511 matching lines...) Expand 10 before | Expand all | Expand 10 after
7522 void Isolate::VisitHandlesForPartialDependence( 7522 void Isolate::VisitHandlesForPartialDependence(
7523 PersistentHandleVisitor* visitor) { 7523 PersistentHandleVisitor* visitor) {
7524 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); 7524 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7525 i::DisallowHeapAllocation no_allocation; 7525 i::DisallowHeapAllocation no_allocation;
7526 VisitorAdapter visitor_adapter(visitor); 7526 VisitorAdapter visitor_adapter(visitor);
7527 isolate->global_handles()->IterateAllRootsInNewSpaceWithClassIds( 7527 isolate->global_handles()->IterateAllRootsInNewSpaceWithClassIds(
7528 &visitor_adapter); 7528 &visitor_adapter);
7529 } 7529 }
7530 7530
7531 7531
7532 void Isolate::VisitWeakHandles(PersistentHandleVisitor* visitor) {
7533 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
7534 i::DisallowHeapAllocation no_allocation;
7535 VisitorAdapter visitor_adapter(visitor);
7536 isolate->global_handles()->IterateWeakRootsInNewSpaceWithClassIds(
7537 &visitor_adapter);
7538 }
7539
7540
7532 String::Utf8Value::Utf8Value(v8::Local<v8::Value> obj) 7541 String::Utf8Value::Utf8Value(v8::Local<v8::Value> obj)
7533 : str_(NULL), length_(0) { 7542 : str_(NULL), length_(0) {
7534 if (obj.IsEmpty()) return; 7543 if (obj.IsEmpty()) return;
7535 i::Isolate* isolate = i::Isolate::Current(); 7544 i::Isolate* isolate = i::Isolate::Current();
7536 Isolate* v8_isolate = reinterpret_cast<Isolate*>(isolate); 7545 Isolate* v8_isolate = reinterpret_cast<Isolate*>(isolate);
7537 ENTER_V8(isolate); 7546 ENTER_V8(isolate);
7538 i::HandleScope scope(isolate); 7547 i::HandleScope scope(isolate);
7539 Local<Context> context = v8_isolate->GetCurrentContext(); 7548 Local<Context> context = v8_isolate->GetCurrentContext();
7540 TryCatch try_catch(v8_isolate); 7549 TryCatch try_catch(v8_isolate);
7541 Local<String> str; 7550 Local<String> str;
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
8389 Address callback_address = 8398 Address callback_address =
8390 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8399 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8391 VMState<EXTERNAL> state(isolate); 8400 VMState<EXTERNAL> state(isolate);
8392 ExternalCallbackScope call_scope(isolate, callback_address); 8401 ExternalCallbackScope call_scope(isolate, callback_address);
8393 callback(info); 8402 callback(info);
8394 } 8403 }
8395 8404
8396 8405
8397 } // namespace internal 8406 } // namespace internal
8398 } // namespace v8 8407 } // namespace v8
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