XObject::host_object -> XObject::is_host_object
This commit is contained in:
@@ -380,7 +380,7 @@ void KernelState::TerminateTitle(bool from_guest_thread) {
|
|||||||
for (int i = 0; i < user_modules_.size(); i++) {
|
for (int i = 0; i < user_modules_.size(); i++) {
|
||||||
X_STATUS status = user_modules_[i]->Unload();
|
X_STATUS status = user_modules_[i]->Unload();
|
||||||
assert_true(XSUCCEEDED(status));
|
assert_true(XSUCCEEDED(status));
|
||||||
|
|
||||||
object_table_.RemoveHandle(user_modules_[i]->handle());
|
object_table_.RemoveHandle(user_modules_[i]->handle());
|
||||||
}
|
}
|
||||||
user_modules_.clear();
|
user_modules_.clear();
|
||||||
@@ -610,7 +610,7 @@ bool KernelState::Save(ByteStream* stream) {
|
|||||||
auto prev_offset = stream->offset();
|
auto prev_offset = stream->offset();
|
||||||
|
|
||||||
stream->Write((uint32_t)object->type());
|
stream->Write((uint32_t)object->type());
|
||||||
if (!object->host_object() && !object->Save(stream)) {
|
if (!object->is_host_object() && !object->Save(stream)) {
|
||||||
// Revert backwards and overwrite if a save failed.
|
// Revert backwards and overwrite if a save failed.
|
||||||
stream->set_offset(prev_offset);
|
stream->set_offset(prev_offset);
|
||||||
num_objects--;
|
num_objects--;
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ void ObjectTable::PurgeAllObjects() {
|
|||||||
auto lock = global_critical_region_.Acquire();
|
auto lock = global_critical_region_.Acquire();
|
||||||
for (uint32_t slot = 0; slot < table_capacity_; slot++) {
|
for (uint32_t slot = 0; slot < table_capacity_; slot++) {
|
||||||
auto& entry = table_[slot];
|
auto& entry = table_[slot];
|
||||||
if (entry.object && !entry.object->host_object()) {
|
if (entry.object && !entry.object->is_host_object()) {
|
||||||
entry.handle_ref_count = 0;
|
entry.handle_ref_count = 0;
|
||||||
entry.object->Release();
|
entry.object->Release();
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ class XObject {
|
|||||||
|
|
||||||
// Has this object been created for use by the host?
|
// Has this object been created for use by the host?
|
||||||
// Host objects are persisted through reloads/etc.
|
// Host objects are persisted through reloads/etc.
|
||||||
bool host_object() const { return host_object_; }
|
bool is_host_object() const { return host_object_; }
|
||||||
void set_host_object(bool host_object) { host_object_ = host_object; }
|
void set_host_object(bool host_object) { host_object_ = host_object; }
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
Reference in New Issue
Block a user