Bug 1160138 P1 Update CacheStorage and Cache webidl to latest spec. r=ehsan
authorBen Kelly <ben@wanderview.com>
Tue, 05 May 2015 15:45:36 -0700
changeset 273861 4cf7a121e011ceceea23b095089753fbafc0f8f7
parent 273860 fdec95a4cc199c8e85f46a3bed37e4593467be23
child 273862 9c174e93d6203fc5097f0a754747dfaf056ae411
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1160138
milestone40.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 1160138 P1 Update CacheStorage and Cache webidl to latest spec. r=ehsan
dom/webidl/Cache.webidl
dom/webidl/CacheStorage.webidl
--- a/dom/webidl/Cache.webidl
+++ b/dom/webidl/Cache.webidl
@@ -8,37 +8,37 @@
  *
  */
 
 // https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache
 
 [Exposed=(Window,Worker),
  Func="mozilla::dom::cache::Cache::PrefEnabled"]
 interface Cache {
-[Throws]
-Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
-[Throws]
-Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
-[Throws]
-Promise<void> add(RequestInfo request);
-[Throws]
-Promise<void> addAll(sequence<RequestInfo> requests);
-[Throws]
-Promise<void> put(RequestInfo request, Response response);
-[Throws]
-Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
-[Throws]
-Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options);
+  [NewObject]
+  Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
+  [NewObject]
+  Promise<sequence<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
+  [NewObject]
+  Promise<void> add(RequestInfo request);
+  [NewObject]
+  Promise<void> addAll(sequence<RequestInfo> requests);
+  [NewObject]
+  Promise<void> put(RequestInfo request, Response response);
+  [NewObject]
+  Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options);
+  [NewObject]
+  Promise<sequence<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options);
 };
 
 dictionary CacheQueryOptions {
-boolean ignoreSearch = false;
-boolean ignoreMethod = false;
-boolean ignoreVary = false;
-DOMString cacheName;
+  boolean ignoreSearch = false;
+  boolean ignoreMethod = false;
+  boolean ignoreVary = false;
+  DOMString cacheName;
 };
 
 dictionary CacheBatchOperation {
-DOMString type;
-Request request;
-Response response;
-CacheQueryOptions options;
+  DOMString type;
+  Request request;
+  Response response;
+  CacheQueryOptions options;
 };
--- a/dom/webidl/CacheStorage.webidl
+++ b/dom/webidl/CacheStorage.webidl
@@ -8,19 +8,19 @@
  *
  */
 
 // https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache-storage
 
 [Exposed=(Window,Worker),
  Func="mozilla::dom::cache::CacheStorage::PrefEnabled"]
 interface CacheStorage {
-[Throws]
-Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
-[Throws]
-Promise<boolean> has(DOMString cacheName);
-[Throws]
-Promise<Cache> open(DOMString cacheName);
-[Throws]
-Promise<boolean> delete(DOMString cacheName);
-[Throws]
-Promise<sequence<DOMString>> keys();
+  [NewObject]
+  Promise<Response> match(RequestInfo request, optional CacheQueryOptions options);
+  [NewObject]
+  Promise<boolean> has(DOMString cacheName);
+  [NewObject]
+  Promise<Cache> open(DOMString cacheName);
+  [NewObject]
+  Promise<boolean> delete(DOMString cacheName);
+  [NewObject]
+  Promise<sequence<DOMString>> keys();
 };