summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/WriteBarrier.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/runtime/WriteBarrier.h')
-rw-r--r--Source/JavaScriptCore/runtime/WriteBarrier.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/runtime/WriteBarrier.h b/Source/JavaScriptCore/runtime/WriteBarrier.h
index 6ac52b7c7..7e9db12fb 100644
--- a/Source/JavaScriptCore/runtime/WriteBarrier.h
+++ b/Source/JavaScriptCore/runtime/WriteBarrier.h
@@ -26,6 +26,7 @@
#ifndef WriteBarrier_h
#define WriteBarrier_h
+#include "GCAssertions.h"
#include "HandleTypes.h"
#include "Heap.h"
#include "SamplingCounter.h"
@@ -73,6 +74,13 @@ public:
validateCell(value);
setEarlyValue(globalData, owner, value);
}
+
+ // This is meant to be used like operator=, but is called copyFrom instead, in
+ // order to kindly inform the C++ compiler that its advice is not appreciated.
+ void copyFrom(const WriteBarrierBase<T>& other)
+ {
+ m_cell = other.m_cell;
+ }
void setMayBeNull(JSGlobalData& globalData, const JSCell* owner, T* value)
{