From a7786da45b6bbc233c6af2d41bc9848072d1c7ad Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 4 Jul 2013 20:59:44 -0400 Subject: [PATCH] Backed out changeset 170e1863b9b6 (bug 890382) because of xpcshell test failures --- dom/indexedDB/IDBEvents.cpp | 2 +- dom/indexedDB/IDBEvents.h | 16 +--------------- .../test/unit/test_setVersion_events.js | 15 --------------- dom/webidl/IDBVersionChangeEvent.webidl | 15 ++++----------- 4 files changed, 6 insertions(+), 42 deletions(-) diff --git a/dom/indexedDB/IDBEvents.cpp b/dom/indexedDB/IDBEvents.cpp index 8a321072b7ea..4cd19aebc725 100644 --- a/dom/indexedDB/IDBEvents.cpp +++ b/dom/indexedDB/IDBEvents.cpp @@ -57,7 +57,7 @@ mozilla::dom::indexedDB::CreateGenericEvent(mozilla::dom::EventTarget* aOwner, } // static -already_AddRefed +already_AddRefed IDBVersionChangeEvent::CreateInternal(mozilla::dom::EventTarget* aOwner, const nsAString& aType, uint64_t aOldVersion, diff --git a/dom/indexedDB/IDBEvents.h b/dom/indexedDB/IDBEvents.h index fe838c9a7954..d2194b2405df 100644 --- a/dom/indexedDB/IDBEvents.h +++ b/dom/indexedDB/IDBEvents.h @@ -57,20 +57,6 @@ public: return mozilla::dom::IDBVersionChangeEventBinding::Wrap(aCx, aScope, this); } - static already_AddRefed - Constructor(const GlobalObject& aGlobal, - const NonNull& aType, - const IDBVersionChangeEventInit& aOptions, - ErrorResult& aRv) - { - uint64_t newVersion = 0; - if (!aOptions.mNewVersion.IsNull()) { - newVersion = aOptions.mNewVersion.Value(); - } - nsCOMPtr target = do_QueryInterface(aGlobal.Get()); - return CreateInternal(target, aType, aOptions.mOldVersion, newVersion); - } - uint64_t OldVersion() { return mOldVersion; @@ -140,7 +126,7 @@ protected: } virtual ~IDBVersionChangeEvent() { } - static already_AddRefed + static already_AddRefed CreateInternal(mozilla::dom::EventTarget* aOwner, const nsAString& aType, uint64_t aOldVersion, diff --git a/dom/indexedDB/test/unit/test_setVersion_events.js b/dom/indexedDB/test/unit/test_setVersion_events.js index 29a2089c0c63..26a531f32252 100644 --- a/dom/indexedDB/test/unit/test_setVersion_events.js +++ b/dom/indexedDB/test/unit/test_setVersion_events.js @@ -157,21 +157,6 @@ function testSteps() is(versionChangeEventCount, 3, "Saw all expected events"); - event = new IDBVersionChangeEvent("versionchange"); - ok(event, "Should be able to create an event with just passing in the type"); - event = new IDBVersionChangeEvent("versionchange", {oldVersion: 1}); - ok(event, "Should be able to create an event with just the old version"); - is(event.oldVersion, 1, "Correct old version"); - is(event.newVersion, null, "Correct new version"); - event = new IDBVersionChangeEvent("versionchange", {newVersion: 1}); - ok(event, "Should be able to create an event with just the new version"); - is(event.oldVersion, 0, "Correct old version"); - is(event.newVersion, 1, "Correct new version"); - event = new IDBVersionChangeEvent("versionchange", {oldVersion: 1, newVersion: 2}); - ok(event, "Should be able to create an event with both versions"); - is(event.oldVersion, 1, "Correct old version"); - is(event.newVersion, 2, "Correct new version"); - finishTest(); yield; } diff --git a/dom/webidl/IDBVersionChangeEvent.webidl b/dom/webidl/IDBVersionChangeEvent.webidl index 65612911b189..ea0e88be3d32 100644 --- a/dom/webidl/IDBVersionChangeEvent.webidl +++ b/dom/webidl/IDBVersionChangeEvent.webidl @@ -3,21 +3,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. * - * The origin of this IDL file is - * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBVersionChangeEvent + * IDBVersionChangeEvent is defined in: + * https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html * * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. */ -dictionary IDBVersionChangeEventInit : EventInit { - unsigned long long oldVersion = 0; - unsigned long long? newVersion = null; -}; - -[Constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict)] interface IDBVersionChangeEvent : Event { - readonly attribute unsigned long long oldVersion; - readonly attribute unsigned long long? newVersion; + readonly attribute unsigned long long oldVersion; + readonly attribute unsigned long long? newVersion; }; -