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

Side by Side Diff: src/profiler/heap-snapshot-generator.cc

Issue 2741683004: [rename] Rename internal field to embedder field. (Closed)
Patch Set: Remove API changes Created 3 years, 9 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/profiler/heap-snapshot-generator.h" 5 #include "src/profiler/heap-snapshot-generator.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1637 matching lines...) Expand 10 before | Expand all | Expand 10 after
1648 DCHECK(k->IsNumber()); 1648 DCHECK(k->IsNumber());
1649 uint32_t index = static_cast<uint32_t>(k->Number()); 1649 uint32_t index = static_cast<uint32_t>(k->Number());
1650 SetElementReference(js_obj, entry, index, dictionary->ValueAt(i)); 1650 SetElementReference(js_obj, entry, index, dictionary->ValueAt(i));
1651 } 1651 }
1652 } 1652 }
1653 } 1653 }
1654 } 1654 }
1655 1655
1656 1656
1657 void V8HeapExplorer::ExtractInternalReferences(JSObject* js_obj, int entry) { 1657 void V8HeapExplorer::ExtractInternalReferences(JSObject* js_obj, int entry) {
1658 int length = js_obj->GetInternalFieldCount(); 1658 int length = js_obj->GetEmbedderFieldCount();
1659 for (int i = 0; i < length; ++i) { 1659 for (int i = 0; i < length; ++i) {
1660 Object* o = js_obj->GetInternalField(i); 1660 Object* o = js_obj->GetEmbedderField(i);
1661 SetInternalReference( 1661 SetInternalReference(js_obj, entry, i, o,
1662 js_obj, entry, i, o, js_obj->GetInternalFieldOffset(i)); 1662 js_obj->GetEmbedderFieldOffset(i));
1663 } 1663 }
1664 } 1664 }
1665 1665
1666 1666
1667 String* V8HeapExplorer::GetConstructorName(JSObject* object) { 1667 String* V8HeapExplorer::GetConstructorName(JSObject* object) {
1668 Isolate* isolate = object->GetIsolate(); 1668 Isolate* isolate = object->GetIsolate();
1669 if (object->IsJSFunction()) return isolate->heap()->closure_string(); 1669 if (object->IsJSFunction()) return isolate->heap()->closure_string();
1670 DisallowHeapAllocation no_gc; 1670 DisallowHeapAllocation no_gc;
1671 HandleScope scope(isolate); 1671 HandleScope scope(isolate);
1672 return *JSReceiver::GetConstructorName(handle(object, isolate)); 1672 return *JSReceiver::GetConstructorName(handle(object, isolate));
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
3127 for (int i = 1; i < sorted_strings.length(); ++i) { 3127 for (int i = 1; i < sorted_strings.length(); ++i) {
3128 writer_->AddCharacter(','); 3128 writer_->AddCharacter(',');
3129 SerializeString(sorted_strings[i]); 3129 SerializeString(sorted_strings[i]);
3130 if (writer_->aborted()) return; 3130 if (writer_->aborted()) return;
3131 } 3131 }
3132 } 3132 }
3133 3133
3134 3134
3135 } // namespace internal 3135 } // namespace internal
3136 } // namespace v8 3136 } // namespace v8
OLDNEW
« src/objects.h ('K') | « src/objects-printer.cc ('k') | src/runtime/runtime-i18n.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698