| Index: src/heap/heap-inl.h
|
| diff --git a/src/heap/heap-inl.h b/src/heap/heap-inl.h
|
| index f40ac5616d159a33c638cca024d96fdab971ab59..a3785d0a9a4cc14f42b0b31a556abebdd6f13aff 100644
|
| --- a/src/heap/heap-inl.h
|
| +++ b/src/heap/heap-inl.h
|
| @@ -323,6 +323,11 @@ void Heap::UpdateAllocationsHash(uint32_t value) {
|
| }
|
|
|
|
|
| +void Heap::RegisterExternalString(String* string) {
|
| + external_string_table_.AddString(string);
|
| +}
|
| +
|
| +
|
| void Heap::FinalizeExternalString(String* string) {
|
| DCHECK(string->IsExternalString());
|
| v8::String::ExternalStringResourceBase** resource_addr =
|
| @@ -608,7 +613,7 @@ Isolate* Heap::isolate() {
|
| CALL_AND_RETRY_OR_DIE(ISOLATE, FUNCTION_CALL, return, return)
|
|
|
|
|
| -void ExternalStringTable::AddString(String* string) {
|
| +void Heap::ExternalStringTable::AddString(String* string) {
|
| DCHECK(string->IsExternalString());
|
| if (heap_->InNewSpace(string)) {
|
| new_space_strings_.Add(string);
|
| @@ -618,7 +623,7 @@ void ExternalStringTable::AddString(String* string) {
|
| }
|
|
|
|
|
| -void ExternalStringTable::Iterate(ObjectVisitor* v) {
|
| +void Heap::ExternalStringTable::Iterate(ObjectVisitor* v) {
|
| if (!new_space_strings_.is_empty()) {
|
| Object** start = &new_space_strings_[0];
|
| v->VisitPointers(start, start + new_space_strings_.length());
|
| @@ -632,7 +637,7 @@ void ExternalStringTable::Iterate(ObjectVisitor* v) {
|
|
|
| // Verify() is inline to avoid ifdef-s around its calls in release
|
| // mode.
|
| -void ExternalStringTable::Verify() {
|
| +void Heap::ExternalStringTable::Verify() {
|
| #ifdef DEBUG
|
| for (int i = 0; i < new_space_strings_.length(); ++i) {
|
| Object* obj = Object::cast(new_space_strings_[i]);
|
| @@ -648,14 +653,14 @@ void ExternalStringTable::Verify() {
|
| }
|
|
|
|
|
| -void ExternalStringTable::AddOldString(String* string) {
|
| +void Heap::ExternalStringTable::AddOldString(String* string) {
|
| DCHECK(string->IsExternalString());
|
| DCHECK(!heap_->InNewSpace(string));
|
| old_space_strings_.Add(string);
|
| }
|
|
|
|
|
| -void ExternalStringTable::ShrinkNewStrings(int position) {
|
| +void Heap::ExternalStringTable::ShrinkNewStrings(int position) {
|
| new_space_strings_.Rewind(position);
|
| #ifdef VERIFY_HEAP
|
| if (FLAG_verify_heap) {
|
|
|