Merge inbound to mozilla-central. a=merge
authorNoemi Erli <nerli@mozilla.com>
Fri, 04 Jan 2019 18:11:50 +0200
changeset 509644 619d084f08917d63aab65a8a42f1c4b40d909542
parent 509634 70f7a0429d59b8631f93338f6c4475a957af02c4 (current diff)
parent 509643 86afdee4cff987a8de0a1e97005ede4f9fba011c (diff)
child 509654 d7e5ed9d73e634c954aa8753c3b499ec2f2a67c5
child 509699 1d867d35ae2da5e2633daf89b7384f92870b445e
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone66.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
Merge inbound to mozilla-central. a=merge
--- a/devtools/client/performance/test/browser.ini
+++ b/devtools/client/performance/test/browser.ini
@@ -11,16 +11,17 @@ support-files =
   js_simpleWorker.js
   head.js
   !/devtools/client/shared/test/frame-script-utils.js
   !/devtools/client/shared/test/telemetry-test-helpers.js
 
 [browser_aaa-run-first-leaktest.js]
 [browser_perf-button-states.js]
 [browser_perf-calltree-js-categories.js]
+skip-if = (os == 'win' && os_version == '10.0' && bits == 64 && !asan) # Bug 1466377 
 [browser_perf-calltree-js-columns.js]
 [browser_perf-calltree-js-events.js]
 [browser_perf-calltree-memory-columns.js]
 [browser_perf-console-record-01.js]
 [browser_perf-console-record-02.js]
 [browser_perf-console-record-03.js]
 [browser_perf-console-record-04.js]
 [browser_perf-console-record-05.js]
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
@@ -8,16 +8,17 @@
 
 #include "mozilla/dom/ChromeBrowsingContext.h"
 #include "mozilla/dom/BrowsingContextBinding.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/Location.h"
 #include "mozilla/dom/LocationBinding.h"
 #include "mozilla/dom/WindowBinding.h"
+#include "mozilla/dom/WindowProxyHolder.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/HashTable.h"
 #include "mozilla/Logging.h"
 #include "mozilla/StaticPtr.h"
 
 #include "nsDocShell.h"
 #include "nsGlobalWindowOuter.h"
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -32,16 +32,17 @@
 #include "mozilla/dom/StorageEvent.h"
 #include "mozilla/dom/StorageEventBinding.h"
 #include "mozilla/dom/StorageNotifierService.h"
 #include "mozilla/dom/StorageUtils.h"
 #include "mozilla/dom/Timeout.h"
 #include "mozilla/dom/TimeoutHandler.h"
 #include "mozilla/dom/TimeoutManager.h"
 #include "mozilla/dom/VisualViewport.h"
+#include "mozilla/dom/WindowProxyHolder.h"
 #include "mozilla/IntegerPrintfMacros.h"
 #if defined(MOZ_WIDGET_ANDROID)
 #include "mozilla/dom/WindowOrientationObserver.h"
 #endif
 #include "nsDOMOfflineResourceList.h"
 #include "nsError.h"
 #include "nsIIdleService.h"
 #include "nsISizeOfEventTarget.h"
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -60,16 +60,17 @@
 #include "mozilla/dom/XULMenuElementBinding.h"
 #include "mozilla/dom/XULPopupElementBinding.h"
 #include "mozilla/dom/XULTextElementBinding.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
 #include "mozilla/dom/WorkerPrivate.h"
 #include "mozilla/dom/WorkerScope.h"
 #include "mozilla/dom/XrayExpandoClass.h"
+#include "mozilla/dom/WindowProxyHolder.h"
 #include "mozilla/dom/XULScrollElementBinding.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "ipc/ErrorIPCUtils.h"
 #include "mozilla/UseCounter.h"
 #include "mozilla/dom/DocGroup.h"
 #include "nsXULElement.h"
 
 namespace mozilla {
--- a/dom/events/EventTarget.h
+++ b/dom/events/EventTarget.h
@@ -4,17 +4,16 @@
  * 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_EventTarget_h_
 #define mozilla_dom_EventTarget_h_
 
 #include "mozilla/dom/BindingDeclarations.h"
 #include "mozilla/dom/Nullable.h"
-#include "mozilla/dom/WindowProxyHolder.h"
 #include "nsISupports.h"
 #include "nsWrapperCache.h"
 #include "nsAtom.h"
 
 class nsPIDOMWindowOuter;
 class nsIGlobalObject;
 class nsIDOMEventListener;
 
--- a/dom/file/FileBlobImpl.cpp
+++ b/dom/file/FileBlobImpl.cpp
@@ -51,19 +51,19 @@ FileBlobImpl::FileBlobImpl(const nsAStri
       mFile(aFile),
       mWholeFile(true),
       mFileId(-1) {
   MOZ_ASSERT(mFile, "must have file");
   MOZ_ASSERT(XRE_IsParentProcess());
 }
 
 FileBlobImpl::FileBlobImpl(nsIFile* aFile, const nsAString& aName,
-                           const nsAString& aContentType)
-    : BaseBlobImpl(NS_LITERAL_STRING("FileBlobImpl"), aName, aContentType,
-                   UINT64_MAX, INT64_MAX),
+                           const nsAString& aContentType,
+                           const nsAString& aBlobImplType)
+    : BaseBlobImpl(aBlobImplType, aName, aContentType, UINT64_MAX, INT64_MAX),
       mFile(aFile),
       mWholeFile(true),
       mFileId(-1) {
   MOZ_ASSERT(mFile, "must have file");
   MOZ_ASSERT(XRE_IsParentProcess());
   if (aContentType.IsEmpty()) {
     // Lazily get the content type and size
     mContentType.SetIsVoid(true);
--- a/dom/file/FileBlobImpl.h
+++ b/dom/file/FileBlobImpl.h
@@ -24,18 +24,19 @@ class FileBlobImpl : public BaseBlobImpl
   // Create as a file
   FileBlobImpl(const nsAString& aName, const nsAString& aContentType,
                uint64_t aLength, nsIFile* aFile);
 
   FileBlobImpl(const nsAString& aName, const nsAString& aContentType,
                uint64_t aLength, nsIFile* aFile, int64_t aLastModificationDate);
 
   // Create as a file with custom name
-  FileBlobImpl(nsIFile* aFile, const nsAString& aName,
-               const nsAString& aContentType);
+  FileBlobImpl(
+      nsIFile* aFile, const nsAString& aName, const nsAString& aContentType,
+      const nsAString& aBlobImplType = NS_LITERAL_STRING("FileBlobImpl"));
 
   // Overrides
   virtual uint64_t GetSize(ErrorResult& aRv) override;
   virtual void GetType(nsAString& aType) override;
   virtual int64_t GetLastModified(ErrorResult& aRv) override;
   virtual void SetLastModified(int64_t aLastModified) override;
   virtual void GetMozFullPathInternal(nsAString& aFullPath,
                                       ErrorResult& aRv) const override;
--- a/dom/file/StreamBlobImpl.cpp
+++ b/dom/file/StreamBlobImpl.cpp
@@ -14,52 +14,56 @@
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_ISUPPORTS_INHERITED(StreamBlobImpl, BlobImpl, nsIMemoryReporter)
 
 /* static */ already_AddRefed<StreamBlobImpl> StreamBlobImpl::Create(
     already_AddRefed<nsIInputStream> aInputStream,
-    const nsAString& aContentType, uint64_t aLength) {
+    const nsAString& aContentType, uint64_t aLength,
+    const nsAString& aBlobImplType) {
   nsCOMPtr<nsIInputStream> inputStream = std::move(aInputStream);
 
-  RefPtr<StreamBlobImpl> blobImplStream =
-      new StreamBlobImpl(inputStream.forget(), aContentType, aLength);
+  RefPtr<StreamBlobImpl> blobImplStream = new StreamBlobImpl(
+      inputStream.forget(), aContentType, aLength, aBlobImplType);
   blobImplStream->MaybeRegisterMemoryReporter();
   return blobImplStream.forget();
 }
 
 /* static */ already_AddRefed<StreamBlobImpl> StreamBlobImpl::Create(
     already_AddRefed<nsIInputStream> aInputStream, const nsAString& aName,
-    const nsAString& aContentType, int64_t aLastModifiedDate,
-    uint64_t aLength) {
+    const nsAString& aContentType, int64_t aLastModifiedDate, uint64_t aLength,
+    const nsAString& aBlobImplType) {
   nsCOMPtr<nsIInputStream> inputStream = std::move(aInputStream);
 
-  RefPtr<StreamBlobImpl> blobImplStream = new StreamBlobImpl(
-      inputStream.forget(), aName, aContentType, aLastModifiedDate, aLength);
+  RefPtr<StreamBlobImpl> blobImplStream =
+      new StreamBlobImpl(inputStream.forget(), aName, aContentType,
+                         aLastModifiedDate, aLength, aBlobImplType);
   blobImplStream->MaybeRegisterMemoryReporter();
   return blobImplStream.forget();
 }
 
 StreamBlobImpl::StreamBlobImpl(already_AddRefed<nsIInputStream> aInputStream,
-                               const nsAString& aContentType, uint64_t aLength)
-    : BaseBlobImpl(NS_LITERAL_STRING("StreamBlobImpl"), aContentType, aLength),
+                               const nsAString& aContentType, uint64_t aLength,
+                               const nsAString& aBlobImplType)
+    : BaseBlobImpl(aBlobImplType, aContentType, aLength),
       mInputStream(std::move(aInputStream)),
       mIsDirectory(false),
       mFileId(-1) {
   mImmutable = true;
 }
 
 StreamBlobImpl::StreamBlobImpl(already_AddRefed<nsIInputStream> aInputStream,
                                const nsAString& aName,
                                const nsAString& aContentType,
-                               int64_t aLastModifiedDate, uint64_t aLength)
-    : BaseBlobImpl(NS_LITERAL_STRING("StreamBlobImpl"), aName, aContentType,
-                   aLength, aLastModifiedDate),
+                               int64_t aLastModifiedDate, uint64_t aLength,
+                               const nsAString& aBlobImplType)
+    : BaseBlobImpl(aBlobImplType, aName, aContentType, aLength,
+                   aLastModifiedDate),
       mInputStream(std::move(aInputStream)),
       mIsDirectory(false),
       mFileId(-1) {
   mImmutable = true;
 }
 
 StreamBlobImpl::~StreamBlobImpl() { UnregisterWeakMemoryReporter(this); }
 
@@ -108,18 +112,18 @@ already_AddRefed<BlobImpl> StreamBlobImp
     }
 
     clonedStream =
         new SlicedInputStream(clonedStream.forget(), aStart, aLength);
   }
 
   MOZ_ASSERT(clonedStream);
 
-  RefPtr<BlobImpl> impl =
-      new StreamBlobImpl(clonedStream.forget(), aContentType, aLength);
+  RefPtr<BlobImpl> impl = new StreamBlobImpl(
+      clonedStream.forget(), aContentType, aLength, mBlobImplType);
   return impl.forget();
 }
 
 void StreamBlobImpl::MaybeRegisterMemoryReporter() {
   // We report only stringInputStream.
   nsCOMPtr<nsIStringInputStream> stringInputStream =
       do_QueryInterface(mInputStream);
   if (!stringInputStream) {
@@ -151,10 +155,16 @@ size_t StreamBlobImpl::GetAllocationSize
       do_QueryInterface(mInputStream);
   if (!stringInputStream) {
     return 0;
   }
 
   return stringInputStream->SizeOfIncludingThis(MallocSizeOf);
 }
 
+void StreamBlobImpl::GetBlobImplType(nsAString& aBlobImplType) const {
+  aBlobImplType.AssignLiteral("StreamBlobImpl[");
+  aBlobImplType.Append(mBlobImplType);
+  aBlobImplType.AppendLiteral("]");
+}
+
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/file/StreamBlobImpl.h
+++ b/dom/file/StreamBlobImpl.h
@@ -17,22 +17,23 @@ class StreamBlobImpl final : public Base
   MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf)
 
  public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIMEMORYREPORTER
 
   static already_AddRefed<StreamBlobImpl> Create(
       already_AddRefed<nsIInputStream> aInputStream,
-      const nsAString& aContentType, uint64_t aLength);
+      const nsAString& aContentType, uint64_t aLength,
+      const nsAString& aBlobImplType);
 
   static already_AddRefed<StreamBlobImpl> Create(
       already_AddRefed<nsIInputStream> aInputStream, const nsAString& aName,
       const nsAString& aContentType, int64_t aLastModifiedDate,
-      uint64_t aLength);
+      uint64_t aLength, const nsAString& aBlobImplType);
 
   virtual void CreateInputStream(nsIInputStream** aStream,
                                  ErrorResult& aRv) override;
 
   virtual already_AddRefed<BlobImpl> CreateSlice(uint64_t aStart,
                                                  uint64_t aLength,
                                                  const nsAString& aContentType,
                                                  ErrorResult& aRv) override;
@@ -56,23 +57,27 @@ class StreamBlobImpl final : public Base
 
   size_t GetAllocationSize() const override;
 
   size_t GetAllocationSize(
       FallibleTArray<BlobImpl*>& aVisitedBlobImpls) const override {
     return GetAllocationSize();
   }
 
+  void GetBlobImplType(nsAString& aBlobImplType) const override;
+
  private:
   StreamBlobImpl(already_AddRefed<nsIInputStream> aInputStream,
-                 const nsAString& aContentType, uint64_t aLength);
+                 const nsAString& aContentType, uint64_t aLength,
+                 const nsAString& aBlobImplType);
 
   StreamBlobImpl(already_AddRefed<nsIInputStream> aInputStream,
                  const nsAString& aName, const nsAString& aContentType,
-                 int64_t aLastModifiedDate, uint64_t aLength);
+                 int64_t aLastModifiedDate, uint64_t aLength,
+                 const nsAString& aBlobImplType);
 
   ~StreamBlobImpl();
 
   void MaybeRegisterMemoryReporter();
 
   nsCOMPtr<nsIInputStream> mInputStream;
 
   nsString mFullPath;
--- a/dom/file/TemporaryFileBlobImpl.cpp
+++ b/dom/file/TemporaryFileBlobImpl.cpp
@@ -82,17 +82,18 @@ class TemporaryFileInputStream final : p
 
   nsCOMPtr<nsIFile> mFile;
 };
 
 }  // namespace
 
 TemporaryFileBlobImpl::TemporaryFileBlobImpl(nsIFile* aFile,
                                              const nsAString& aContentType)
-    : FileBlobImpl(aFile, EmptyString(), aContentType)
+    : FileBlobImpl(aFile, EmptyString(), aContentType,
+                   NS_LITERAL_STRING("TemporaryBlobImpl"))
 #ifdef DEBUG
       ,
       mInputStreamCreated(false)
 #endif
 {
   MOZ_ASSERT(XRE_IsParentProcess());
 
   // This must be considered a blob.
--- a/dom/file/ipc/IPCBlob.ipdlh
+++ b/dom/file/ipc/IPCBlob.ipdlh
@@ -49,16 +49,17 @@ union IPCBlobStream
   // Child to Parent: Normal serialization.
   IPCStream;
 };
 
 struct IPCBlob
 {
   nsString type;
   uint64_t size;
+  nsString blobImplType;
 
   IPCBlobStream inputStream;
 
   IPCFileUnion file;
 
   // This ID is used only by indexedDB tests.
   int64_t fileId;
 };
--- a/dom/file/ipc/IPCBlobUtils.cpp
+++ b/dom/file/ipc/IPCBlobUtils.cpp
@@ -54,22 +54,22 @@ already_AddRefed<BlobImpl> Deserialize(c
   }
 
   MOZ_ASSERT(inputStream);
 
   RefPtr<StreamBlobImpl> blobImpl;
 
   if (aIPCBlob.file().type() == IPCFileUnion::Tvoid_t) {
     blobImpl = StreamBlobImpl::Create(inputStream.forget(), aIPCBlob.type(),
-                                      aIPCBlob.size());
+                                      aIPCBlob.size(), aIPCBlob.blobImplType());
   } else {
     const IPCFile& file = aIPCBlob.file().get_IPCFile();
     blobImpl = StreamBlobImpl::Create(inputStream.forget(), file.name(),
                                       aIPCBlob.type(), file.lastModified(),
-                                      aIPCBlob.size());
+                                      aIPCBlob.size(), aIPCBlob.blobImplType());
     blobImpl->SetDOMPath(file.DOMPath());
     blobImpl->SetFullPath(file.fullPath());
     blobImpl->SetIsDirectory(file.isDirectory());
   }
 
   blobImpl->SetFileId(aIPCBlob.fileId());
 
   return blobImpl.forget();
@@ -174,16 +174,19 @@ template <typename M>
 nsresult SerializeInternal(BlobImpl* aBlobImpl, M* aManager,
                            IPCBlob& aIPCBlob) {
   MOZ_ASSERT(aBlobImpl);
 
   nsAutoString value;
   aBlobImpl->GetType(value);
   aIPCBlob.type() = value;
 
+  aBlobImpl->GetBlobImplType(value);
+  aIPCBlob.blobImplType() = value;
+
   ErrorResult rv;
   aIPCBlob.size() = aBlobImpl->GetSize(rv);
   if (NS_WARN_IF(rv.Failed())) {
     return rv.StealNSResult();
   }
 
   if (!aBlobImpl->IsFile()) {
     aIPCBlob.file() = void_t();
--- a/dom/html/HTMLObjectElement.cpp
+++ b/dom/html/HTMLObjectElement.cpp
@@ -4,16 +4,17 @@
  * 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/. */
 
 #include "mozilla/EventStates.h"
 #include "mozilla/dom/HTMLFormSubmission.h"
 #include "mozilla/dom/HTMLObjectElement.h"
 #include "mozilla/dom/HTMLObjectElementBinding.h"
 #include "mozilla/dom/ElementInlines.h"
+#include "mozilla/dom/WindowProxyHolder.h"
 #include "nsAttrValueInlines.h"
 #include "nsGkAtoms.h"
 #include "nsError.h"
 #include "mozilla/dom/Document.h"
 #include "nsIPluginDocument.h"
 #include "nsIObjectFrame.h"
 #include "nsNPAPIPluginInstance.h"
 #include "nsIWidget.h"
--- a/dom/html/nsGenericHTMLFrameElement.cpp
+++ b/dom/html/nsGenericHTMLFrameElement.cpp
@@ -3,16 +3,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/. */
 
 #include "nsGenericHTMLFrameElement.h"
 
 #include "mozilla/dom/HTMLIFrameElement.h"
 #include "mozilla/dom/XULFrameElement.h"
+#include "mozilla/dom/WindowProxyHolder.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/ErrorResult.h"
 #include "GeckoProfiler.h"
 #include "nsAttrValueInlines.h"
 #include "nsContentUtils.h"
 #include "nsIDocShell.h"
 #include "nsIFrame.h"
 #include "nsIInterfaceRequestorUtils.h"
--- a/dom/tests/mochitest/fetch/common_temporaryFileBlob.js
+++ b/dom/tests/mochitest/fetch/common_temporaryFileBlob.js
@@ -6,17 +6,17 @@ function test_fetch_basic() {
   fetch("/tests/dom/xhr/tests/temporaryFileBlob.sjs",
         { method: "POST", body: data })
   .then(response => {
     return response.blob();
   }).then(blob => {
     ok(blob instanceof Blob, "We have a blob!");
     is(blob.size, data.length, "Data length matches");
     if ("SpecialPowers" in self) {
-      is(SpecialPowers.wrap(blob).blobImplType, "StreamBlobImpl", "We have a blob stored into a stream file");
+      is(SpecialPowers.wrap(blob).blobImplType, "StreamBlobImpl[TemporaryBlobImpl]", "We have a blob stored into a stream file");
     }
 
     var fr = new FileReader();
     fr.readAsText(blob);
     fr.onload = function() {
       is(fr.result, data, "Data content matches");
       next();
     }
@@ -37,17 +37,17 @@ function test_xhr_basic() {
 
   xhr.onreadystatechange = function() {
     if (xhr.readyState == 4) {
       let blob = xhr.response;
 
       ok(blob instanceof Blob, "We have a blob!");
       is(blob.size, data.length, "Data length matches");
       if ("SpecialPowers" in self) {
-        is(SpecialPowers.wrap(blob).blobImplType, "StreamBlobImpl", "We have a blob stored into a stream file");
+        is(SpecialPowers.wrap(blob).blobImplType, "StreamBlobImpl[TemporaryBlobImpl]", "We have a blob stored into a stream file");
       }
 
       var fr = new FileReader();
       fr.readAsText(blob);
       fr.onload = function() {
         is(fr.result, data, "Data content matches");
         next();
       }
@@ -62,17 +62,17 @@ function test_xhr_worker() {
 function test_response_basic() {
   info("Response");
 
   let r = new Response(data);
   r.blob().then(blob => {
     ok(blob instanceof Blob, "We have a blob!");
     is(blob.size, data.length, "Data length matches");
     if ("SpecialPowers" in self) {
-      is(SpecialPowers.wrap(blob).blobImplType, "StreamBlobImpl", "We have a blob stored into a stream file");
+      is(SpecialPowers.wrap(blob).blobImplType, "StreamBlobImpl[TemporaryBlobImpl]", "We have a blob stored into a stream file");
     }
 
     var fr = new FileReader();
     fr.readAsText(blob);
     fr.onload = function() {
       is(fr.result, data, "Data content matches");
       next();
     }
@@ -86,17 +86,17 @@ function test_response_worker() {
 function test_request_basic() {
   info("Request");
 
   let r = new Request("https://example.com", { body: data, method: 'POST' });
   r.blob().then(blob => {
     ok(blob instanceof Blob, "We have a blob!");
     is(blob.size, data.length, "Data length matches");
     if ("SpecialPowers" in self) {
-      is(SpecialPowers.wrap(blob).blobImplType, "StreamBlobImpl", "We have a blob stored into a stream file");
+      is(SpecialPowers.wrap(blob).blobImplType, "StreamBlobImpl[TemporaryBlobImpl]", "We have a blob stored into a stream file");
     }
 
     var fr = new FileReader();
     fr.readAsText(blob);
     fr.onload = function() {
       is(fr.result, data, "Data content matches");
       next();
     }
--- a/dom/xhr/tests/browser_temporaryFile.js
+++ b/dom/xhr/tests/browser_temporaryFile.js
@@ -22,24 +22,23 @@ add_task(async _ => {
     xhr.onloadend = _ => {
       is(xhr.response.blobImplType, "MemoryBlobImpl", "We want a MemoryBlobImpl");
       resolve();
     }
   });
 });
 
 add_task(async _ => {
-  // TemporaryBlobImpl is not exposed. It's sent via PBackground and received as StreamBlobImpl.
   await SpecialPowers.pushPrefEnv({ "set" : [[ "dom.blob.memoryToTemporaryFile", 1 ]] });
 
   var data = new Array(2).join("1234567890ABCDEF");
 
   await new Promise(resolve => {
     var xhr = new XMLHttpRequest();
     xhr.open("POST", "http://mochi.test:8888/browser/dom/xhr/tests/temporaryFileBlob.sjs");
     xhr.responseType = 'blob';
     xhr.send({toString: function() { return data; }});
     xhr.onloadend = _ => {
-      is(xhr.response.blobImplType, "StreamBlobImpl", "We want a StreamBlobImpl");
+      is(xhr.response.blobImplType, "StreamBlobImpl[TemporaryBlobImpl]", "We want a StreamBlobImpl holding a TemporaryBlobImpl on the parent side");
       resolve();
     }
   });
 });
--- a/dom/xhr/tests/common_temporaryFileBlob.js
+++ b/dom/xhr/tests/common_temporaryFileBlob.js
@@ -12,17 +12,17 @@ function test_simple() {
   info("Simple test");
 
   var xhr = createXHR();
 
   xhr.onloadend = function() {
     ok(xhr.response instanceof Blob, "We have a blob!");
     ok(!(xhr.response instanceof File), "Our blob is not a file!");
     if ("SpecialPowers" in self) {
-      is(SpecialPowers.wrap(xhr.response).blobImplType, "StreamBlobImpl", "We have a blob stored into a stream file");
+      is(SpecialPowers.wrap(xhr.response).blobImplType, "StreamBlobImpl[TemporaryBlobImpl]", "We have a blob stored into a stream file");
     }
     is(xhr.response.size, data.length, "Data length matches");
 
     var fr = new FileReader();
     fr.readAsText(xhr.response);
     fr.onload = function() {
       is(fr.result, data, "Data content matches");
       next();
@@ -50,17 +50,17 @@ function test_reuse() {
 
   var xhr = createXHR();
 
   var count = 0;
   xhr.onloadend = function() {
     ok(xhr.response instanceof Blob, "We have a blob!");
     ok(!(xhr.response instanceof File), "Our blob is not a file!");
     if ("SpecialPowers" in self) {
-      is(SpecialPowers.wrap(xhr.response).blobImplType, "StreamBlobImpl", "We have a blob stored into a stream file");
+      is(SpecialPowers.wrap(xhr.response).blobImplType, "StreamBlobImpl[TemporaryBlobImpl]", "We have a blob stored into a stream file");
     }
     is(xhr.response.size, data.length, "Data length matches");
 
     var fr = new FileReader();
     fr.readAsText(xhr.response);
     fr.onload = function() {
       is(fr.result, data, "Data content matches");
       if (++count > 2) {
--- a/dom/xul/XULFrameElement.cpp
+++ b/dom/xul/XULFrameElement.cpp
@@ -4,16 +4,17 @@
  * 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/. */
 
 #include "nsCOMPtr.h"
 #include "nsIContent.h"
 #include "nsFrameLoader.h"
 #include "mozilla/AsyncEventDispatcher.h"
 #include "mozilla/dom/HTMLIFrameElement.h"
+#include "mozilla/dom/WindowProxyHolder.h"
 #include "mozilla/dom/XULFrameElement.h"
 #include "mozilla/dom/XULFrameElementBinding.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(XULFrameElement)
 
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/profiler/jsop-resume-return-bug1451385-1.js
@@ -0,0 +1,10 @@
+// |jit-test| error:ReferenceError
+
+enableGeckoProfiling("Math.round", "-0.49", -0);
+function* g(n) {
+    for (var i = 0; i < n; i++) yield i;
+}
+var inner = g(20);
+for (let target of inner) {
+    if (GeneratorObjectPrototype() == i(true, true) == (this) == (this)) {}
+}
new file mode 100644
--- /dev/null
+++ b/js/src/jit-test/tests/profiler/jsop-resume-return-bug1451385-2.js
@@ -0,0 +1,9 @@
+// |jit-test| error:ReferenceError
+
+function* g(n) {
+    for (var i = 0; i < n; i++) yield i;
+}
+var inner = g(20);
+for (let target of inner) {
+    if (GeneratorObjectPrototype() == i(true, true) == (this) == (this)) {}
+}
--- a/js/src/jit/arm64/MacroAssembler-arm64.cpp
+++ b/js/src/jit/arm64/MacroAssembler-arm64.cpp
@@ -197,17 +197,31 @@ void MacroAssemblerCompat::handleFailure
   bind(&return_);
   loadPtr(Address(r28, offsetof(ResumeFromException, framePointer)),
           BaselineFrameReg);
   loadPtr(Address(r28, offsetof(ResumeFromException, stackPointer)), r28);
   loadValue(
       Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfReturnValue()),
       JSReturnOperand);
   movePtr(BaselineFrameReg, r28);
-  vixl::MacroAssembler::Pop(ARMRegister(BaselineFrameReg, 64), vixl::lr);
+  vixl::MacroAssembler::Pop(ARMRegister(BaselineFrameReg, 64));
+
+  // If profiling is enabled, then update the lastProfilingFrame to refer to
+  // caller frame before returning.
+  {
+    Label skipProfilingInstrumentation;
+    AbsoluteAddress addressOfEnabled(
+        GetJitContext()->runtime->geckoProfiler().addressOfEnabled());
+    asMasm().branch32(Assembler::Equal, addressOfEnabled, Imm32(0),
+                      &skipProfilingInstrumentation);
+    jump(profilerExitTail);
+    bind(&skipProfilingInstrumentation);
+  }
+
+  vixl::MacroAssembler::Pop(vixl::lr);
   syncStackPtr();
   vixl::MacroAssembler::Ret(vixl::lr);
 
   // If we are bailing out to baseline to handle an exception, jump to the
   // bailout tail stub. Load 1 (true) in x0 (ReturnReg) to indicate success.
   bind(&bailout);
   Ldr(x2, MemOperand(GetStackPointer64(),
                      offsetof(ResumeFromException, bailoutInfo)));
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -1278,61 +1278,56 @@ JS_PUBLIC_API void JS_ResetGCParameter(J
   cx->runtime()->gc.resetParameter(key, lock);
 }
 
 JS_PUBLIC_API uint32_t JS_GetGCParameter(JSContext* cx, JSGCParamKey key) {
   AutoLockGC lock(cx->runtime());
   return cx->runtime()->gc.getParameter(key, lock);
 }
 
-static const size_t NumGCConfigs = 14;
-struct JSGCConfig {
-  JSGCParamKey key;
-  uint32_t value;
-};
-
 JS_PUBLIC_API void JS_SetGCParametersBasedOnAvailableMemory(JSContext* cx,
                                                             uint32_t availMem) {
-  static const JSGCConfig minimal[NumGCConfigs] = {
+  struct JSGCConfig {
+    JSGCParamKey key;
+    uint32_t value;
+  };
+
+  static const JSGCConfig minimal[] = {
       {JSGC_MAX_MALLOC_BYTES, 6 * 1024 * 1024},
       {JSGC_SLICE_TIME_BUDGET, 30},
       {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1500},
       {JSGC_HIGH_FREQUENCY_HIGH_LIMIT, 40},
       {JSGC_HIGH_FREQUENCY_LOW_LIMIT, 0},
       {JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX, 300},
       {JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN, 120},
       {JSGC_LOW_FREQUENCY_HEAP_GROWTH, 120},
       {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1500},
       {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1500},
       {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1500},
       {JSGC_ALLOCATION_THRESHOLD, 1},
       {JSGC_MODE, JSGC_MODE_INCREMENTAL}};
 
-  const JSGCConfig* config = minimal;
-  if (availMem > 512) {
-    static const JSGCConfig nominal[NumGCConfigs] = {
-        {JSGC_MAX_MALLOC_BYTES, 6 * 1024 * 1024},
-        {JSGC_SLICE_TIME_BUDGET, 30},
-        {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1000},
-        {JSGC_HIGH_FREQUENCY_HIGH_LIMIT, 500},
-        {JSGC_HIGH_FREQUENCY_LOW_LIMIT, 100},
-        {JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX, 300},
-        {JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN, 150},
-        {JSGC_LOW_FREQUENCY_HEAP_GROWTH, 150},
-        {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1500},
-        {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1500},
-        {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1500},
-        {JSGC_ALLOCATION_THRESHOLD, 30},
-        {JSGC_MODE, JSGC_MODE_ZONE}};
-
-    config = nominal;
-  }
-
-  for (size_t i = 0; i < NumGCConfigs; i++) {
-    JS_SetGCParameter(cx, config[i].key, config[i].value);
+  static const JSGCConfig nominal[] = {
+      {JSGC_MAX_MALLOC_BYTES, 6 * 1024 * 1024},
+      {JSGC_SLICE_TIME_BUDGET, 30},
+      {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1000},
+      {JSGC_HIGH_FREQUENCY_HIGH_LIMIT, 500},
+      {JSGC_HIGH_FREQUENCY_LOW_LIMIT, 100},
+      {JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX, 300},
+      {JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN, 150},
+      {JSGC_LOW_FREQUENCY_HEAP_GROWTH, 150},
+      {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1500},
+      {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1500},
+      {JSGC_HIGH_FREQUENCY_TIME_LIMIT, 1500},
+      {JSGC_ALLOCATION_THRESHOLD, 30},
+      {JSGC_MODE, JSGC_MODE_ZONE}};
+
+  const auto& configSet = availMem > 512 ? nominal : minimal;
+  for (const auto& config : configSet) {
+    JS_SetGCParameter(cx, config.key, config.value);
   }
 }
 
 JS_PUBLIC_API JSString* JS_NewExternalString(JSContext* cx,
                                              const char16_t* chars,
                                              size_t length,
                                              const JSStringFinalizer* fin) {
   AssertHeapIsIdle();
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/service-workers/service-worker/claim-with-redirect.https.html.ini
@@ -0,0 +1,4 @@
+[claim-with-redirect.https.html]
+  disabled:
+    if debug and os == 'linux': https://bugzilla.mozilla.org/show_bug.cgi?id=1399448
+    if debug and os == 'mac': https://bugzilla.mozilla.org/show_bug.cgi?id=1399448
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -1631,17 +1631,17 @@ class BootstrapScope {
       if (!method) {
         logger.warn(`Add-on ${addon.id} is missing bootstrap method ${aMethod}`);
       } else {
         logger.debug(`Calling bootstrap method ${aMethod} on ${addon.id} version ${addon.version}`);
 
         this._beforeCallBootstrapMethod(aMethod, params, aReason);
 
         try {
-          result = method.call(scope, params, aReason);
+          result = await method.call(scope, params, aReason);
         } catch (e) {
           logger.warn(`Exception running bootstrap method ${aMethod} on ${addon.id}`, e);
         }
       }
       return result;
     } finally {
       // Extensions are automatically initialized in the correct order at startup.
       if (aMethod == "startup" && aReason != BOOTSTRAP_REASONS.APP_STARTUP) {
--- a/toolkit/mozapps/extensions/test/xpcshell/test_dependencies.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_dependencies.js
@@ -27,16 +27,29 @@ const ADDONS = [
     dependencies: ["experiments.addon2"],
   },
 ];
 
 let addonFiles = [];
 
 let events = [];
 
+function promiseAddonStartup(id) {
+  return new Promise(resolve => {
+    const onBootstrapMethod = (event, {method, params}) => {
+      if (method == "startup" && params.id == id) {
+        AddonTestUtils.off("bootstrap-method", onBootstrapMethod);
+        resolve();
+      }
+    };
+
+    AddonTestUtils.on("bootstrap-method", onBootstrapMethod);
+  });
+}
+
 add_task(async function setup() {
   await promiseStartupManager();
 
   const onBootstrapMethod = (event, {method, params}) => {
     if (method == "startup" || method == "shutdown") {
       events.push([method, params.id]);
     }
   };
@@ -68,27 +81,33 @@ add_task(async function() {
   events.length = 0;
 
   await promiseInstallFile(addonFiles[0]);
   deepEqual(events, [], "Should have no events");
 
   await promiseInstallFile(addonFiles[1]);
   deepEqual(events, [], "Should have no events");
 
-  await promiseInstallFile(addonFiles[2]);
+  await Promise.all([
+    promiseInstallFile(addonFiles[2]),
+    promiseAddonStartup(ADDONS[0].id),
+  ]);
 
   deepEqual(events, [
     ["startup", ADDONS[2].id],
     ["startup", ADDONS[1].id],
     ["startup", ADDONS[0].id],
   ]);
 
   events.length = 0;
 
-  await promiseInstallFile(addonFiles[2]);
+  await Promise.all([
+    promiseInstallFile(addonFiles[2]),
+    promiseAddonStartup(ADDONS[0].id),
+  ]);
 
   deepEqual(events, [
     ["shutdown", ADDONS[0].id],
     ["shutdown", ADDONS[1].id],
     ["shutdown", ADDONS[2].id],
 
     ["startup", ADDONS[2].id],
     ["startup", ADDONS[1].id],