Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Fleece/Core/Doc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ namespace fleece { namespace impl {
if (!_unregistered.test_and_set()) { // this is atomic
#if DEBUG
// Assert that the data hasn't been changed since I was created:
if (!_dontValidate && _data.size < 1e6 && _data.hash() != _dataHash)
if (_data.size < 1e6 && _data.hash() != _dataHash)
FleeceException::_throw(InternalError,
"Memory range (%p .. %p) was altered while Scope %p (sk=%p) was active. "
"This usually means the Scope's data was freed/invalidated before the Scope "
Expand Down
8 changes: 0 additions & 8 deletions Fleece/Core/Doc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ namespace fleece { namespace impl {
slice data() const FLPURE {return _data;}
alloc_slice allocedData() const FLPURE {return _alloced;}

void dontValidate() {
#if DEBUG
// c.f. FleeceCursor::resetScope where we ask to skip validation.
_dontValidate = true;
#endif
}

SharedKeys* sharedKeys() const FLPURE {return _sk;}
slice externDestination() const FLPURE {return _externDestination;}

Expand Down Expand Up @@ -85,7 +78,6 @@ namespace fleece { namespace impl {
std::atomic_flag _unregistered ATOMIC_FLAG_INIT; // False if registered in sMemoryMap
#if DEBUG
uint32_t _dataHash; // hash of _data, for troubleshooting
bool _dontValidate{false}; // the check on the hash can be omitted
#endif
protected:
bool _isDoc {false}; // True if I am a field of a Doc
Expand Down
Loading