Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::Serializer::WritingObjectScope Class Reference
Inheritance diagram for dart::Serializer::WritingObjectScope:
dart::ValueObject

Public Member Functions

 WritingObjectScope (Serializer *serializer, const char *type, ObjectPtr object, StringPtr name)
 
 WritingObjectScope (Serializer *serializer, const char *type, ObjectPtr object, const char *name)
 
 WritingObjectScope (Serializer *serializer, const V8SnapshotProfileWriter::ObjectId &id, ObjectPtr object=nullptr)
 
 WritingObjectScope (Serializer *serializer, ObjectPtr object)
 
 ~WritingObjectScope ()
 

Detailed Description

Definition at line 361 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ WritingObjectScope() [1/4]

dart::Serializer::WritingObjectScope::WritingObjectScope ( Serializer serializer,
const char *  type,
ObjectPtr  object,
StringPtr  name 
)
inline

Definition at line 363 of file app_snapshot.cc.

368 serializer,
369 ReserveId(serializer,
370 type,
371 object,
372 String::ToCString(serializer->thread(), name)),
373 object) {}
GLenum type
virtual const char * ToCString() const
Definition: object.h:366
WritingObjectScope(Serializer *serializer, const char *type, ObjectPtr object, StringPtr name)
const char *const name

◆ WritingObjectScope() [2/4]

dart::Serializer::WritingObjectScope::WritingObjectScope ( Serializer serializer,
const char *  type,
ObjectPtr  object,
const char *  name 
)
inline

Definition at line 375 of file app_snapshot.cc.

379 : WritingObjectScope(serializer,
380 ReserveId(serializer, type, object, name),
381 object) {}

◆ WritingObjectScope() [3/4]

dart::Serializer::WritingObjectScope::WritingObjectScope ( Serializer serializer,
const V8SnapshotProfileWriter::ObjectId id,
ObjectPtr  object = nullptr 
)

Definition at line 7572 of file app_snapshot.cc.

7576 : serializer_(serializer),
7577 old_object_(serializer->object_currently_writing_.object_),
7578 old_id_(serializer->object_currently_writing_.id_),
7579 old_cid_(serializer->object_currently_writing_.cid_) {
7580 if (serializer_->profile_writer_ == nullptr) return;
7581 // The ID should correspond to one already added appropriately to the
7582 // profile writer.
7583 ASSERT(serializer_->profile_writer_->HasId(id));
7584 serializer_->FlushProfile();
7585 serializer_->object_currently_writing_.object_ = object;
7586 serializer_->object_currently_writing_.id_ = id;
7587 serializer_->object_currently_writing_.cid_ =
7588 object == nullptr ? -1 : object->GetClassIdMayBeSmi();
7589}
bool HasId(const ObjectId &object_id)
#define ASSERT(E)
const uintptr_t id

◆ WritingObjectScope() [4/4]

dart::Serializer::WritingObjectScope::WritingObjectScope ( Serializer serializer,
ObjectPtr  object 
)
inline

Definition at line 387 of file app_snapshot.cc.

388 : WritingObjectScope(serializer,
389 serializer->GetProfileId(object),
390 object) {}

◆ ~WritingObjectScope()

dart::Serializer::WritingObjectScope::~WritingObjectScope ( )

Definition at line 7591 of file app_snapshot.cc.

7591 {
7592 if (serializer_->profile_writer_ == nullptr) return;
7593 serializer_->FlushProfile();
7594 serializer_->object_currently_writing_.object_ = old_object_;
7595 serializer_->object_currently_writing_.id_ = old_id_;
7596 serializer_->object_currently_writing_.cid_ = old_cid_;
7597}

The documentation for this class was generated from the following file: