Bug 1257039: Remove the worker descriptor for FileReaderSync. r=bz
authorKyle Huey <khuey@kylehuey.com>
Wed, 16 Mar 2016 11:51:11 -0700
changeset 289012 b3fe306024110c537755504b86bc4a011b47baa9
parent 289011 464c92d0a8f5663403a5e05201eddfd8d9e11e7d
child 289013 06101225c145815ccedd49fb7d1eb4ff2f9596c7
push id73669
push userkhuey@mozilla.com
push dateWed, 16 Mar 2016 18:51:36 +0000
treeherdermozilla-inbound@06101225c145 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1257039
milestone48.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 1257039: Remove the worker descriptor for FileReaderSync. r=bz
dom/bindings/Bindings.conf
dom/workers/FileReaderSync.cpp
dom/workers/FileReaderSync.h
dom/workers/moz.build
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -500,17 +500,16 @@ DOMInterfaces = {
     'implicitJSContext': [ 'respondWith' ],
 },
 
 'FileReader': {
     'implicitJSContext': [ 'readAsArrayBuffer' ],
 },
 
 'FileReaderSync': {
-    'workers': True,
     'wrapperCache': False,
 },
 
 'FontFaceSet': {
     'implicitJSContext': [ 'load' ],
 },
 
 'FontFaceSetIterator': {
--- a/dom/workers/FileReaderSync.cpp
+++ b/dom/workers/FileReaderSync.cpp
@@ -22,17 +22,16 @@
 #include "nsIInputStream.h"
 #include "nsISeekableStream.h"
 #include "nsISupportsImpl.h"
 #include "nsNetUtil.h"
 #include "nsServiceManagerUtils.h"
 
 #include "RuntimeService.h"
 
-USING_WORKERS_NAMESPACE
 using namespace mozilla;
 using namespace mozilla::dom;
 using mozilla::dom::Optional;
 using mozilla::dom::GlobalObject;
 
 // static
 already_AddRefed<FileReaderSync>
 FileReaderSync::Constructor(const GlobalObject& aGlobal, ErrorResult& aRv)
@@ -42,17 +41,17 @@ FileReaderSync::Constructor(const Global
   return frs.forget();
 }
 
 bool
 FileReaderSync::WrapObject(JSContext* aCx,
                            JS::Handle<JSObject*> aGivenProto,
                            JS::MutableHandle<JSObject*> aReflector)
 {
-  return FileReaderSyncBinding_workers::Wrap(aCx, this, aGivenProto, aReflector);
+  return FileReaderSyncBinding::Wrap(aCx, this, aGivenProto, aReflector);
 }
 
 void
 FileReaderSync::ReadAsArrayBuffer(JSContext* aCx,
                                   JS::Handle<JSObject*> aScopeObj,
                                   Blob& aBlob,
                                   JS::MutableHandle<JSObject*> aRetval,
                                   ErrorResult& aRv)
--- a/dom/workers/FileReaderSync.h
+++ b/dom/workers/FileReaderSync.h
@@ -1,32 +1,28 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
-#ifndef mozilla_dom_workers_filereadersync_h__
-#define mozilla_dom_workers_filereadersync_h__
+#ifndef mozilla_dom_filereadersync_h__
+#define mozilla_dom_filereadersync_h__
 
 #include "Workers.h"
 
 class nsIInputStream;
 
 namespace mozilla {
 class ErrorResult;
 
 namespace dom {
 class Blob;
 class GlobalObject;
 template<typename> class Optional;
-} // namespace dom
-} // namespace mozilla
-
-BEGIN_WORKERS_NAMESPACE
 
 class FileReaderSync final
 {
   NS_INLINE_DECL_REFCOUNTING(FileReaderSync)
 
 private:
   // Private destructor, to discourage deletion outside of Release():
   ~FileReaderSync()
@@ -46,11 +42,12 @@ public:
                          Blob& aBlob, JS::MutableHandle<JSObject*> aRetval,
                          ErrorResult& aRv);
   void ReadAsBinaryString(Blob& aBlob, nsAString& aResult, ErrorResult& aRv);
   void ReadAsText(Blob& aBlob, const Optional<nsAString>& aEncoding,
                   nsAString& aResult, ErrorResult& aRv);
   void ReadAsDataURL(Blob& aBlob, nsAString& aResult, ErrorResult& aRv);
 };
 
-END_WORKERS_NAMESPACE
+} // namespace dom
+} // namespace mozilla
 
-#endif // mozilla_dom_workers_filereadersync_h__
+#endif // mozilla_dom_filereadersync_h__
--- a/dom/workers/moz.build
+++ b/dom/workers/moz.build
@@ -1,16 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 # Public stuff.
 EXPORTS.mozilla.dom += [
+    'FileReaderSync.h',
     'ServiceWorkerCommon.h',
     'ServiceWorkerContainer.h',
     'ServiceWorkerEvents.h',
     'ServiceWorkerMessageEvent.h',
     'ServiceWorkerRegistrar.h',
     'ServiceWorkerRegistration.h',
     'WorkerLocation.h',
     'WorkerPrefs.h',
@@ -24,17 +25,16 @@ EXPORTS.mozilla.dom.workers += [
     'WorkerDebuggerManager.h',
     'Workers.h',
 ]
 
 # Stuff needed for the bindings, not really public though.
 EXPORTS.mozilla.dom.workers.bindings += [
     'DataStore.h',
     'DataStoreCursor.h',
-    'FileReaderSync.h',
     'Navigator.h',
     'Performance.h',
     'ServiceWorker.h',
     'ServiceWorkerClient.h',
     'ServiceWorkerClients.h',
     'ServiceWorkerWindowClient.h',
     'SharedWorker.h',
     'URL.h',