Changeset 207806 in webkit


Ignore:
Timestamp:
Oct 24, 2016 10:16:00 PM (7 years ago)
Author:
Chris Dumez
Message:

IDBDatabase.createObjectStore() should take a IDBObjectStoreParameters dictionary in parameter
https://bugs.webkit.org/show_bug.cgi?id=163916

Reviewed by Darin Adler.

Source/WebCore:

IDBDatabase.createObjectStore() should take a IDBObjectStoreParameters dictionary in parameter:

Align our IDL with the specification.

No new tests, no expected Web-exposed behavior change.

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::createObjectStore):

  • Modules/indexeddb/IDBDatabase.h:
  • Modules/indexeddb/IDBDatabase.idl:
  • Modules/indexeddb/IDBKeyPath.cpp:

(WebCore::IDBKeyPath::IDBKeyPath):

  • Modules/indexeddb/IDBKeyPath.h:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/IDBBindingUtilities.cpp:

(WebCore::idbKeyPathFromValue): Deleted.

  • bindings/js/IDBBindingUtilities.h:
  • bindings/js/JSIDBDatabaseCustom.cpp: Removed.
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateParametersCheck):
(GenerateConstructorDefinition):

  • dom/MessageEvent.cpp:

(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEvent::create):

  • dom/MessageEvent.h:
  • testing/TypeConversions.h:

(WebCore::TypeConversions::setTypeConversionsDictionary):

LayoutTests:

Rebaseline existing tests now that the exception messages differ slightly.

  • storage/indexeddb/create-object-store-options-expected.txt:
  • storage/indexeddb/create-object-store-options-private-expected.txt:
Location:
trunk
Files:
1 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r207805 r207806  
     12016-10-24  Chris Dumez  <cdumez@apple.com>
     2
     3        IDBDatabase.createObjectStore() should take a IDBObjectStoreParameters dictionary in parameter
     4        https://bugs.webkit.org/show_bug.cgi?id=163916
     5
     6        Reviewed by Darin Adler.
     7
     8        Rebaseline existing tests now that the exception messages differ slightly.
     9
     10        * storage/indexeddb/create-object-store-options-expected.txt:
     11        * storage/indexeddb/create-object-store-options-private-expected.txt:
     12
    1132016-10-24  Alex Christensen  <achristensen@webkit.org>
    214
  • trunk/LayoutTests/storage/indexeddb/create-object-store-options-expected.txt

    r195181 r207806  
    1616Expecting TypeError exception from db.createObjectStore('d', 'bar');
    1717PASS Exception was thrown.
    18 PASS db.createObjectStore('d', 'bar'); threw TypeError: Not an object.
     18PASS db.createObjectStore('d', 'bar'); threw TypeError: Type error
    1919Expecting TypeError exception from db.createObjectStore('e', false);
    2020PASS Exception was thrown.
    21 PASS db.createObjectStore('e', false); threw TypeError: Not an object.
     21PASS db.createObjectStore('e', false); threw TypeError: Type error
    2222trans.objectStore('b').put({'a': 0}, 0)
    2323trans.objectStore('a').get(0)
  • trunk/LayoutTests/storage/indexeddb/create-object-store-options-private-expected.txt

    r195247 r207806  
    1616Expecting TypeError exception from db.createObjectStore('d', 'bar');
    1717PASS Exception was thrown.
    18 PASS db.createObjectStore('d', 'bar'); threw TypeError: Not an object.
     18PASS db.createObjectStore('d', 'bar'); threw TypeError: Type error
    1919Expecting TypeError exception from db.createObjectStore('e', false);
    2020PASS Exception was thrown.
    21 PASS db.createObjectStore('e', false); threw TypeError: Not an object.
     21PASS db.createObjectStore('e', false); threw TypeError: Type error
    2222trans.objectStore('b').put({'a': 0}, 0)
    2323trans.objectStore('a').get(0)
  • trunk/Source/WebCore/CMakeLists.txt

    r207787 r207806  
    11471147    bindings/js/JSIDBCursorCustom.cpp
    11481148    bindings/js/JSIDBCursorWithValueCustom.cpp
    1149     bindings/js/JSIDBDatabaseCustom.cpp
    11501149    bindings/js/JSIDBIndexCustom.cpp
    11511150    bindings/js/JSIDBObjectStoreCustom.cpp
  • trunk/Source/WebCore/ChangeLog

    r207805 r207806  
     12016-10-24  Chris Dumez  <cdumez@apple.com>
     2
     3        IDBDatabase.createObjectStore() should take a IDBObjectStoreParameters dictionary in parameter
     4        https://bugs.webkit.org/show_bug.cgi?id=163916
     5
     6        Reviewed by Darin Adler.
     7
     8        IDBDatabase.createObjectStore() should take a IDBObjectStoreParameters dictionary in parameter:
     9        - https://www.w3.org/TR/IndexedDB/#idl-def-IDBDatabase
     10        - https://www.w3.org/TR/IndexedDB/#idl-def-IDBObjectStoreParameters
     11
     12        Align our IDL with the specification.
     13
     14        No new tests, no expected Web-exposed behavior change.
     15
     16        * Modules/indexeddb/IDBDatabase.cpp:
     17        (WebCore::IDBDatabase::createObjectStore):
     18        * Modules/indexeddb/IDBDatabase.h:
     19        * Modules/indexeddb/IDBDatabase.idl:
     20        * Modules/indexeddb/IDBKeyPath.cpp:
     21        (WebCore::IDBKeyPath::IDBKeyPath):
     22        * Modules/indexeddb/IDBKeyPath.h:
     23        * WebCore.xcodeproj/project.pbxproj:
     24        * bindings/js/IDBBindingUtilities.cpp:
     25        (WebCore::idbKeyPathFromValue): Deleted.
     26        * bindings/js/IDBBindingUtilities.h:
     27        * bindings/js/JSIDBDatabaseCustom.cpp: Removed.
     28        * bindings/scripts/CodeGeneratorJS.pm:
     29        (GenerateParametersCheck):
     30        (GenerateConstructorDefinition):
     31        * dom/MessageEvent.cpp:
     32        (WebCore::MessageEvent::MessageEvent):
     33        (WebCore::MessageEvent::create):
     34        * dom/MessageEvent.h:
     35        * testing/TypeConversions.h:
     36        (WebCore::TypeConversions::setTypeConversionsDictionary):
     37
    1382016-10-24  Alex Christensen  <achristensen@webkit.org>
    239
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.cpp

    r207761 r207806  
    131131}
    132132
    133 ExceptionOr<Ref<IDBObjectStore>> IDBDatabase::createObjectStore(const String&, const Dictionary&)
    134 {
    135     ASSERT_NOT_REACHED();
    136     return Exception { IDBDatabaseException::InvalidStateError };
    137 }
    138 
    139 ExceptionOr<Ref<IDBObjectStore>> IDBDatabase::createObjectStore(const String& name, const IDBKeyPath& keyPath, bool autoIncrement)
     133ExceptionOr<Ref<IDBObjectStore>> IDBDatabase::createObjectStore(const String& name, ObjectStoreParameters&& parameters)
    140134{
    141135    LOG(IndexedDB, "IDBDatabase::createObjectStore - (%s %s)", m_info.name().utf8().data(), name.utf8().data());
     
    153147        return Exception { IDBDatabaseException::ConstraintError, ASCIILiteral("Failed to execute 'createObjectStore' on 'IDBDatabase': An object store with the specified name already exists.") };
    154148
     149    IDBKeyPath keyPath(WTFMove(parameters.keyPath));
    155150    if (!keyPath.isNull() && !keyPath.isValid())
    156151        return Exception { IDBDatabaseException::SyntaxError, ASCIILiteral("Failed to execute 'createObjectStore' on 'IDBDatabase': The keyPath option is not a valid key path.") };
    157152
    158     if (autoIncrement && ((keyPath.type() == IDBKeyPath::Type::String && keyPath.string().isEmpty()) || keyPath.type() == IDBKeyPath::Type::Array))
     153    if (parameters.autoIncrement && ((keyPath.type() == IDBKeyPath::Type::String && keyPath.string().isEmpty()) || keyPath.type() == IDBKeyPath::Type::Array))
    159154        return Exception { IDBDatabaseException::InvalidAccessError, ASCIILiteral("Failed to execute 'createObjectStore' on 'IDBDatabase': The autoIncrement option was set but the keyPath option was empty or an array.") };
    160155
    161156    // Install the new ObjectStore into the connection's metadata.
    162     auto info = m_info.createNewObjectStore(name, keyPath, autoIncrement);
     157    auto info = m_info.createNewObjectStore(name, keyPath, parameters.autoIncrement);
    163158
    164159    // Create the actual IDBObjectStore from the transaction, which also schedules the operation server side.
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h

    r207761 r207806  
    3535#include "IDBConnectionToServer.h"
    3636#include "IDBDatabaseInfo.h"
     37#include "IDBKeyPath.h"
    3738
    3839namespace WebCore {
     
    5657    RefPtr<DOMStringList> objectStoreNames() const;
    5758
    58     ExceptionOr<Ref<IDBObjectStore>> createObjectStore(const String& name, const Dictionary&);
    59     ExceptionOr<Ref<IDBObjectStore>> createObjectStore(const String& name, const IDBKeyPath&, bool autoIncrement);
     59    struct ObjectStoreParameters {
     60        Optional<IDBKeyPathVariant> keyPath;
     61        bool autoIncrement;
     62    };
     63
     64    ExceptionOr<Ref<IDBObjectStore>> createObjectStore(const String& name, ObjectStoreParameters&&);
     65
    6066    ExceptionOr<Ref<IDBTransaction>> transaction(const Vector<String>&, const String& mode);
    6167    ExceptionOr<Ref<IDBTransaction>> transaction(const String&, const String& mode);
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl

    r206976 r207806  
    3535    readonly attribute DOMStringList objectStoreNames;
    3636
    37     [Custom, MayThrowException] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options);
     37    [MayThrowException] IDBObjectStore createObjectStore(DOMString name, optional IDBObjectStoreParameters parameters);
    3838    [MayThrowException] void deleteObjectStore(DOMString name);
    3939    [MayThrowException] IDBTransaction transaction(DOMString storeName, optional DOMString mode = "readonly");
     
    4848    attribute EventHandler onversionchange;
    4949};
     50
     51dictionary IDBObjectStoreParameters {
     52    (DOMString or sequence<DOMString>)? keyPath = null;
     53    boolean autoIncrement = false;
     54};
  • trunk/Source/WebCore/Modules/indexeddb/IDBKeyPath.cpp

    r202806 r207806  
    209209}
    210210
     211IDBKeyPath::IDBKeyPath(Optional<IDBKeyPathVariant>&& variant)
     212{
     213    if (!variant)
     214        return;
     215
     216    if (WTF::holds_alternative<String>(*variant)) {
     217        m_type = Type::String;
     218        m_string = WTFMove(WTF::get<String>(*variant));
     219    } else {
     220        m_type = Type::Array;
     221        m_array = WTFMove(WTF::get<Vector<String>>(*variant));
     222    }
     223}
     224
    211225bool IDBKeyPath::isValid() const
    212226{
  • trunk/Source/WebCore/Modules/indexeddb/IDBKeyPath.h

    r200699 r207806  
    2828#if ENABLE(INDEXED_DATABASE)
    2929
     30#include <wtf/Variant.h>
    3031#include <wtf/Vector.h>
    3132#include <wtf/text/WTFString.h>
    3233
    3334namespace WebCore {
     35
     36using IDBKeyPathVariant = WTF::Variant<String, Vector<String>>;
    3437
    3538class KeyedDecoder;
     
    4548void IDBParseKeyPath(const String&, Vector<String>&, IDBKeyPathParseError&);
    4649
     50// FIXME: We should be able to replace IDBKeyPath with IDBKeyPathVariant.
    4751class IDBKeyPath {
    4852public:
     
    5054    WEBCORE_EXPORT IDBKeyPath(const String&);
    5155    WEBCORE_EXPORT IDBKeyPath(const Vector<String>& array);
     56    WEBCORE_EXPORT IDBKeyPath(Optional<IDBKeyPathVariant>&&);
    5257
    5358    enum class Type { Null, String, Array };
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r207787 r207806  
    15481548                4150F9F112B6E0E70008C860 /* SliderThumbElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4150F9EF12B6E0E70008C860 /* SliderThumbElement.h */; };
    15491549                4150F9F212B6E0E70008C860 /* SliderThumbElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4150F9F012B6E0E70008C860 /* SliderThumbElement.cpp */; };
     1550                415670471DBE1533009AC3BB /* PeerConnectionStates.h in Headers */ = {isa = PBXBuildFile; fileRef = 415670461DBE1524009AC3BB /* PeerConnectionStates.h */; };
    15501551                4157AF8012F1FB0400A8C6F5 /* MediaControlsApple.h in Headers */ = {isa = PBXBuildFile; fileRef = 4157AF7E12F1FB0400A8C6F5 /* MediaControlsApple.h */; };
    15511552                4157AF8112F1FB0400A8C6F5 /* MediaControlsApple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4157AF7F12F1FB0400A8C6F5 /* MediaControlsApple.cpp */; };
    1552                 415670471DBE1533009AC3BB /* PeerConnectionStates.h in Headers */ = {isa = PBXBuildFile; fileRef = 415670461DBE1524009AC3BB /* PeerConnectionStates.h */; };
    15531553                41614A781DA6423B004AD06F /* HTTPHeaderValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41614A761DA64236004AD06F /* HTTPHeaderValues.cpp */; };
    15541554                41614A791DA64241004AD06F /* HTTPHeaderValues.h in Headers */ = {isa = PBXBuildFile; fileRef = 41614A771DA64236004AD06F /* HTTPHeaderValues.h */; };
     
    20022002                511EF2CA17F0FD3500E4FA16 /* JSIDBTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511EF2B417F0FC4800E4FA16 /* JSIDBTransaction.cpp */; };
    20032003                511EF2CB17F0FD3500E4FA16 /* JSIDBVersionChangeEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 269239911505E1AA009E57FC /* JSIDBVersionChangeEvent.cpp */; };
    2004                 511EF2D017F0FDF100E4FA16 /* JSIDBDatabaseCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511EF2CD17F0FDF100E4FA16 /* JSIDBDatabaseCustom.cpp */; };
    20052004                511EF2D117F0FDF100E4FA16 /* JSIDBObjectStoreCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511EF2CE17F0FDF100E4FA16 /* JSIDBObjectStoreCustom.cpp */; };
    20062005                5126E6BB0A2E3B12005C29FA /* IconDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5126E6B90A2E3B12005C29FA /* IconDatabase.cpp */; };
     
    85478546                4150F9EF12B6E0E70008C860 /* SliderThumbElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SliderThumbElement.h; sourceTree = "<group>"; };
    85488547                4150F9F012B6E0E70008C860 /* SliderThumbElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SliderThumbElement.cpp; sourceTree = "<group>"; };
     8548                415670461DBE1524009AC3BB /* PeerConnectionStates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PeerConnectionStates.h; sourceTree = "<group>"; };
    85498549                4157AF7E12F1FB0400A8C6F5 /* MediaControlsApple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaControlsApple.h; sourceTree = "<group>"; };
    85508550                4157AF7F12F1FB0400A8C6F5 /* MediaControlsApple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaControlsApple.cpp; sourceTree = "<group>"; };
    8551                 415670461DBE1524009AC3BB /* PeerConnectionStates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PeerConnectionStates.h; sourceTree = "<group>"; };
    85528551                41614A761DA64236004AD06F /* HTTPHeaderValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTTPHeaderValues.cpp; sourceTree = "<group>"; };
    85538552                41614A771DA64236004AD06F /* HTTPHeaderValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPHeaderValues.h; sourceTree = "<group>"; };
     
    90729071                511EF2B317F0FC4800E4FA16 /* JSIDBRequest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBRequest.cpp; sourceTree = "<group>"; };
    90739072                511EF2B417F0FC4800E4FA16 /* JSIDBTransaction.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBTransaction.cpp; sourceTree = "<group>"; };
    9074                 511EF2CD17F0FDF100E4FA16 /* JSIDBDatabaseCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBDatabaseCustom.cpp; sourceTree = "<group>"; };
    90759073                511EF2CE17F0FDF100E4FA16 /* JSIDBObjectStoreCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBObjectStoreCustom.cpp; sourceTree = "<group>"; };
    90769074                511FAEA91BDC989A00B4AFE4 /* ThreadSafeDataBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadSafeDataBuffer.h; sourceTree = "<group>"; };
     
    2162221620                                512BDB4C1C46B0FF006494DF /* JSIDBCursorCustom.cpp */,
    2162321621                                5141298D1C5FD7E90059E714 /* JSIDBCursorWithValueCustom.cpp */,
    21624                                 511EF2CD17F0FDF100E4FA16 /* JSIDBDatabaseCustom.cpp */,
    2162521622                                5141299A1C6C166D0059E714 /* JSIDBIndexCustom.cpp */,
    2162621623                                511EF2CE17F0FDF100E4FA16 /* JSIDBObjectStoreCustom.cpp */,
     
    2938729384                                5141298E1C5FD83A0059E714 /* JSIDBCursorWithValueCustom.cpp in Sources */,
    2938829385                                511EF2C317F0FD3500E4FA16 /* JSIDBDatabase.cpp in Sources */,
    29389                                 511EF2D017F0FDF100E4FA16 /* JSIDBDatabaseCustom.cpp in Sources */,
    2939029386                                511EF2C417F0FD3500E4FA16 /* JSIDBFactory.cpp in Sources */,
    2939129387                                511EF2C517F0FD3500E4FA16 /* JSIDBIndex.cpp in Sources */,
  • trunk/Source/WebCore/bindings/js/IDBBindingUtilities.cpp

    r207505 r207806  
    177177}
    178178
    179 IDBKeyPath idbKeyPathFromValue(ExecState& exec, JSValue keyPathValue)
    180 {
    181     IDBKeyPath keyPath;
    182     if (isJSArray(keyPathValue))
    183         keyPath = IDBKeyPath(convert<IDLSequence<IDLDOMString>>(exec, keyPathValue));
    184     else
    185         keyPath = IDBKeyPath(keyPathValue.toWTFString(&exec));
    186     return keyPath;
    187 }
    188 
    189179static JSValue getNthValueOnKeyPath(ExecState& exec, JSValue rootValue, const Vector<String>& keyPathElements, size_t index)
    190180{
  • trunk/Source/WebCore/bindings/js/IDBBindingUtilities.h

    r201665 r207806  
    4848class ThreadSafeDataBuffer;
    4949
    50 IDBKeyPath idbKeyPathFromValue(JSC::ExecState&, JSC::JSValue);
    5150JSC::JSValue toJS(JSC::ExecState&, JSDOMGlobalObject&, const IDBKeyPath&);
    5251
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r207768 r207806  
    44294429               $value = $shouldPassByReference ? "$name.releaseNonNull()" : "WTFMove($name)";
    44304430            } elsif ($codeGenerator->IsDictionaryType($type)) {
    4431                 $value = "${name}";
     4431                $value = "WTFMove($name)";
    44324432            }
    44334433        }
     
    58675867                if (ShouldPassWrapperByReference($parameter, $interface)) {
    58685868                    push(@constructorArgList, "*" . $parameter->name);
    5869                 } elsif ($codeGenerator->IsDictionaryType($parameter->type)) {
    5870                     push(@constructorArgList, $parameter->name);
    58715869                } else {
    58725870                    push(@constructorArgList, "WTFMove(" . $parameter->name . ")");
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp

    r207737 r207806  
    130130    auto eventInitDict = convert<IDLDictionary<TestEventConstructor::Init>>(*state, state->argument(1));
    131131    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
    132     auto object = TestEventConstructor::create(WTFMove(type), eventInitDict);
     132    auto object = TestEventConstructor::create(WTFMove(type), WTFMove(eventInitDict));
    133133    return JSValue::encode(toJSNewlyCreated(state, castedThis->globalObject(), WTFMove(object)));
    134134}
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r207766 r207806  
    81788178    auto init = convert<IDLDictionary<TestObj::Dictionary>>(*state, state->uncheckedArgument(0));
    81798179    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
    8180     impl.attachShadowRoot(init);
     8180    impl.attachShadowRoot(WTFMove(init));
    81818181    return JSValue::encode(jsUndefined());
    81828182}
     
    81988198    auto dict = convert<IDLDictionary<DictionaryImplName>>(*state, state->uncheckedArgument(0));
    81998199    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
    8200     impl.operationWithExternalDictionaryParameter(dict);
     8200    impl.operationWithExternalDictionaryParameter(WTFMove(dict));
    82018201    return JSValue::encode(jsUndefined());
    82028202}
  • trunk/Source/WebCore/dom/MessageEvent.cpp

    r207627 r207806  
    4242}
    4343
    44 inline MessageEvent::MessageEvent(ExecState& state, const AtomicString& type, Init& initializer, IsTrusted isTrusted)
     44inline MessageEvent::MessageEvent(ExecState& state, const AtomicString& type, Init&& initializer, IsTrusted isTrusted)
    4545    : Event(type, initializer, isTrusted)
    4646    , m_dataType(DataTypeScriptValue)
     
    127127}
    128128
    129 Ref<MessageEvent> MessageEvent::create(ExecState& state, const AtomicString& type, Init& initializer, IsTrusted isTrusted)
    130 {
    131     return adoptRef(*new MessageEvent(state, type, initializer, isTrusted));
     129Ref<MessageEvent> MessageEvent::create(ExecState& state, const AtomicString& type, Init&& initializer, IsTrusted isTrusted)
     130{
     131    return adoptRef(*new MessageEvent(state, type, WTFMove(initializer), isTrusted));
    132132}
    133133
  • trunk/Source/WebCore/dom/MessageEvent.h

    r207517 r207806  
    5757        Vector<RefPtr<MessagePort>> ports;
    5858    };
    59     static Ref<MessageEvent> create(JSC::ExecState&, const AtomicString& type, Init&, IsTrusted = IsTrusted::No);
     59    static Ref<MessageEvent> create(JSC::ExecState&, const AtomicString& type, Init&&, IsTrusted = IsTrusted::No);
    6060
    6161    virtual ~MessageEvent();
     
    9292private:
    9393    MessageEvent();
    94     MessageEvent(JSC::ExecState&, const AtomicString&, Init&, IsTrusted);
     94    MessageEvent(JSC::ExecState&, const AtomicString&, Init&&, IsTrusted);
    9595    MessageEvent(RefPtr<SerializedScriptValue>&& data, const String& origin, const String& lastEventId, Optional<MessageEventSource>&&, Vector<RefPtr<MessagePort>>&&);
    9696    MessageEvent(const AtomicString& type, RefPtr<SerializedScriptValue>&& data, const String& origin, const String& lastEventId);
  • trunk/Source/WebCore/testing/TypeConversions.h

    r207737 r207806  
    105105    void setTestUnion(const TestUnion& value) { m_union = value; }
    106106
    107     void setTypeConversionsDictionary(Dictionary& dictionary)
     107    void setTypeConversionsDictionary(Dictionary&& dictionary)
    108108    {
    109109        m_typeConversionsDictionaryLongValue = dictionary.longValue;
    110         m_typeConversionsDictionaryStringValue = dictionary.stringValue;
    111         m_typeConversionsDictionarySequenceValue = dictionary.sequenceValue;
    112         m_typeConversionsDictionaryUnionValue = dictionary.unionValue;
     110        m_typeConversionsDictionaryStringValue = WTFMove(dictionary.stringValue);
     111        m_typeConversionsDictionarySequenceValue = WTFMove(dictionary.sequenceValue);
     112        m_typeConversionsDictionaryUnionValue = WTFMove(dictionary.unionValue);
    113113    }
    114114
Note: See TracChangeset for help on using the changeset viewer.