wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
https://bugs.webkit.org/show_bug.cgi?id=192728
<rdar://problem/46746779>
Reviewed by Geoff Garen.
Source/JavaScriptCore:
* API/*:
* Scripts/*:
* assembler/*:
* b3/*:
* bytecode/*:
* bytecompiler/*:
* debugger/*:
* dfg/*:
* ftl/*:
* heap/*:
* inspector/*:
* jit/*:
* llint/*:
* parser/*:
* runtime/*:
* tools/*:
* wasm/*:
* yarr/*:
Source/WebCore:
* Modules/*:
* animation/*:
* bindings/*:
* crypto/*:
* css/*:
* dom/*:
* editing/*:
* fileapi/*:
* html/*:
* inspector/*:
* layout/*:
* loader/*:
* mathml/*:
* page/*:
* platform/*:
* plugins/*:
* rendering/*:
* testing/*:
* workers/*:
* xml/*:
Source/WebCore/PAL:
* pal/*:
Source/WebDriver:
* :
Source/WebKit:
* NetworkProcess/*:
* Platform/*:
* Scripts/*:
* Shared/*:
* UIProcess/*:
* WebProcess/*:
Source/WebKitLegacy/mac:
* DOM/*:
* Plugins/*:
* WebCoreSupport/*:
* WebView/*:
Source/WebKitLegacy/win:
* Plugins/*:
* WebCoreSupport/*:
Source/WTF:
Update optional's move-constructor and move-assignment operator to disengage the value being moved from.
Rename to optional to Optional, make_optional() to makeOptional(), and move class from std to WTF namespace.
Based on patch by David Kilzer.
* wtf/*:
Tools:
* DumpRenderTree/*:
* MiniBrowser/*:
* TestRunnerShared/*:
* TestWebKitAPI/*:
* WebGPUAPIStructure/*:
* WebKitTestRunner/*:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@239427 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/wasm/WasmTable.h b/Source/JavaScriptCore/wasm/WasmTable.h
index 2f5483c..7e30041 100644
--- a/Source/JavaScriptCore/wasm/WasmTable.h
+++ b/Source/JavaScriptCore/wasm/WasmTable.h
@@ -40,13 +40,13 @@
class Table : public ThreadSafeRefCounted<Table> {
public:
- static RefPtr<Table> tryCreate(uint32_t initial, std::optional<uint32_t> maximum);
+ static RefPtr<Table> tryCreate(uint32_t initial, Optional<uint32_t> maximum);
JS_EXPORT_PRIVATE ~Table();
- std::optional<uint32_t> maximum() const { return m_maximum; }
+ Optional<uint32_t> maximum() const { return m_maximum; }
uint32_t length() const { return m_length; }
- std::optional<uint32_t> grow(uint32_t delta) WARN_UNUSED_RETURN;
+ Optional<uint32_t> grow(uint32_t delta) WARN_UNUSED_RETURN;
void clearFunction(uint32_t);
void setFunction(uint32_t, WasmToWasmImportableFunction, Instance*);
@@ -60,7 +60,7 @@
static bool isValidLength(uint32_t length) { return length < maxTableEntries; }
private:
- Table(uint32_t initial, std::optional<uint32_t> maximum);
+ Table(uint32_t initial, Optional<uint32_t> maximum);
void setLength(uint32_t);
@@ -69,7 +69,7 @@
MallocPtr<Instance*> m_instances;
uint32_t m_length;
uint32_t m_mask;
- std::optional<uint32_t> m_maximum;
+ Optional<uint32_t> m_maximum;
};
} } // namespace JSC::Wasm