Bug 1458320 - Ignore Indexed DB stored scopes, as they can now be multiple incorrect values and we no longer need them for anything, r=jorendorff
authorSteve Fink <sfink@mozilla.com>
Wed, 02 May 2018 11:07:35 -0700
changeset 472825 04e165cb504fe603c1b61e1b59342bc0556a25dd
parent 472824 b5e19b4c405849b77d148e5c5486eee27d11cbf4
child 472826 2d83e1843241d869a2fc5cf06f96d3af44c70e70
child 472857 64cc95e2a434c8d279e3a3d6ac593b1f7fa698c8
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorendorff
bugs1458320
milestone61.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 1458320 - Ignore Indexed DB stored scopes, as they can now be multiple incorrect values and we no longer need them for anything, r=jorendorff
js/src/vm/StructuredClone.cpp
--- a/js/src/vm/StructuredClone.cpp
+++ b/js/src/vm/StructuredClone.cpp
@@ -2401,22 +2401,19 @@ JSStructuredCloneReader::readHeader()
     if (storedScope < JS::StructuredCloneScope::SameProcessSameThread ||
         storedScope > JS::StructuredCloneScope::DifferentProcessForIndexedDB)
     {
         JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr, JSMSG_SC_BAD_SERIALIZED_DATA,
                                   "invalid structured clone scope");
         return false;
     }
 
-    if (storedScope == JS::StructuredCloneScope::SameProcessSameThread &&
-        allowedScope == JS::StructuredCloneScope::DifferentProcessForIndexedDB)
-    {
-        // Bug 1434308 - allow stored IndexedDB clones to contain what is
-        // essentially DifferentProcess data, but labeled as
-        // SameProcessSameThread (because that's what old code wrote.)
+    if (allowedScope == JS::StructuredCloneScope::DifferentProcessForIndexedDB) {
+        // Bug 1434308 and bug 1458320 - the scopes stored in old IndexedDB
+        // clones are incorrect. Treat them as if they were DifferentProcess.
         allowedScope = JS::StructuredCloneScope::DifferentProcess;
         return true;
     }
 
     if (storedScope < allowedScope) {
         JS_ReportErrorNumberASCII(context(), GetErrorMessage, nullptr,
                                   JSMSG_SC_BAD_SERIALIZED_DATA,
                                   "incompatible structured clone scope");