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

Side by Side Diff: src/heap-inl.h

Issue 8681007: Rolling back r10049 due to webkit failures. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/heap.cc ('k') | src/ia32/codegen-ia32.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 249
250 void Heap::FinalizeExternalString(String* string) { 250 void Heap::FinalizeExternalString(String* string) {
251 ASSERT(string->IsExternalString()); 251 ASSERT(string->IsExternalString());
252 v8::String::ExternalStringResourceBase** resource_addr = 252 v8::String::ExternalStringResourceBase** resource_addr =
253 reinterpret_cast<v8::String::ExternalStringResourceBase**>( 253 reinterpret_cast<v8::String::ExternalStringResourceBase**>(
254 reinterpret_cast<byte*>(string) + 254 reinterpret_cast<byte*>(string) +
255 ExternalString::kResourceOffset - 255 ExternalString::kResourceOffset -
256 kHeapObjectTag); 256 kHeapObjectTag);
257 257
258 // Clear pointer cache.
259 ExternalString::cast(string)->clear_data_cache();
260
258 // Dispose of the C++ object if it has not already been disposed. 261 // Dispose of the C++ object if it has not already been disposed.
259 if (*resource_addr != NULL) { 262 if (*resource_addr != NULL) {
260 (*resource_addr)->Dispose(); 263 (*resource_addr)->Dispose();
261 *resource_addr = NULL;
262 } 264 }
265
266 // Clear the resource pointer in the string.
267 *resource_addr = NULL;
263 } 268 }
264 269
265 270
266 MaybeObject* Heap::AllocateRawMap() { 271 MaybeObject* Heap::AllocateRawMap() {
267 #ifdef DEBUG 272 #ifdef DEBUG
268 isolate_->counters()->objs_since_last_full()->Increment(); 273 isolate_->counters()->objs_since_last_full()->Increment();
269 isolate_->counters()->objs_since_last_young()->Increment(); 274 isolate_->counters()->objs_since_last_young()->Increment();
270 #endif 275 #endif
271 MaybeObject* result = map_space_->AllocateRaw(Map::kSize); 276 MaybeObject* result = map_space_->AllocateRaw(Map::kSize);
272 if (result->IsFailure()) old_gen_exhausted_ = true; 277 if (result->IsFailure()) old_gen_exhausted_ = true;
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 706
702 707
703 Heap* _inline_get_heap_() { 708 Heap* _inline_get_heap_() {
704 return HEAP; 709 return HEAP;
705 } 710 }
706 711
707 712
708 } } // namespace v8::internal 713 } } // namespace v8::internal
709 714
710 #endif // V8_HEAP_INL_H_ 715 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698