From 16fce4341d087924e51f465cc772b0899de1089d Mon Sep 17 00:00:00 2001 From: Simon Giesecke Date: Fri, 14 Feb 2020 14:39:40 +0100 Subject: [IndexedDB] Ensure that strong references to newly created cursors are kept until the DOM Binding is created. This fixes random crashes on websites that use IndexedDB cursors. See also BZ bug 1599420 --- dom/indexedDB/ActorsChild.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dom/indexedDB/ActorsChild.cpp') diff --git a/dom/indexedDB/ActorsChild.cpp b/dom/indexedDB/ActorsChild.cpp index 30dc9b6da..85f876cdc 100644 --- a/dom/indexedDB/ActorsChild.cpp +++ b/dom/indexedDB/ActorsChild.cpp @@ -3291,6 +3291,10 @@ BackgroundCursorChild::HandleResponse( auto& responses = const_cast&>(aResponses); + // If a new cursor is created, we need to keep a reference to it until the + // ResultHelper creates a DOM Binding. + RefPtr newCursor; + for (ObjectStoreCursorResponse& response : responses) { StructuredCloneReadInfo cloneReadInfo(Move(response.cloneInfo())); cloneReadInfo.mDatabase = mTransaction->Database(); @@ -3300,8 +3304,6 @@ BackgroundCursorChild::HandleResponse( nullptr, cloneReadInfo.mFiles); - RefPtr newCursor; - if (mCursor) { mCursor->Reset(Move(response.key()), Move(cloneReadInfo)); } else { -- cgit v1.2.3 From a680bdc637e0393aaa08d575c66f7166b788b443 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Wed, 23 Sep 2020 13:55:00 +0000 Subject: Issue #1656 - Part 1: Nuke most vim config lines in the tree. Since these are just interpreted comments, there's 0 impact on actual code. This removes all lines that match /* vim: set(.*)tw=80: */ with S&R -- there are a few others scattered around which will be removed manually in a second part. --- dom/indexedDB/ActorsChild.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'dom/indexedDB/ActorsChild.cpp') diff --git a/dom/indexedDB/ActorsChild.cpp b/dom/indexedDB/ActorsChild.cpp index 85f876cdc..31437ea05 100644 --- a/dom/indexedDB/ActorsChild.cpp +++ b/dom/indexedDB/ActorsChild.cpp @@ -1,5 +1,4 @@ /* -*- 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/. */ -- cgit v1.2.3