Bug 971732. Hide the DeviceStorage interface object in cases when the corresponding navigator APIs are hidden. r=sicking
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 12 Jan 2015 11:52:20 -0500
changeset 249202 b2aff7ebf9b45444997a83d8aeccc3339897cb41
parent 249201 8e8ce6c0d19aca731410e3ef8b3810e2bfb2b799
child 249203 7e3abaf18602116c8f643a790f6e93c597010e35
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssicking
bugs971732
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 971732. Hide the DeviceStorage interface object in cases when the corresponding navigator APIs are hidden. r=sicking
dom/tests/mochitest/general/test_interfaces.html
dom/webidl/DeviceStorage.webidl
dom/webidl/DeviceStorageChangeEvent.webidl
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -335,19 +335,19 @@ var interfaceNamesInGlobalScope =
     "DeviceLightEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DeviceMotionEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DeviceOrientationEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DeviceProximityEvent",
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "DeviceStorage",
+    { name: "DeviceStorage", pref: "device.storage.enabled" },
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    "DeviceStorageChangeEvent",
+    { name: "DeviceStorageChangeEvent", pref: "device.storage.enabled" },
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "Document",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DocumentFragment",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     "DocumentType",
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "DOMConstructor", xbl: true},
--- a/dom/webidl/DeviceStorage.webidl
+++ b/dom/webidl/DeviceStorage.webidl
@@ -2,16 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 dictionary DeviceStorageEnumerationParameters {
   Date since;
 };
 
+[Pref="device.storage.enabled"]
 interface DeviceStorage : EventTarget {
   attribute EventHandler onchange;
 
   [Throws]
   DOMRequest? add(Blob? aBlob);
   [Throws]
   DOMRequest? addNamed(Blob? aBlob, DOMString aName);
 
--- a/dom/webidl/DeviceStorageChangeEvent.webidl
+++ b/dom/webidl/DeviceStorageChangeEvent.webidl
@@ -1,15 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/.
  */
 
-[Constructor(DOMString type, optional DeviceStorageChangeEventInit eventInitDict)]
+[Constructor(DOMString type, optional DeviceStorageChangeEventInit eventInitDict),
+ Pref="device.storage.enabled"]
 interface DeviceStorageChangeEvent : Event
 {
   readonly attribute DOMString? path;
   readonly attribute DOMString? reason;
 };
 
 dictionary DeviceStorageChangeEventInit : EventInit
 {