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

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

Issue 2741683004: [rename] Rename internal field to embedder field. (Closed)
Patch Set: [rename] Rename internal field to embedder field. 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
« no previous file with comments | « src/objects-printer.cc ('k') | src/runtime/runtime-i18n.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 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 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1655 DCHECK(k->IsNumber()); 1655 DCHECK(k->IsNumber());
1656 uint32_t index = static_cast<uint32_t>(k->Number()); 1656 uint32_t index = static_cast<uint32_t>(k->Number());
1657 SetElementReference(js_obj, entry, index, dictionary->ValueAt(i)); 1657 SetElementReference(js_obj, entry, index, dictionary->ValueAt(i));
1658 } 1658 }
1659 } 1659 }
1660 } 1660 }
1661 } 1661 }
1662 1662
1663 1663
1664 void V8HeapExplorer::ExtractInternalReferences(JSObject* js_obj, int entry) { 1664 void V8HeapExplorer::ExtractInternalReferences(JSObject* js_obj, int entry) {
1665 int length = js_obj->GetInternalFieldCount(); 1665 int length = js_obj->GetEmbedderFieldCount();
1666 for (int i = 0; i < length; ++i) { 1666 for (int i = 0; i < length; ++i) {
1667 Object* o = js_obj->GetInternalField(i); 1667 Object* o = js_obj->GetEmbedderField(i);
1668 SetInternalReference( 1668 SetInternalReference(js_obj, entry, i, o,
1669 js_obj, entry, i, o, js_obj->GetInternalFieldOffset(i)); 1669 js_obj->GetEmbedderFieldOffset(i));
1670 } 1670 }
1671 } 1671 }
1672 1672
1673 1673
1674 String* V8HeapExplorer::GetConstructorName(JSObject* object) { 1674 String* V8HeapExplorer::GetConstructorName(JSObject* object) {
1675 Isolate* isolate = object->GetIsolate(); 1675 Isolate* isolate = object->GetIsolate();
1676 if (object->IsJSFunction()) return isolate->heap()->closure_string(); 1676 if (object->IsJSFunction()) return isolate->heap()->closure_string();
1677 DisallowHeapAllocation no_gc; 1677 DisallowHeapAllocation no_gc;
1678 HandleScope scope(isolate); 1678 HandleScope scope(isolate);
1679 return *JSReceiver::GetConstructorName(handle(object, isolate)); 1679 return *JSReceiver::GetConstructorName(handle(object, isolate));
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
3134 for (int i = 1; i < sorted_strings.length(); ++i) { 3134 for (int i = 1; i < sorted_strings.length(); ++i) {
3135 writer_->AddCharacter(','); 3135 writer_->AddCharacter(',');
3136 SerializeString(sorted_strings[i]); 3136 SerializeString(sorted_strings[i]);
3137 if (writer_->aborted()) return; 3137 if (writer_->aborted()) return;
3138 } 3138 }
3139 } 3139 }
3140 3140
3141 3141
3142 } // namespace internal 3142 } // namespace internal
3143 } // namespace v8 3143 } // namespace v8
OLDNEW
« no previous file with comments | « 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