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

Unified Diff: src/objects-body-descriptors-inl.h

Issue 2799943002: Handle ExternalStrings directly in the serializer without ObjectVisitor. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/objects-body-descriptors-inl.h
diff --git a/src/objects-body-descriptors-inl.h b/src/objects-body-descriptors-inl.h
index c4428a44f83d78c1ed74e97a15e376588de706e8..3f54f6f690cdb85f929d586563ec24ffd9130ee9 100644
--- a/src/objects-body-descriptors-inl.h
+++ b/src/objects-body-descriptors-inl.h
@@ -354,16 +354,10 @@ class ExternalOneByteString::BodyDescriptor final : public BodyDescriptorBase {
template <typename ObjectVisitor>
static inline void IterateBody(HeapObject* obj, int object_size,
ObjectVisitor* v) {
- typedef v8::String::ExternalOneByteStringResource Resource;
- v->VisitExternalOneByteString(reinterpret_cast<Resource**>(
- HeapObject::RawField(obj, kResourceOffset)));
}
template <typename StaticVisitor>
static inline void IterateBody(HeapObject* obj, int object_size) {
- typedef v8::String::ExternalOneByteStringResource Resource;
- StaticVisitor::VisitExternalOneByteString(reinterpret_cast<Resource**>(
- HeapObject::RawField(obj, kResourceOffset)));
}
static inline int SizeOf(Map* map, HeapObject* object) { return kSize; }
@@ -376,16 +370,10 @@ class ExternalTwoByteString::BodyDescriptor final : public BodyDescriptorBase {
template <typename ObjectVisitor>
static inline void IterateBody(HeapObject* obj, int object_size,
ObjectVisitor* v) {
- typedef v8::String::ExternalStringResource Resource;
- v->VisitExternalTwoByteString(reinterpret_cast<Resource**>(
- HeapObject::RawField(obj, kResourceOffset)));
}
template <typename StaticVisitor>
static inline void IterateBody(HeapObject* obj, int object_size) {
- typedef v8::String::ExternalStringResource Resource;
- StaticVisitor::VisitExternalTwoByteString(reinterpret_cast<Resource**>(
- HeapObject::RawField(obj, kResourceOffset)));
}
static inline int SizeOf(Map* map, HeapObject* object) { return kSize; }
« no previous file with comments | « src/objects.h ('k') | src/snapshot/serializer.h » ('j') | src/snapshot/serializer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698