Backed out 9 changesets (bug 1500948, bug 1500949, bug 1448426, bug 1487249, bug 1500950, bug 1500944) for causing talos crashes on ts_paint | application crashed [@ MOZ_CrashOOL(char const*, int, char const*)]
authorarthur.iakab <aiakab@mozilla.com>
Thu, 22 Nov 2018 07:57:52 +0200
changeset 447675 c12b84f575c3fe48d72f3c8c24a54b3dee1cc985
parent 447674 429776feea6ba796345ef7e41b9c9d367335ef62
child 447676 785032241b2fe327aa833267416b3eb8d846cb4f
child 447727 74b5f34180635ceab4bd899056576e560818f236
push id35085
push userebalazs@mozilla.com
push dateThu, 22 Nov 2018 09:21:47 +0000
treeherdermozilla-central@785032241b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1500948, 1500949, 1448426, 1487249, 1500950, 1500944
milestone65.0a1
backs out429776feea6ba796345ef7e41b9c9d367335ef62
a300e9ae7a01e3821319f7156e24705bd3178a09
fed1a518579affa9d73ea45fb3f36ccf765a7fbf
a71376319ad70f71f955dab9ef53ce424727cb3c
9c5c35cb10aa0d8dfa8be047318d7439db0fb506
b6c97b4db60a1d8169a3e798a248144ab2973506
160a1dbe0be5e4510a6bd1e115c50529014da214
8caf55928df2fe40ebeea48baa33d4042cb7fe9a
176131b18cb4691f1b7e1b1c3d88534815c73b88
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
Backed out 9 changesets (bug 1500948, bug 1500949, bug 1448426, bug 1487249, bug 1500950, bug 1500944) for causing talos crashes on ts_paint | application crashed [@ MOZ_CrashOOL(char const*, int, char const*)] Backed out changeset 429776feea6b (bug 1500950) Backed out changeset a300e9ae7a01 (bug 1500949) Backed out changeset fed1a518579a (bug 1500948) Backed out changeset a71376319ad7 (bug 1500944) Backed out changeset 9c5c35cb10aa (bug 1500944) Backed out changeset b6c97b4db60a (bug 1448426) Backed out changeset 160a1dbe0be5 (bug 1487249) Backed out changeset 8caf55928df2 (bug 1487249) Backed out changeset 176131b18cb4 (bug 1487249)
config/make-stl-wrappers.py
config/make-windows-h-wrapper.py
config/moz.build
config/system_header_util.py
config/windows-h-constant.decls.h
config/windows-h-unicode.decls.h
config/windows-h-wrapper.template.h
docshell/base/BrowsingContext.cpp
docshell/base/BrowsingContext.h
docshell/base/ChromeBrowsingContext.cpp
docshell/base/ChromeBrowsingContext.h
dom/base/moz.build
dom/base/nsDocument.cpp
dom/base/nsFrameLoader.cpp
dom/base/nsFrameLoader.h
dom/base/nsGlobalWindowInner.cpp
dom/base/nsGlobalWindowOuter.cpp
dom/base/nsPIDOMWindow.h
dom/chrome-webidl/BrowsingContext.webidl
dom/chrome-webidl/WindowGlobalActors.webidl
dom/chrome-webidl/moz.build
dom/ipc/ContentChild.cpp
dom/ipc/DOMTypes.ipdlh
dom/ipc/PBrowser.ipdl
dom/ipc/PWindowGlobal.ipdl
dom/ipc/TabChild.cpp
dom/ipc/TabChild.h
dom/ipc/TabParent.cpp
dom/ipc/TabParent.h
dom/ipc/WindowGlobalChild.cpp
dom/ipc/WindowGlobalChild.h
dom/ipc/WindowGlobalParent.cpp
dom/ipc/WindowGlobalParent.h
dom/ipc/moz.build
dom/webidl/FrameLoader.webidl
gfx/cairo/cairo/src/moz.build
gfx/thebes/gfxDWriteFonts.cpp
gfx/vr/service/openvr/moz.build
ipc/glue/InProcessChild.cpp
ipc/glue/InProcessChild.h
ipc/glue/InProcessImpl.cpp
ipc/glue/InProcessParent.cpp
ipc/glue/InProcessParent.h
ipc/glue/MessageChannel.cpp
ipc/glue/MessageChannel.h
ipc/glue/PInProcess.ipdl
ipc/glue/ProtocolUtils.cpp
ipc/glue/ProtocolUtils.h
ipc/glue/moz.build
python/mozbuild/mozbuild/backend/common.py
--- a/config/make-stl-wrappers.py
+++ b/config/make-stl-wrappers.py
@@ -1,17 +1,34 @@
 # 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/.
 from __future__ import print_function
 import os
 import string
 from mozbuild.util import FileAvoidWrite
-from system_header_util import header_path
+
+
+def find_in_path(file, searchpath):
+    for dir in searchpath.split(os.pathsep):
+        f = os.path.join(dir, file)
+        if os.path.exists(f):
+            return f
+    return ''
+
 
+def header_path(header, compiler):
+    if compiler == 'gcc':
+        # we use include_next on gcc
+        return header
+    elif compiler == 'msvc':
+        return find_in_path(header, os.environ.get('INCLUDE', ''))
+    else:
+        # hope someone notices this ...
+        raise NotImplementedError(compiler)
 
 # The 'unused' arg is the output file from the file_generate action. We actually
 # generate all the files in header_list
 
 
 def gen_wrappers(unused, outdir, compiler, template_file, *header_list):
     template = open(template_file, 'r').read()
 
deleted file mode 100644
--- a/config/make-windows-h-wrapper.py
+++ /dev/null
@@ -1,86 +0,0 @@
-# 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/.
-
-import re
-import textwrap
-import string
-from system_header_util import header_path
-
-comment_re = re.compile(r'//[^\n]*\n|/\*.*\*/', re.S)
-decl_re = re.compile(r'''^(.+)\s+        # type
-                         (\w+)\s*        # name
-                         (?:\((.*)\))?$  # optional param tys
-                         ''', re.X | re.S)
-
-
-def read_decls(filename):
-    """Parse & yield C-style decls from an input file"""
-    with open(filename, 'r') as fd:
-        # Strip comments from the source text.
-        text = comment_re.sub('', fd.read())
-
-        # Parse individual declarations.
-        raw_decls = [d.strip() for d in text.split(';') if d.strip()]
-        for raw in raw_decls:
-            match = decl_re.match(raw)
-            if match is None:
-                raise "Invalid decl: %s" % raw
-
-            ty, name, params = match.groups()
-            if params is not None:
-                params = [a.strip() for a in params.split(',') if a.strip()]
-            yield ty, name, params
-
-
-def generate(fd, consts_path, unicodes_path, template_path, compiler):
-    # Parse the template
-    with open(template_path, 'r') as template_fd:
-        template = string.Template(template_fd.read())
-
-    decls = ''
-
-    # Each constant should be saved to a temporary, and then re-assigned to a
-    # constant with the correct name, allowing the value to be determined by
-    # the actual definition.
-    for ty, name, args in read_decls(consts_path):
-        assert args is None, "parameters in const decl!"
-
-        decls += textwrap.dedent("""
-            #ifdef {name}
-            constexpr {ty} _tmp_{name} = {name};
-            #undef {name}
-            constexpr {ty} {name} = _tmp_{name};
-            #endif
-            """.format(ty=ty, name=name))
-
-    # Each unicode declaration defines a static inline function with the
-    # correct types which calls the 'A' or 'W'-suffixed versions of the
-    # function. Full types are required here to ensure that '0' to 'nullptr'
-    # coersions are preserved.
-    for ty, name, args in read_decls(unicodes_path):
-        assert args is not None, "argument list required for unicode decl"
-
-        # Parameter & argument string list
-        params = ', '.join('%s a%d' % (ty, i) for i, ty in enumerate(args))
-        args = ', '.join('a%d' % i for i in range(len(args)))
-
-        decls += textwrap.dedent("""
-            #ifdef {name}
-            #undef {name}
-            static inline {ty} WINAPI
-            {name}({params})
-            {{
-            #ifdef UNICODE
-              return {name}W({args});
-            #else
-              return {name}A({args});
-            #endif
-            }}
-            #endif
-            """.format(ty=ty, name=name, params=params, args=args))
-
-    path = header_path('windows.h', compiler)
-
-    # Write out the resulting file
-    fd.write(template.substitute(header_path=path, decls=decls))
--- a/config/moz.build
+++ b/config/moz.build
@@ -58,29 +58,16 @@ if CONFIG['WRAP_STL_INCLUDES']:
         # the files in gen_wrappers()
         outputs = tuple(['stl.sentinel'] + ['%s/%s' % (output_dir, h) for h in stl_headers])
         GENERATED_FILES += [outputs]
         stl = GENERATED_FILES[outputs]
         stl.script = 'make-stl-wrappers.py:gen_wrappers'
         stl.flags = [output_dir, stl_compiler, template_file]
         stl.flags.extend(stl_headers)
 
-    # Wrap <windows.h> to make it easier to use correctly
-    # NOTE: If we aren't wrapping STL includes, we're building part of the browser
-    # which won't need this wrapper, such as L10N. Just don't try to generate the
-    # wrapper in that case.
-    if CONFIG['OS_ARCH'] == 'WINNT':
-        GENERATED_FILES += ['../dist/stl_wrappers/windows.h']
-        windows_h = GENERATED_FILES['../dist/stl_wrappers/windows.h']
-        windows_h.script = 'make-windows-h-wrapper.py:generate'
-        windows_h.inputs = ['windows-h-constant.decls.h',
-                            'windows-h-unicode.decls.h',
-                            'windows-h-wrapper.template.h']
-        windows_h.flags = [stl_compiler]
-
 if CONFIG['WRAP_SYSTEM_INCLUDES']:
     include('system-headers.mozbuild')
     output_dir = '../dist/system_wrappers'
     outputs = tuple(['system-header.sentinel'] + ['%s/%s' % (output_dir, h) for h in stl_headers + system_headers])
     GENERATED_FILES += [outputs]
     system = GENERATED_FILES[outputs]
     system.script = 'make-system-wrappers.py:gen_wrappers'
     system.flags = [output_dir]
deleted file mode 100644
--- a/config/system_header_util.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import os
-
-
-def find_in_path(file, searchpath):
-    for dir in searchpath.split(os.pathsep):
-        f = os.path.join(dir, file)
-        if os.path.exists(f):
-            return f
-    return ''
-
-
-def header_path(header, compiler):
-    if compiler == 'gcc':
-        # we use include_next on gcc
-        return header
-    elif compiler == 'msvc':
-        return find_in_path(header, os.environ.get('INCLUDE', ''))
-    else:
-        # hope someone notices this ...
-        raise NotImplementedError(compiler)
deleted file mode 100644
--- a/config/windows-h-constant.decls.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=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/. */
-
-/*
- * This file contains a series of C-style declarations for constants defined in
- * windows.h using #define. Adding a new constant should be a simple as adding
- * its name (and optionally type) to this file.
- *
- * This file is processed by generate-windows-h-wrapper.py to generate a wrapper
- * for the header which removes the defines usually implementing these constants.
- *
- * Wrappers defined in this file will be declared as `constexpr` values,
- * and will have their value derived from the windows.h define.
- *
- * NOTE: This is *NOT* a real C header, but rather an input to the avove script.
- * Only basic declarations in the form found here are allowed.
- */
-
-// XXX(nika): There are a lot of these (>30k)!
-// This is just a set of ones I saw in a quick scan which looked problematic.
-
-auto CREATE_NEW;
-auto CREATE_ALWAYS;
-auto OPEN_EXISTING;
-auto OPEN_ALWAYS;
-auto TRUNCATE_EXISTING;
-auto INVALID_FILE_SIZE;
-auto INVALID_SET_FILE_POINTER;
-auto INVALID_FILE_ATTRIBUTES;
-
-auto ANSI_NULL;
-auto UNICODE_NULL;
-
-auto MINCHAR;
-auto MAXCHAR;
-auto MINSHORT;
-auto MAXSHORT;
-auto MINLONG;
-auto MAXLONG;
-auto MAXBYTE;
-auto MAXWORD;
-auto MAXDWORD;
-
-auto DELETE;
-auto READ_CONTROL;
-auto WRITE_DAC;
-auto WRITE_OWNER;
-auto SYNCHRONIZE;
-
-auto MAXIMUM_ALLOWED;
-auto GENERIC_READ;
-auto GENERIC_WRITE;
-auto GENERIC_EXECUTE;
-auto GENERIC_ALL;
deleted file mode 100644
--- a/config/windows-h-unicode.decls.h
+++ /dev/null
@@ -1,1052 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=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/. */
-
-/*
- * This file contains a series of C-style function prototypes for A/W-suffixed
- * Win32 APIs defined by windows.h.
- *
- * This file is processed by generate-windows-h-wrapper.py to generate a wrapper
- * for the header which removes the defines usually implementing these aliases.
- *
- * Wrappers defined in this file will have the 'stdcall' calling convention,
- * will be defined as 'inline', and will only be defined if the corresponding
- * #define directive has not been #undef-ed.
- *
- * NOTE: This is *NOT* a real C header, but rather an input to the avove script.
- * Only basic declarations in the form found here are allowed.
- */
-
-LPTSTR GetCommandLine();
-
-BOOL FreeEnvironmentStrings(LPTCH);
-
-DWORD GetEnvironmentVariable(LPCTSTR, LPTSTR, DWORD);
-
-BOOL SetEnvironmentVariable(LPCTSTR, LPCTSTR);
-
-DWORD ExpandEnvironmentStrings(LPCTSTR, LPTSTR, DWORD);
-
-BOOL SetCurrentDirectory(LPCTSTR);
-
-DWORD GetCurrentDirectory(DWORD, LPTSTR);
-
-DWORD SearchPath(LPCTSTR, LPCTSTR, LPCTSTR, DWORD, LPTSTR, LPTSTR*);
-
-BOOL NeedCurrentDirectoryForExePath(LPCTSTR);
-
-BOOL CreateDirectory(LPCTSTR, LPSECURITY_ATTRIBUTES);
-
-HANDLE CreateFile(LPCTSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE);
-
-BOOL DeleteFile(LPCTSTR);
-
-HANDLE FindFirstChangeNotification(LPCTSTR, BOOL, DWORD);
-
-HANDLE FindFirstFile(LPCTSTR, LPWIN32_FIND_DATA);
-
-HANDLE FindFirstFileEx(LPCTSTR, FINDEX_INFO_LEVELS, LPVOID, FINDEX_SEARCH_OPS, LPVOID, DWORD);
-
-BOOL FindNextFile(HANDLE, LPWIN32_FIND_DATA);
-
-BOOL GetDiskFreeSpace(LPCTSTR, LPDWORD, LPDWORD, LPDWORD, LPDWORD);
-
-BOOL GetDiskFreeSpaceEx(LPCTSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER);
-
-UINT GetDriveType(LPCTSTR);
-
-DWORD GetFileAttributes(LPCTSTR);
-
-BOOL GetFileAttributesEx(LPCTSTR, GET_FILEEX_INFO_LEVELS, LPVOID);
-
-DWORD GetFinalPathNameByHandle(HANDLE, LPTSTR, DWORD, DWORD);
-
-DWORD GetFullPathName(LPCTSTR, DWORD, LPTSTR, LPTSTR*);
-
-DWORD GetLongPathName(LPCTSTR, LPTSTR, DWORD);
-
-BOOL RemoveDirectory(LPCTSTR);
-
-BOOL SetFileAttributes(LPCTSTR, DWORD);
-
-DWORD GetCompressedFileSize(LPCTSTR, LPDWORD);
-
-DWORD GetTempPath(DWORD, LPTSTR);
-
-BOOL GetVolumeInformation(LPCTSTR, LPTSTR, DWORD, LPDWORD, LPDWORD, LPDWORD, LPTSTR, DWORD);
-
-UINT GetTempFileName(LPCTSTR, LPCTSTR, UINT, LPTSTR);
-
-void OutputDebugString(LPCTSTR);
-
-void FatalAppExit(UINT, LPCTSTR);
-
-HANDLE CreateMutex(LPSECURITY_ATTRIBUTES, BOOL, LPCTSTR);
-
-HANDLE CreateEvent(LPSECURITY_ATTRIBUTES, BOOL, BOOL, LPCTSTR);
-
-HANDLE OpenEvent(DWORD, BOOL, LPCTSTR);
-
-HANDLE CreateMutexEx(LPSECURITY_ATTRIBUTES, LPCTSTR, DWORD, DWORD);
-
-HANDLE CreateEventEx(LPSECURITY_ATTRIBUTES, LPCTSTR, DWORD, DWORD);
-
-BOOL CreateProcess(LPCTSTR, LPTSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPCTSTR, LPSTARTUPINFO, LPPROCESS_INFORMATION);
-
-BOOL CreateProcessAsUser(HANDLE, LPCTSTR, LPTSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPCTSTR, LPSTARTUPINFO, LPPROCESS_INFORMATION);
-
-UINT GetSystemDirectory(LPTSTR, UINT);
-
-UINT GetWindowsDirectory(LPTSTR, UINT);
-
-UINT GetSystemWindowsDirectory(LPTSTR, UINT);
-
-BOOL GetComputerNameEx(COMPUTER_NAME_FORMAT, LPTSTR, LPDWORD);
-
-BOOL GetVersionEx(LPOSVERSIONINFO);
-
-BOOL SetComputerName(LPCTSTR);
-
-BOOL SetComputerNameEx(COMPUTER_NAME_FORMAT, LPCTSTR);
-
-BOOL LoadEnclaveImage(LPVOID, LPCTSTR);
-
-UINT GetSystemWow64Directory(LPTSTR, UINT);
-
-DWORD GetModuleFileName(HMODULE, LPTSTR, DWORD);
-
-HMODULE GetModuleHandle(LPCTSTR);
-
-BOOL GetModuleHandleEx(DWORD, LPCTSTR, HMODULE*);
-
-HMODULE LoadLibraryEx(LPCTSTR, HANDLE, DWORD);
-
-int LoadString(HINSTANCE, UINT, LPTSTR, int);
-
-BOOL EnumResourceLanguagesEx(HMODULE, LPCTSTR, LPCTSTR, ENUMRESLANGPROC, LONG_PTR, DWORD, LANGID);
-
-BOOL EnumResourceNamesEx(HMODULE, LPCTSTR, ENUMRESNAMEPROC, LONG_PTR, DWORD, LANGID);
-
-BOOL EnumResourceTypesEx(HMODULE, ENUMRESTYPEPROC, LONG_PTR, DWORD, LANGID);
-
-HMODULE LoadLibrary(LPCTSTR);
-
-BOOL GetBinaryType(LPCTSTR, LPDWORD);
-
-DWORD GetShortPathName(LPCTSTR, LPTSTR, DWORD);
-
-DWORD GetLongPathNameTransacted(LPCTSTR, LPTSTR, DWORD, HANDLE);
-
-BOOL SetEnvironmentStrings(LPTCH);
-
-BOOL SetFileShortName(HANDLE, LPCTSTR);
-
-DWORD FormatMessage(DWORD, LPCVOID, DWORD, DWORD, LPTSTR, DWORD, va_list *);
-
-HANDLE CreateMailslot(LPCTSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES);
-
-BOOL EncryptFile(LPCTSTR);
-
-BOOL DecryptFile(LPCTSTR, DWORD);
-
-BOOL FileEncryptionStatus(LPCTSTR, LPDWORD);
-
-DWORD OpenEncryptedFileRaw(LPCTSTR, ULONG, PVOID *);
-
-HANDLE OpenMutex(DWORD, BOOL, LPCTSTR);
-
-HANDLE CreateSemaphore(LPSECURITY_ATTRIBUTES, LONG, LONG, LPCTSTR);
-
-HANDLE OpenSemaphore(DWORD, BOOL, LPCTSTR);
-
-HANDLE CreateWaitableTimer(LPSECURITY_ATTRIBUTES, BOOL, LPCTSTR);
-
-HANDLE OpenWaitableTimer(DWORD, BOOL, LPCTSTR);
-
-HANDLE CreateSemaphoreEx(LPSECURITY_ATTRIBUTES, LONG, LONG, LPCTSTR, DWORD, DWORD);
-
-HANDLE CreateWaitableTimerEx(LPSECURITY_ATTRIBUTES, LPCTSTR, DWORD, DWORD);
-
-HANDLE CreateFileMapping(HANDLE, LPSECURITY_ATTRIBUTES, DWORD, DWORD, DWORD, LPCTSTR);
-
-HANDLE CreateFileMappingNuma(HANDLE, LPSECURITY_ATTRIBUTES, DWORD, DWORD, DWORD, LPCTSTR, DWORD);
-
-HANDLE OpenFileMapping(DWORD, BOOL, LPCTSTR);
-
-DWORD GetLogicalDriveStrings(DWORD, LPTSTR);
-
-void GetStartupInfo(LPSTARTUPINFO);
-
-DWORD GetFirmwareEnvironmentVariable(LPCTSTR, LPCTSTR, PVOID, DWORD);
-
-BOOL SetFirmwareEnvironmentVariable(LPCTSTR, LPCTSTR, PVOID, DWORD);
-
-HRSRC FindResource(HMODULE, LPCTSTR, LPCTSTR);
-
-HRSRC FindResourceEx(HMODULE, LPCTSTR, LPCTSTR, WORD);
-
-BOOL EnumResourceTypes(HMODULE, ENUMRESTYPEPROC, LONG_PTR);
-
-BOOL EnumResourceNames(HMODULE, LPCTSTR, ENUMRESNAMEPROC, LONG_PTR);
-
-BOOL EnumResourceLanguages(HMODULE, LPCTSTR, LPCTSTR, ENUMRESLANGPROC, LONG_PTR);
-
-HANDLE BeginUpdateResource(LPCTSTR, BOOL);
-
-BOOL UpdateResource(HANDLE, LPCTSTR, LPCTSTR, WORD, LPVOID, DWORD);
-
-BOOL EndUpdateResource(HANDLE, BOOL);
-
-ATOM GlobalAddAtom(LPCTSTR);
-
-ATOM GlobalAddAtomEx(LPCTSTR, DWORD);
-
-ATOM GlobalFindAtom(LPCTSTR);
-
-UINT GlobalGetAtomName(ATOM, LPTSTR, int);
-
-ATOM AddAtom(LPCTSTR);
-
-ATOM FindAtom(LPCTSTR);
-
-UINT GetAtomName(ATOM, LPTSTR, int);
-
-UINT GetProfileInt(LPCTSTR, LPCTSTR, INT);
-
-DWORD GetProfileString(LPCTSTR, LPCTSTR, LPCTSTR, LPTSTR, DWORD);
-
-BOOL WriteProfileString(LPCTSTR, LPCTSTR, LPCTSTR);
-
-DWORD GetProfileSection(LPCTSTR, LPTSTR, DWORD);
-
-BOOL WriteProfileSection(LPCTSTR, LPCTSTR);
-
-UINT GetPrivateProfileInt(LPCTSTR, LPCTSTR, INT, LPCTSTR);
-
-DWORD GetPrivateProfileString(LPCTSTR, LPCTSTR, LPCTSTR, LPTSTR, DWORD, LPCTSTR);
-
-BOOL WritePrivateProfileString(LPCTSTR, LPCTSTR, LPCTSTR, LPCTSTR);
-
-DWORD GetPrivateProfileSection(LPCTSTR, LPTSTR, DWORD, LPCTSTR);
-
-BOOL WritePrivateProfileSection(LPCTSTR, LPCTSTR, LPCTSTR);
-
-DWORD GetPrivateProfileSectionNames(LPTSTR, DWORD, LPCTSTR);
-
-BOOL GetPrivateProfileStruct(LPCTSTR, LPCTSTR, LPVOID, UINT, LPCTSTR);
-
-BOOL WritePrivateProfileStruct(LPCTSTR, LPCTSTR, LPVOID, UINT, LPCTSTR);
-
-BOOL SetDllDirectory(LPCTSTR);
-
-DWORD GetDllDirectory(DWORD, LPTSTR);
-
-BOOL CreateDirectoryEx(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES);
-
-BOOL CreateDirectoryTransacted(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES, HANDLE);
-
-BOOL RemoveDirectoryTransacted(LPCTSTR, HANDLE);
-
-DWORD GetFullPathNameTransacted(LPCTSTR, DWORD, LPTSTR, LPTSTR *, HANDLE);
-
-BOOL DefineDosDevice(DWORD, LPCTSTR, LPCTSTR);
-
-DWORD QueryDosDevice(LPCTSTR, LPTSTR, DWORD);
-
-HANDLE CreateFileTransacted(LPCTSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE, HANDLE, PUSHORT, PVOID);
-
-BOOL SetFileAttributesTransacted(LPCTSTR, DWORD, HANDLE);
-
-BOOL GetFileAttributesTransacted(LPCTSTR, GET_FILEEX_INFO_LEVELS, LPVOID, HANDLE);
-
-DWORD GetCompressedFileSizeTransacted(LPCTSTR, LPDWORD, HANDLE);
-
-BOOL DeleteFileTransacted(LPCTSTR, HANDLE);
-
-BOOL CheckNameLegalDOS8Dot3(LPCTSTR, LPSTR, DWORD, PBOOL, PBOOL);
-
-HANDLE FindFirstFileTransacted(LPCTSTR, FINDEX_INFO_LEVELS, LPVOID, FINDEX_SEARCH_OPS, LPVOID, DWORD, HANDLE);
-
-BOOL CopyFile(LPCTSTR, LPCTSTR, BOOL);
-
-BOOL CopyFileEx(LPCTSTR, LPCTSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD);
-
-BOOL CopyFileTransacted(LPCTSTR, LPCTSTR, LPPROGRESS_ROUTINE, LPVOID, LPBOOL, DWORD, HANDLE);
-
-BOOL MoveFile(LPCTSTR, LPCTSTR);
-
-BOOL MoveFileEx(LPCTSTR, LPCTSTR, DWORD);
-
-BOOL MoveFileWithProgress(LPCTSTR, LPCTSTR, LPPROGRESS_ROUTINE, LPVOID, DWORD);
-
-BOOL MoveFileTransacted(LPCTSTR, LPCTSTR, LPPROGRESS_ROUTINE, LPVOID, DWORD, HANDLE);
-
-BOOL ReplaceFile(LPCTSTR, LPCTSTR, LPCTSTR, DWORD, LPVOID, LPVOID);
-
-BOOL CreateHardLink(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES);
-
-BOOL CreateHardLinkTransacted(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES, HANDLE);
-
-HANDLE CreateNamedPipe(LPCTSTR, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPSECURITY_ATTRIBUTES);
-
-BOOL GetNamedPipeHandleState(HANDLE, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPTSTR, DWORD);
-
-BOOL CallNamedPipe(LPCTSTR, LPVOID, DWORD, LPVOID, DWORD, LPDWORD, DWORD);
-
-BOOL WaitNamedPipe(LPCTSTR, DWORD);
-
-BOOL GetNamedPipeClientComputerName(HANDLE, LPTSTR, ULONG);
-
-BOOL SetVolumeLabel(LPCTSTR, LPCTSTR);
-
-BOOL ClearEventLog(HANDLE, LPCTSTR);
-
-BOOL BackupEventLog(HANDLE, LPCTSTR);
-
-HANDLE OpenEventLog(LPCTSTR, LPCTSTR);
-
-HANDLE RegisterEventSource(LPCTSTR, LPCTSTR);
-
-HANDLE OpenBackupEventLog(LPCTSTR, LPCTSTR);
-
-BOOL ReadEventLog(HANDLE, DWORD, DWORD, LPVOID, DWORD, DWORD *, DWORD *);
-
-BOOL ReportEvent(HANDLE, WORD, WORD, DWORD, PSID, WORD, DWORD, LPCTSTR *, LPVOID);
-
-BOOL AccessCheckAndAuditAlarm(LPCTSTR, LPVOID, LPTSTR, LPTSTR, PSECURITY_DESCRIPTOR, DWORD, PGENERIC_MAPPING, BOOL, LPDWORD, LPBOOL, LPBOOL);
-
-BOOL AccessCheckByTypeAndAuditAlarm(LPCTSTR, LPVOID, LPCTSTR, LPCTSTR, PSECURITY_DESCRIPTOR, PSID, DWORD, AUDIT_EVENT_TYPE, DWORD, POBJECT_TYPE_LIST, DWORD, PGENERIC_MAPPING, BOOL, LPDWORD, LPBOOL, LPBOOL);
-
-BOOL AccessCheckByTypeResultListAndAuditAlarm(LPCTSTR, LPVOID, LPCTSTR, LPCTSTR, PSECURITY_DESCRIPTOR, PSID, DWORD, AUDIT_EVENT_TYPE, DWORD, POBJECT_TYPE_LIST, DWORD, PGENERIC_MAPPING, BOOL, LPDWORD, LPDWORD, LPBOOL);
-
-BOOL AccessCheckByTypeResultListAndAuditAlarmByHandle(LPCTSTR, LPVOID, HANDLE, LPCTSTR, LPCTSTR, PSECURITY_DESCRIPTOR, PSID, DWORD, AUDIT_EVENT_TYPE, DWORD, POBJECT_TYPE_LIST, DWORD, PGENERIC_MAPPING, BOOL, LPDWORD, LPDWORD, LPBOOL);
-
-BOOL ObjectOpenAuditAlarm(LPCTSTR, LPVOID, LPTSTR, LPTSTR, PSECURITY_DESCRIPTOR, HANDLE, DWORD, DWORD, PPRIVILEGE_SET, BOOL, BOOL, LPBOOL);
-
-BOOL ObjectPrivilegeAuditAlarm(LPCTSTR, LPVOID, HANDLE, DWORD, PPRIVILEGE_SET, BOOL);
-
-BOOL ObjectCloseAuditAlarm(LPCTSTR, LPVOID, BOOL);
-
-BOOL ObjectDeleteAuditAlarm(LPCTSTR, LPVOID, BOOL);
-
-BOOL PrivilegedServiceAuditAlarm(LPCTSTR, LPCTSTR, HANDLE, PPRIVILEGE_SET, BOOL);
-
-BOOL SetFileSecurity(LPCTSTR, SECURITY_INFORMATION, PSECURITY_DESCRIPTOR);
-
-BOOL GetFileSecurity(LPCTSTR, SECURITY_INFORMATION, PSECURITY_DESCRIPTOR, DWORD, LPDWORD);
-
-BOOL IsBadStringPtr(LPCTSTR, UINT_PTR);
-
-BOOL LookupAccountSid(LPCTSTR, PSID, LPTSTR, LPDWORD, LPTSTR, LPDWORD, PSID_NAME_USE);
-
-BOOL LookupAccountName(LPCTSTR, LPCTSTR, PSID, LPDWORD, LPTSTR, LPDWORD, PSID_NAME_USE);
-
-BOOL LookupAccountNameLocal(LPCTSTR, PSID, LPDWORD, LPTSTR, LPDWORD, PSID_NAME_USE);
-
-BOOL LookupAccountSidLocal(PSID, LPTSTR, LPDWORD, LPTSTR, LPDWORD, PSID_NAME_USE);
-
-BOOL LookupPrivilegeValue(LPCTSTR, LPCTSTR, PLUID);
-
-BOOL LookupPrivilegeName(LPCTSTR, PLUID, LPTSTR, LPDWORD);
-
-BOOL LookupPrivilegeDisplayName(LPCTSTR, LPCTSTR, LPTSTR, LPDWORD, LPDWORD);
-
-BOOL BuildCommDCB(LPCTSTR, LPDCB);
-
-BOOL BuildCommDCBAndTimeouts(LPCTSTR, LPDCB, LPCOMMTIMEOUTS);
-
-BOOL CommConfigDialog(LPCTSTR, HWND, LPCOMMCONFIG);
-
-BOOL GetDefaultCommConfig(LPCTSTR, LPCOMMCONFIG, LPDWORD);
-
-BOOL SetDefaultCommConfig(LPCTSTR, LPCOMMCONFIG, DWORD);
-
-BOOL GetComputerName(LPTSTR, LPDWORD);
-
-BOOL DnsHostnameToComputerName(LPCTSTR, LPTSTR, LPDWORD);
-
-BOOL GetUserName(LPTSTR, LPDWORD);
-
-BOOL LogonUser(LPCTSTR, LPCTSTR, LPCTSTR, DWORD, DWORD, PHANDLE);
-
-BOOL LogonUserEx(LPCTSTR, LPCTSTR, LPCTSTR, DWORD, DWORD, PHANDLE, PSID *, PVOID *, LPDWORD, PQUOTA_LIMITS);
-
-HANDLE CreatePrivateNamespace(LPSECURITY_ATTRIBUTES, LPVOID, LPCTSTR);
-
-HANDLE OpenPrivateNamespace(LPVOID, LPCTSTR);
-
-HANDLE CreateBoundaryDescriptor(LPCTSTR, ULONG);
-
-BOOL GetCurrentHwProfile(LPHW_PROFILE_INFO);
-
-BOOL VerifyVersionInfo(LPOSVERSIONINFOEX, DWORD, DWORDLONG);
-
-HANDLE CreateJobObject(LPSECURITY_ATTRIBUTES, LPCTSTR);
-
-HANDLE OpenJobObject(DWORD, BOOL, LPCTSTR);
-
-HANDLE FindFirstVolume(LPTSTR, DWORD);
-
-BOOL FindNextVolume(HANDLE, LPTSTR, DWORD);
-
-HANDLE FindFirstVolumeMountPoint(LPCTSTR, LPTSTR, DWORD);
-
-BOOL FindNextVolumeMountPoint(HANDLE, LPTSTR, DWORD);
-
-BOOL SetVolumeMountPoint(LPCTSTR, LPCTSTR);
-
-BOOL DeleteVolumeMountPoint(LPCTSTR);
-
-BOOL GetVolumeNameForVolumeMountPoint(LPCTSTR, LPTSTR, DWORD);
-
-BOOL GetVolumePathName(LPCTSTR, LPTSTR, DWORD);
-
-BOOL GetVolumePathNamesForVolumeName(LPCTSTR, LPTCH, DWORD, PDWORD);
-
-HANDLE CreateActCtx(PCACTCTX);
-
-BOOL FindActCtxSectionString(DWORD, const GUID *, ULONG, LPCTSTR, PACTCTX_SECTION_KEYED_DATA);
-
-BOOLEAN CreateSymbolicLink(LPCTSTR, LPCTSTR, DWORD);
-
-BOOLEAN CreateSymbolicLinkTransacted(LPCTSTR, LPCTSTR, DWORD, HANDLE);
-
-int AddFontResource(LPCTSTR);
-
-HMETAFILE CopyMetaFile(HMETAFILE, LPCTSTR);
-
-HDC CreateDC(LPCTSTR, LPCTSTR, LPCTSTR, const DEVMODE *);
-
-HFONT CreateFontIndirect(const LOGFONT *);
-
-HFONT CreateFont(int, int, int, int, int, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPCTSTR);
-
-HDC CreateIC(LPCTSTR, LPCTSTR, LPCTSTR, const DEVMODE *);
-
-HDC CreateMetaFile(LPCTSTR);
-
-BOOL CreateScalableFontResource(DWORD, LPCTSTR, LPCTSTR, LPCTSTR);
-
-int DeviceCapabilities(LPCTSTR, LPCTSTR, WORD, LPTSTR, const DEVMODE *);
-
-int EnumFontFamiliesEx(HDC, LPLOGFONT, FONTENUMPROC, LPARAM, DWORD);
-
-int EnumFontFamilies(HDC, LPCTSTR, FONTENUMPROC, LPARAM);
-
-int EnumFonts(HDC, LPCTSTR, FONTENUMPROC, LPARAM);
-
-BOOL GetCharWidth(HDC, UINT, UINT, LPINT);
-
-BOOL GetCharWidth32(HDC, UINT, UINT, LPINT);
-
-BOOL GetCharWidthFloat(HDC, UINT, UINT, PFLOAT);
-
-BOOL GetCharABCWidths(HDC, UINT, UINT, LPABC);
-
-BOOL GetCharABCWidthsFloat(HDC, UINT, UINT, LPABCFLOAT);
-
-DWORD GetGlyphOutline(HDC, UINT, UINT, LPGLYPHMETRICS, DWORD, LPVOID, const MAT2 *);
-
-HMETAFILE GetMetaFile(LPCTSTR);
-
-UINT GetOutlineTextMetrics(HDC, UINT, LPOUTLINETEXTMETRIC);
-
-BOOL GetTextExtentPoint(HDC, LPCTSTR, int, LPSIZE);
-
-BOOL GetTextExtentPoint32(HDC, LPCTSTR, int, LPSIZE);
-
-BOOL GetTextExtentExPoint(HDC, LPCTSTR, int, int, LPINT, LPINT, LPSIZE);
-
-DWORD GetCharacterPlacement(HDC, LPCTSTR, int, int, LPGCP_RESULTS, DWORD);
-
-DWORD GetGlyphIndices(HDC, LPCTSTR, int, LPWORD, DWORD);
-
-int AddFontResourceEx(LPCTSTR, DWORD, PVOID);
-
-BOOL RemoveFontResourceEx(LPCTSTR, DWORD, PVOID);
-
-HFONT CreateFontIndirectEx(const ENUMLOGFONTEXDV *);
-
-HDC ResetDC(HDC, const DEVMODE *);
-
-BOOL RemoveFontResource(LPCTSTR);
-
-HENHMETAFILE CopyEnhMetaFile(HENHMETAFILE, LPCTSTR);
-
-HDC CreateEnhMetaFile(HDC, LPCTSTR, const RECT *, LPCTSTR);
-
-HENHMETAFILE GetEnhMetaFile(LPCTSTR);
-
-UINT GetEnhMetaFileDescription(HENHMETAFILE, UINT, LPTSTR);
-
-BOOL GetTextMetrics(HDC, LPTEXTMETRIC);
-
-int StartDoc(HDC, const DOCINFO *);
-
-int GetObject(HANDLE, int, LPVOID);
-
-BOOL TextOut(HDC, int, int, LPCTSTR, int);
-
-BOOL ExtTextOut(HDC, int, int, UINT, const RECT *, LPCTSTR, UINT, const INT *);
-
-BOOL PolyTextOut(HDC, const POLYTEXT *, int);
-
-int GetTextFace(HDC, int, LPTSTR);
-
-DWORD GetKerningPairs(HDC, DWORD, LPKERNINGPAIR);
-
-BOOL GetLogColorSpace(HCOLORSPACE, LPLOGCOLORSPACE, DWORD);
-
-HCOLORSPACE CreateColorSpace(LPLOGCOLORSPACE);
-
-BOOL GetICMProfile(HDC, LPDWORD, LPTSTR);
-
-BOOL SetICMProfile(HDC, LPTSTR);
-
-int EnumICMProfiles(HDC, ICMENUMPROC, LPARAM);
-
-BOOL UpdateICMRegKey(DWORD, LPTSTR, LPTSTR, UINT);
-
-HKL LoadKeyboardLayout(LPCTSTR, UINT);
-
-BOOL GetKeyboardLayoutName(LPTSTR);
-
-HDESK CreateDesktop(LPCTSTR, LPCTSTR, DEVMODE*, DWORD, ACCESS_MASK, LPSECURITY_ATTRIBUTES);
-
-HDESK CreateDesktopEx(LPCTSTR, LPCTSTR, DEVMODE*, DWORD, ACCESS_MASK, LPSECURITY_ATTRIBUTES, ULONG, PVOID);
-
-HDESK OpenDesktop(LPCTSTR, DWORD, BOOL, ACCESS_MASK);
-
-BOOL EnumDesktops(HWINSTA, DESKTOPENUMPROC, LPARAM);
-
-HWINSTA CreateWindowStation(LPCTSTR, DWORD, ACCESS_MASK, LPSECURITY_ATTRIBUTES);
-
-HWINSTA OpenWindowStation(LPCTSTR, BOOL, ACCESS_MASK);
-
-BOOL EnumWindowStations(WINSTAENUMPROC, LPARAM);
-
-BOOL GetUserObjectInformation(HANDLE, int, PVOID, DWORD, LPDWORD);
-
-BOOL SetUserObjectInformation(HANDLE, int, PVOID, DWORD);
-
-UINT RegisterWindowMessage(LPCTSTR);
-
-BOOL GetMessage(LPMSG, HWND, UINT, UINT);
-
-LRESULT DispatchMessage(const MSG *);
-
-BOOL PeekMessage(LPMSG, HWND, UINT, UINT, UINT);
-
-LRESULT SendMessage(HWND, UINT, WPARAM, LPARAM);
-
-LRESULT SendMessageTimeout(HWND, UINT, WPARAM, LPARAM, UINT, UINT, PDWORD_PTR);
-
-BOOL SendNotifyMessage(HWND, UINT, WPARAM, LPARAM);
-
-BOOL SendMessageCallback(HWND, UINT, WPARAM, LPARAM, SENDASYNCPROC, ULONG_PTR);
-
-long BroadcastSystemMessageEx(DWORD, LPDWORD, UINT, WPARAM, LPARAM, PBSMINFO);
-
-long BroadcastSystemMessage(DWORD, LPDWORD, UINT, WPARAM, LPARAM);
-
-HDEVNOTIFY RegisterDeviceNotification(HANDLE, LPVOID, DWORD);
-
-BOOL PostMessage(HWND, UINT, WPARAM, LPARAM);
-
-BOOL PostThreadMessage(DWORD, UINT, WPARAM, LPARAM);
-
-BOOL PostAppMessage(DWORD, UINT, WPARAM, LPARAM);
-
-LRESULT DefWindowProc(HWND, UINT, WPARAM, LPARAM);
-
-LRESULT CallWindowProc(WNDPROC, HWND, UINT, WPARAM, LPARAM);
-
-ATOM RegisterClass(const WNDCLASS *);
-
-BOOL UnregisterClass(LPCTSTR, HINSTANCE);
-
-BOOL GetClassInfo(HINSTANCE, LPCTSTR, LPWNDCLASS);
-
-ATOM RegisterClassEx(const WNDCLASSEX *);
-
-BOOL GetClassInfoEx(HINSTANCE, LPCTSTR, LPWNDCLASSEX);
-
-HWND CreateWindowEx(DWORD, LPCTSTR, LPCTSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID);
-
-HWND CreateWindow(LPCTSTR, LPCTSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID);
-
-HWND CreateDialogParam(HINSTANCE, LPCTSTR, HWND, DLGPROC, LPARAM);
-
-HWND CreateDialogIndirectParam(HINSTANCE, LPCDLGTEMPLATE, HWND, DLGPROC, LPARAM);
-
-HWND CreateDialog(HINSTANCE, LPCTSTR, HWND, DLGPROC);
-
-HWND CreateDialogIndirect(HINSTANCE, LPCDLGTEMPLATE, HWND, DLGPROC);
-
-INT_PTR DialogBoxParam(HINSTANCE, LPCTSTR, HWND, DLGPROC, LPARAM);
-
-INT_PTR DialogBoxIndirectParam(HINSTANCE, LPCDLGTEMPLATE, HWND, DLGPROC, LPARAM);
-
-INT_PTR DialogBox(HINSTANCE, LPCTSTR, HWND, DLGPROC);
-
-INT_PTR DialogBoxIndirect(HINSTANCE, LPCDLGTEMPLATE, HWND, DLGPROC);
-
-BOOL SetDlgItemText(HWND, int, LPCTSTR);
-
-UINT GetDlgItemText(HWND, int, LPTSTR, int);
-
-LRESULT SendDlgItemMessage(HWND, int, UINT, WPARAM, LPARAM);
-
-LRESULT DefDlgProc(HWND, UINT, WPARAM, LPARAM);
-
-BOOL CallMsgFilter(LPMSG, int);
-
-UINT RegisterClipboardFormat(LPCTSTR);
-
-int GetClipboardFormatName(UINT, LPTSTR, int);
-
-BOOL CharToOem(LPCTSTR, LPSTR);
-
-BOOL OemToChar(LPCSTR, LPTSTR);
-
-BOOL CharToOemBuff(LPCTSTR, LPSTR, DWORD);
-
-BOOL OemToCharBuff(LPCSTR, LPTSTR, DWORD);
-
-LPTSTR CharUpper(LPTSTR);
-
-DWORD CharUpperBuff(LPTSTR, DWORD);
-
-LPTSTR CharLower(LPTSTR);
-
-DWORD CharLowerBuff(LPTSTR, DWORD);
-
-LPTSTR CharNext(LPCTSTR);
-
-LPTSTR CharPrev(LPCTSTR, LPCTSTR);
-
-BOOL IsCharAlpha(CHAR);
-
-BOOL IsCharAlphaNumeric(CHAR);
-
-BOOL IsCharUpper(CHAR);
-
-BOOL IsCharLower(CHAR);
-
-int GetKeyNameText(LONG, LPTSTR, int);
-
-SHORT VkKeyScan(CHAR);
-
-SHORT VkKeyScanEx(CHAR, HKL);
-
-UINT MapVirtualKey(UINT, UINT);
-
-UINT MapVirtualKeyEx(UINT, UINT, HKL);
-
-HACCEL LoadAccelerators(HINSTANCE, LPCTSTR);
-
-HACCEL CreateAcceleratorTable(LPACCEL, int);
-
-int CopyAcceleratorTable(HACCEL, LPACCEL, int);
-
-int TranslateAccelerator(HWND, HACCEL, LPMSG);
-
-HMENU LoadMenu(HINSTANCE, LPCTSTR);
-
-HMENU LoadMenuIndirect(const MENUTEMPLATE *);
-
-BOOL ChangeMenu(HMENU, UINT, LPCTSTR, UINT, UINT);
-
-int GetMenuString(HMENU, UINT, LPTSTR, int, UINT);
-
-BOOL InsertMenu(HMENU, UINT, UINT, UINT_PTR, LPCTSTR);
-
-BOOL AppendMenu(HMENU, UINT, UINT_PTR, LPCTSTR);
-
-BOOL ModifyMenu(HMENU, UINT, UINT, UINT_PTR, LPCTSTR);
-
-BOOL InsertMenuItem(HMENU, UINT, BOOL, LPCMENUITEMINFO);
-
-BOOL GetMenuItemInfo(HMENU, UINT, BOOL, LPMENUITEMINFO);
-
-BOOL SetMenuItemInfo(HMENU, UINT, BOOL, LPCMENUITEMINFO);
-
-int DrawText(HDC, LPCTSTR, int, LPRECT, UINT);
-
-int DrawTextEx(HDC, LPTSTR, int, LPRECT, UINT, LPDRAWTEXTPARAMS);
-
-BOOL GrayString(HDC, HBRUSH, GRAYSTRINGPROC, LPARAM, int, int, int, int, int);
-
-BOOL DrawState(HDC, HBRUSH, DRAWSTATEPROC, LPARAM, WPARAM, int, int, int, int, UINT);
-
-LONG TabbedTextOut(HDC, int, int, LPCTSTR, int, int, const INT *, int);
-
-DWORD GetTabbedTextExtent(HDC, LPCTSTR, int, int, const INT *);
-
-BOOL SetProp(HWND, LPCTSTR, HANDLE);
-
-HANDLE GetProp(HWND, LPCTSTR);
-
-HANDLE RemoveProp(HWND, LPCTSTR);
-
-int EnumPropsEx(HWND, PROPENUMPROCEX, LPARAM);
-
-int EnumProps(HWND, PROPENUMPROC);
-
-BOOL SetWindowText(HWND, LPCTSTR);
-
-int GetWindowText(HWND, LPTSTR, int);
-
-int GetWindowTextLength(HWND);
-
-int MessageBox(HWND, LPCTSTR, LPCTSTR, UINT);
-
-int MessageBoxEx(HWND, LPCTSTR, LPCTSTR, UINT, WORD);
-
-int MessageBoxIndirect(const MSGBOXPARAMS *);
-
-LONG GetWindowLong(HWND, int);
-
-LONG SetWindowLong(HWND, int, LONG);
-
-LONG_PTR GetWindowLongPtr(HWND, int);
-
-LONG_PTR SetWindowLongPtr(HWND, int, LONG_PTR);
-
-DWORD GetClassLong(HWND, int);
-
-DWORD SetClassLong(HWND, int, LONG);
-
-ULONG_PTR GetClassLongPtr(HWND, int);
-
-ULONG_PTR SetClassLongPtr(HWND, int, LONG_PTR);
-
-HWND FindWindow(LPCTSTR, LPCTSTR);
-
-HWND FindWindowEx(HWND, HWND, LPCTSTR, LPCTSTR);
-
-int GetClassName(HWND, LPTSTR, int);
-
-HHOOK SetWindowsHook(int, HOOKPROC);
-
-HHOOK SetWindowsHookEx(int, HOOKPROC, HINSTANCE, DWORD);
-
-HBITMAP LoadBitmap(HINSTANCE, LPCTSTR);
-
-HCURSOR LoadCursor(HINSTANCE, LPCTSTR);
-
-HCURSOR LoadCursorFromFile(LPCTSTR);
-
-HICON LoadIcon(HINSTANCE, LPCTSTR);
-
-UINT PrivateExtractIcons(LPCTSTR, int, int, int, HICON *, UINT *, UINT, UINT);
-
-HANDLE LoadImage(HINSTANCE, LPCTSTR, UINT, int, int, UINT);
-
-BOOL GetIconInfoEx(HICON, PICONINFOEX);
-
-BOOL IsDialogMessage(HWND, LPMSG);
-
-int DlgDirList(HWND, LPTSTR, int, int, UINT);
-
-BOOL DlgDirSelectEx(HWND, LPTSTR, int, int);
-
-int DlgDirListComboBox(HWND, LPTSTR, int, int, UINT);
-
-BOOL DlgDirSelectComboBoxEx(HWND, LPTSTR, int, int);
-
-LRESULT DefFrameProc(HWND, HWND, UINT, WPARAM, LPARAM);
-
-LRESULT DefMDIChildProc(HWND, UINT, WPARAM, LPARAM);
-
-HWND CreateMDIWindow(LPCTSTR, LPCTSTR, DWORD, int, int, int, int, HWND, HINSTANCE, LPARAM);
-
-BOOL WinHelp(HWND, LPCTSTR, UINT, ULONG_PTR);
-
-LONG ChangeDisplaySettings(DEVMODE*, DWORD);
-
-LONG ChangeDisplaySettingsEx(LPCTSTR, DEVMODE*, HWND, DWORD, LPVOID);
-
-BOOL EnumDisplaySettings(LPCTSTR, DWORD, DEVMODE*);
-
-BOOL EnumDisplaySettingsEx(LPCTSTR, DWORD, DEVMODE*, DWORD);
-
-BOOL EnumDisplayDevices(LPCTSTR, DWORD, PDISPLAY_DEVICE, DWORD);
-
-BOOL SystemParametersInfo(UINT, UINT, PVOID, UINT);
-
-BOOL GetMonitorInfo(HMONITOR, LPMONITORINFO);
-
-UINT GetWindowModuleFileName(HWND, LPTSTR, UINT);
-
-UINT RealGetWindowClass(HWND, LPTSTR, UINT);
-
-BOOL GetAltTabInfo(HWND, int, PALTTABINFO, LPTSTR, UINT);
-
-UINT GetRawInputDeviceInfo(HANDLE, UINT, LPVOID, PUINT);
-
-int GetDateFormat(LCID, DWORD, const SYSTEMTIME*, LPCTSTR, LPTSTR, int);
-
-int GetTimeFormat(LCID, DWORD, const SYSTEMTIME*, LPCTSTR, LPTSTR, int);
-
-BOOL GetCPInfoEx(UINT, DWORD, LPCPINFOEX);
-
-int CompareString(LCID, DWORD, PCNZTCH, int, PCNZTCH, int);
-
-int GetLocaleInfo(LCID, LCTYPE, LPTSTR, int);
-
-BOOL SetLocaleInfo(LCID, LCTYPE, LPCTSTR);
-
-int GetCalendarInfo(LCID, CALID, CALTYPE, LPTSTR, int, LPDWORD);
-
-BOOL SetCalendarInfo(LCID, CALID, CALTYPE, LPCTSTR);
-
-int GetNumberFormat(LCID, DWORD, LPCTSTR, const NUMBERFMT *, LPTSTR, int);
-
-int GetCurrencyFormat(LCID, DWORD, LPCTSTR, const CURRENCYFMT *, LPTSTR, int);
-
-BOOL EnumCalendarInfo(CALINFO_ENUMPROC, LCID, CALID, CALTYPE);
-
-BOOL EnumCalendarInfoEx(CALINFO_ENUMPROCEX, LCID, CALID, CALTYPE);
-
-BOOL EnumTimeFormats(TIMEFMT_ENUMPROC, LCID, DWORD);
-
-BOOL EnumDateFormats(DATEFMT_ENUMPROC, LCID, DWORD);
-
-BOOL EnumDateFormatsEx(DATEFMT_ENUMPROCEX, LCID, DWORD);
-
-int GetGeoInfo(GEOID, GEOTYPE, LPTSTR, int, LANGID);
-
-BOOL GetStringTypeEx(LCID, DWORD, LPCTSTR, int, LPWORD);
-
-int FoldString(DWORD, LPCTSTR, int, LPTSTR, int);
-
-BOOL EnumSystemLocales(LOCALE_ENUMPROC, DWORD);
-
-BOOL EnumSystemLanguageGroups(LANGUAGEGROUP_ENUMPROC, DWORD, LONG_PTR);
-
-BOOL EnumLanguageGroupLocales(LANGGROUPLOCALE_ENUMPROC, LGRPID, DWORD, LONG_PTR);
-
-BOOL EnumUILanguages(UILANGUAGE_ENUMPROC, DWORD, LONG_PTR);
-
-BOOL EnumSystemCodePages(CODEPAGE_ENUMPROC, DWORD);
-
-BOOL ReadConsoleInput(HANDLE, PINPUT_RECORD, DWORD, LPDWORD);
-
-BOOL PeekConsoleInput(HANDLE, PINPUT_RECORD, DWORD, LPDWORD);
-
-BOOL ReadConsole(HANDLE, LPVOID, DWORD, LPDWORD, PCONSOLE_READCONSOLE_CONTROL);
-
-BOOL WriteConsole(HANDLE, const void*, DWORD, LPDWORD, LPVOID);
-
-BOOL FillConsoleOutputCharacter(HANDLE, CHAR, DWORD, COORD, LPDWORD);
-
-BOOL WriteConsoleOutputCharacter(HANDLE, LPCTSTR, DWORD, COORD, LPDWORD);
-
-BOOL ReadConsoleOutputCharacter(HANDLE, LPTSTR, DWORD, COORD, LPDWORD);
-
-BOOL WriteConsoleInput(HANDLE, const INPUT_RECORD*, DWORD, LPDWORD);
-
-BOOL ScrollConsoleScreenBuffer(HANDLE, const SMALL_RECT*, const SMALL_RECT*, COORD, const CHAR_INFO*);
-
-BOOL WriteConsoleOutput(HANDLE, const CHAR_INFO*, COORD, COORD, PSMALL_RECT);
-
-BOOL ReadConsoleOutput(HANDLE, PCHAR_INFO, COORD, COORD, PSMALL_RECT);
-
-DWORD GetConsoleTitle(LPTSTR, DWORD);
-
-DWORD GetConsoleOriginalTitle(LPTSTR, DWORD);
-
-BOOL SetConsoleTitle(LPCTSTR);
-
-BOOL AddConsoleAlias(LPTSTR, LPTSTR, LPTSTR);
-
-DWORD GetConsoleAlias(LPTSTR, LPTSTR, DWORD, LPTSTR);
-
-DWORD GetConsoleAliasesLength(LPTSTR);
-
-DWORD GetConsoleAliasExesLength();
-
-DWORD GetConsoleAliases(LPTSTR, DWORD, LPTSTR);
-
-DWORD GetConsoleAliasExes(LPTSTR, DWORD);
-
-void ExpungeConsoleCommandHistory(LPTSTR);
-
-BOOL SetConsoleNumberOfCommands(DWORD, LPTSTR);
-
-DWORD GetConsoleCommandHistoryLength(LPTSTR);
-
-DWORD GetConsoleCommandHistory(LPTSTR, DWORD, LPTSTR);
-
-DWORD VerFindFile(DWORD, LPTSTR, LPTSTR, LPTSTR, LPTSTR, PUINT, LPTSTR, PUINT);
-
-DWORD VerInstallFile(DWORD, LPTSTR, LPTSTR, LPTSTR, LPTSTR, LPTSTR, LPTSTR, PUINT);
-
-DWORD GetFileVersionInfoSize(LPCTSTR, LPDWORD);
-
-BOOL GetFileVersionInfo(LPCTSTR, DWORD, DWORD, LPVOID);
-
-DWORD GetFileVersionInfoSizeEx(DWORD, LPCTSTR, LPDWORD);
-
-BOOL GetFileVersionInfoEx(DWORD, LPCTSTR, DWORD, DWORD, LPVOID);
-
-DWORD VerLanguageName(DWORD, LPTSTR, DWORD);
-
-BOOL VerQueryValue(LPCVOID, LPCTSTR, LPVOID *, PUINT);
-
-LSTATUS RegConnectRegistry(LPCTSTR, HKEY, PHKEY);
-
-LSTATUS RegConnectRegistryEx(LPCTSTR, HKEY, ULONG, PHKEY);
-
-LSTATUS RegCreateKey(HKEY, LPCTSTR, PHKEY);
-
-LSTATUS RegCreateKeyEx(HKEY, LPCTSTR, DWORD, LPTSTR, DWORD, REGSAM, const LPSECURITY_ATTRIBUTES, PHKEY, LPDWORD);
-
-LSTATUS RegCreateKeyTransacted(HKEY, LPCTSTR, DWORD, LPTSTR, DWORD, REGSAM, const LPSECURITY_ATTRIBUTES, PHKEY, LPDWORD, HANDLE, PVOID);
-
-LSTATUS RegDeleteKey(HKEY, LPCTSTR);
-
-LSTATUS RegDeleteKeyEx(HKEY, LPCTSTR, REGSAM, DWORD);
-
-LSTATUS RegDeleteKeyTransacted(HKEY, LPCTSTR, REGSAM, DWORD, HANDLE, PVOID);
-
-LSTATUS RegDeleteValue(HKEY, LPCTSTR);
-
-LSTATUS RegEnumKey(HKEY, DWORD, LPTSTR, DWORD);
-
-LSTATUS RegEnumKeyEx(HKEY, DWORD, LPTSTR, LPDWORD, LPDWORD, LPTSTR, LPDWORD, PFILETIME);
-
-LSTATUS RegEnumValue(HKEY, DWORD, LPTSTR, LPDWORD, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
-
-LSTATUS RegLoadKey(HKEY, LPCTSTR, LPCTSTR);
-
-LSTATUS RegOpenKey(HKEY, LPCTSTR, PHKEY);
-
-LSTATUS RegOpenKeyEx(HKEY, LPCTSTR, DWORD, REGSAM, PHKEY);
-
-LSTATUS RegOpenKeyTransacted(HKEY, LPCTSTR, DWORD, REGSAM, PHKEY, HANDLE, PVOID);
-
-LSTATUS RegQueryInfoKey(HKEY, LPTSTR, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, LPDWORD, PFILETIME);
-
-LSTATUS RegQueryValue(HKEY, LPCTSTR, LPTSTR, PLONG);
-
-LSTATUS RegQueryMultipleValues(HKEY, PVALENT, DWORD, LPTSTR, LPDWORD);
-
-LSTATUS RegQueryValueEx(HKEY, LPCTSTR, LPDWORD, LPDWORD, LPBYTE, LPDWORD);
-
-LSTATUS RegReplaceKey(HKEY, LPCTSTR, LPCTSTR, LPCTSTR);
-
-LSTATUS RegRestoreKey(HKEY, LPCTSTR, DWORD);
-
-LSTATUS RegSaveKey(HKEY, LPCTSTR, const LPSECURITY_ATTRIBUTES);
-
-LSTATUS RegSetValue(HKEY, LPCTSTR, DWORD, LPCTSTR, DWORD);
-
-LSTATUS RegSetValueEx(HKEY, LPCTSTR, DWORD, DWORD, const BYTE*, DWORD);
-
-LSTATUS RegUnLoadKey(HKEY, LPCTSTR);
-
-LSTATUS RegDeleteKeyValue(HKEY, LPCTSTR, LPCTSTR);
-
-LSTATUS RegSetKeyValue(HKEY, LPCTSTR, LPCTSTR, DWORD, LPCVOID, DWORD);
-
-LSTATUS RegDeleteTree(HKEY, LPCTSTR);
-
-LSTATUS RegCopyTree(HKEY, LPCTSTR, HKEY);
-
-LSTATUS RegGetValue(HKEY, LPCTSTR, LPCTSTR, DWORD, LPDWORD, PVOID, LPDWORD);
-
-LSTATUS RegLoadMUIString(HKEY, LPCTSTR, LPTSTR, DWORD, LPDWORD, DWORD, LPCTSTR);
-
-LSTATUS RegLoadAppKey(LPCTSTR, PHKEY, REGSAM, DWORD, DWORD);
-
-BOOL InitiateSystemShutdown(LPTSTR, LPTSTR, DWORD, BOOL, BOOL);
-
-BOOL AbortSystemShutdown(LPTSTR);
-
-BOOL InitiateSystemShutdownEx(LPTSTR, LPTSTR, DWORD, BOOL, BOOL, DWORD);
-
-DWORD InitiateShutdown(LPTSTR, LPTSTR, DWORD, DWORD, DWORD);
-
-LSTATUS RegSaveKeyEx(HKEY, LPCTSTR, const LPSECURITY_ATTRIBUTES, DWORD);
-
-DWORD MultinetGetConnectionPerformance(LPNETRESOURCE, LPNETCONNECTINFOSTRUCT);
-
-BOOL ChangeServiceConfig(SC_HANDLE, DWORD, DWORD, DWORD, LPCTSTR, LPCTSTR, LPDWORD, LPCTSTR, LPCTSTR, LPCTSTR, LPCTSTR);
-
-BOOL ChangeServiceConfig2(SC_HANDLE, DWORD, LPVOID);
-
-SC_HANDLE CreateService(SC_HANDLE, LPCTSTR, LPCTSTR, DWORD, DWORD, DWORD, DWORD, LPCTSTR, LPCTSTR, LPDWORD, LPCTSTR, LPCTSTR, LPCTSTR);
-
-BOOL EnumDependentServices(SC_HANDLE, DWORD, LPENUM_SERVICE_STATUS, DWORD, LPDWORD, LPDWORD);
-
-BOOL EnumServicesStatus(SC_HANDLE, DWORD, DWORD, LPENUM_SERVICE_STATUS, DWORD, LPDWORD, LPDWORD, LPDWORD);
-
-BOOL EnumServicesStatusEx(SC_HANDLE, SC_ENUM_TYPE, DWORD, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD, LPDWORD, LPCTSTR);
-
-BOOL GetServiceKeyName(SC_HANDLE, LPCTSTR, LPTSTR, LPDWORD);
-
-BOOL GetServiceDisplayName(SC_HANDLE, LPCTSTR, LPTSTR, LPDWORD);
-
-SC_HANDLE OpenSCManager(LPCTSTR, LPCTSTR, DWORD);
-
-SC_HANDLE OpenService(SC_HANDLE, LPCTSTR, DWORD);
-
-BOOL QueryServiceConfig(SC_HANDLE, LPQUERY_SERVICE_CONFIG, DWORD, LPDWORD);
-
-BOOL QueryServiceConfig2(SC_HANDLE, DWORD, LPBYTE, DWORD, LPDWORD);
-
-BOOL QueryServiceLockStatus(SC_HANDLE, LPQUERY_SERVICE_LOCK_STATUS, DWORD, LPDWORD);
-
-SERVICE_STATUS_HANDLE RegisterServiceCtrlHandler(LPCTSTR, LPHANDLER_FUNCTION);
-
-SERVICE_STATUS_HANDLE RegisterServiceCtrlHandlerEx(LPCTSTR, LPHANDLER_FUNCTION_EX, LPVOID);
-
-BOOL StartServiceCtrlDispatcher(const SERVICE_TABLE_ENTRY *);
-
-BOOL StartService(SC_HANDLE, DWORD, LPCTSTR *);
-
-DWORD NotifyServiceStatusChange(SC_HANDLE, DWORD, PSERVICE_NOTIFY);
-
-BOOL ControlServiceEx(SC_HANDLE, DWORD, DWORD, PVOID);
-
-HKL ImmInstallIME(LPCTSTR, LPCTSTR);
-
-UINT ImmGetDescription(HKL, LPTSTR, UINT);
-
-UINT ImmGetIMEFileName(HKL, LPTSTR, UINT);
-
-LONG ImmGetCompositionString(HIMC, DWORD, LPVOID, DWORD);
-
-BOOL ImmSetCompositionString(HIMC, DWORD, LPVOID, DWORD, LPVOID, DWORD);
-
-DWORD ImmGetCandidateListCount(HIMC, LPDWORD);
-
-DWORD ImmGetCandidateList(HIMC, DWORD, LPCANDIDATELIST, DWORD);
-
-DWORD ImmGetGuideLine(HIMC, DWORD, LPTSTR, DWORD);
-
-BOOL ImmGetCompositionFont(HIMC, LPLOGFONT);
-
-BOOL ImmSetCompositionFont(HIMC, LPLOGFONT);
-
-BOOL ImmConfigureIME(HKL, HWND, DWORD, LPVOID);
-
-LRESULT ImmEscape(HKL, HIMC, UINT, LPVOID);
-
-DWORD ImmGetConversionList(HKL, HIMC, LPCTSTR, LPCANDIDATELIST, DWORD, UINT);
-
-BOOL ImmIsUIMessage(HWND, UINT, WPARAM, LPARAM);
-
-BOOL ImmRegisterWord(HKL, LPCTSTR, DWORD, LPCTSTR);
-
-BOOL ImmUnregisterWord(HKL, LPCTSTR, DWORD, LPCTSTR);
-
-UINT ImmGetRegisterWordStyle(HKL, UINT, LPSTYLEBUF);
-
-UINT ImmEnumRegisterWord(HKL, REGISTERWORDENUMPROC, LPCTSTR, DWORD, LPCTSTR, LPVOID);
-
-DWORD ImmGetImeMenuItems(HIMC, DWORD, DWORD, LPIMEMENUITEMINFO, LPIMEMENUITEMINFO, DWORD);
deleted file mode 100644
--- a/config/windows-h-wrapper.template.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=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_windows_h
-#define mozilla_windows_h
-
-// Include the "real" windows.h header. On clang/gcc, this can be done with the
-// `include_next` feature, however MSVC requires a direct include path.
-//
-// Also turn off deprecation warnings, as we may be wrapping deprecated fns.
-
-#if defined(__GNUC__) || defined(__clang__)
-#  pragma GCC system_header
-#  include_next <windows.h>
-
-#  pragma GCC diagnostic push
-#  pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#else
-#  include <${header_path}>
-
-#  pragma warning(push)
-#  pragma warning(disable: 4996 4995)
-#endif // defined(__GNUC__) || defined(__clang__)
-
-// Check if the header should be disabled
-#if defined(MOZ_DISABLE_WINDOWS_WRAPPER)
-#define MOZ_WINDOWS_WRAPPER_DISABLED_REASON "explicitly disabled"
-
-#elif !defined(__cplusplus)
-#define MOZ_WINDOWS_WRAPPER_DISABLED_REASON "non-C++ source file"
-
-#elif !defined(__GNUC__) && !defined(__clang__) && !defined(_DLL)
-#define MOZ_WINDOWS_WRAPPER_DISABLED_REASON "non-dynamic RTL"
-
-#else
-// We're allowed to wrap in the current context. Define `MOZ_WRAPPED_WINDOWS_H`
-// to note that fact, and perform the wrapping.
-#define MOZ_WRAPPED_WINDOWS_H
-extern "C++" {
-
-${decls}
-
-} // extern "C++"
-#endif // enabled
-
-#if defined(__GNUC__) || defined(__clang__)
-#  pragma GCC diagnostic pop
-#else
-#  pragma warning(pop)
-#endif // defined(__GNUC__) || defined(__clang__)
-
-#endif // !defined(mozilla_windows_h)
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
@@ -1,15 +1,15 @@
 /* -*- 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/. */
 
-#include "mozilla/dom/BrowsingContext.h"
+#include "BrowsingContext.h"
 
 #include "mozilla/dom/ChromeBrowsingContext.h"
 #include "mozilla/dom/BrowsingContextBinding.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/Logging.h"
--- a/docshell/base/BrowsingContext.h
+++ b/docshell/base/BrowsingContext.h
@@ -1,16 +1,16 @@
 /* -*- 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_BrowsingContext_h
-#define mozilla_dom_BrowsingContext_h
+#ifndef BrowsingContext_h
+#define BrowsingContext_h
 
 #include "mozilla/LinkedList.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/RefPtr.h"
 #include "mozilla/WeakPtr.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsString.h"
@@ -117,18 +117,18 @@ public:
   }
 
   void SetOpener(BrowsingContext* aOpener);
 
   static void GetRootBrowsingContexts(
     nsTArray<RefPtr<BrowsingContext>>& aBrowsingContexts);
 
   nsISupports* GetParentObject() const;
-  JSObject* WrapObject(JSContext* aCx,
-                       JS::Handle<JSObject*> aGivenProto) override;
+  virtual JSObject* WrapObject(JSContext* aCx,
+                               JS::Handle<JSObject*> aGivenProto) override;
 
   MOZ_DECLARE_WEAKREFERENCE_TYPENAME(BrowsingContext)
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(BrowsingContext)
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(BrowsingContext)
 
   using Children = AutoCleanLinkedList<RefPtr<BrowsingContext>>;
 
 protected:
@@ -150,10 +150,9 @@ private:
   Children mChildren;
   WeakPtr<BrowsingContext> mOpener;
   nsCOMPtr<nsIDocShell> mDocShell;
   nsString mName;
 };
 
 } // namespace dom
 } // namespace mozilla
-
-#endif // !defined(mozilla_dom_BrowsingContext_h)
+#endif
--- a/docshell/base/ChromeBrowsingContext.cpp
+++ b/docshell/base/ChromeBrowsingContext.cpp
@@ -1,16 +1,15 @@
 /* -*- 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/. */
 
-#include "mozilla/dom/ChromeBrowsingContext.h"
-#include "mozilla/dom/WindowGlobalParent.h"
+#include "ChromeBrowsingContext.h"
 
 #include "mozilla/dom/ContentParent.h"
 
 namespace mozilla {
 namespace dom {
 
 ChromeBrowsingContext::ChromeBrowsingContext(BrowsingContext* aParent,
                                              const nsAString& aName,
@@ -59,54 +58,10 @@ ChromeBrowsingContext::Cast(BrowsingCont
 
 /* static */ const ChromeBrowsingContext*
 ChromeBrowsingContext::Cast(const BrowsingContext* aContext)
 {
   MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
   return static_cast<const ChromeBrowsingContext*>(aContext);
 }
 
-void
-ChromeBrowsingContext::GetWindowGlobals(nsTArray<RefPtr<WindowGlobalParent>>& aWindows)
-{
-  aWindows.SetCapacity(mWindowGlobals.Count());
-  for (auto iter = mWindowGlobals.Iter(); !iter.Done(); iter.Next()) {
-    aWindows.AppendElement(iter.Get()->GetKey());
-  }
-}
-
-void
-ChromeBrowsingContext::RegisterWindowGlobal(WindowGlobalParent* aGlobal)
-{
-  MOZ_ASSERT(!mWindowGlobals.Contains(aGlobal), "Global already registered!");
-  mWindowGlobals.PutEntry(aGlobal);
-}
-
-void
-ChromeBrowsingContext::UnregisterWindowGlobal(WindowGlobalParent* aGlobal)
-{
-  MOZ_ASSERT(mWindowGlobals.Contains(aGlobal), "Global not registered!");
-  mWindowGlobals.RemoveEntry(aGlobal);
-}
-
-JSObject*
-ChromeBrowsingContext::WrapObject(JSContext* aCx,
-                                  JS::Handle<JSObject*> aGivenProto)
-{
-  return ChromeBrowsingContext_Binding::Wrap(aCx, this, aGivenProto);
-}
-
-void
-ChromeBrowsingContext::Traverse(nsCycleCollectionTraversalCallback& cb)
-{
-  ChromeBrowsingContext* tmp = this;
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mWindowGlobals);
-}
-
-void
-ChromeBrowsingContext::Unlink()
-{
-  ChromeBrowsingContext* tmp = this;
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindowGlobals);
-}
-
 } // namespace dom
 } // namespace mozilla
--- a/docshell/base/ChromeBrowsingContext.h
+++ b/docshell/base/ChromeBrowsingContext.h
@@ -1,31 +1,27 @@
 /* -*- 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_ChromeBrowsingContext_h
-#define mozilla_dom_ChromeBrowsingContext_h
+#ifndef ChromeBrowsingContext_h
+#define ChromeBrowsingContext_h
 
 #include "mozilla/dom/BrowsingContext.h"
 #include "mozilla/RefPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsWrapperCache.h"
-#include "nsTHashtable.h"
-#include "nsHashKeys.h"
 
 class nsIDocShell;
 
 namespace mozilla {
 namespace dom {
 
-class WindowGlobalParent;
-
 // ChromeBrowsingContext is a BrowsingContext living in the parent
 // process, with whatever extra data that a BrowsingContext in the
 // parent needs.
 class ChromeBrowsingContext final
   : public BrowsingContext
 {
 public:
   static void CleanupContexts(uint64_t aProcessId);
@@ -33,43 +29,30 @@ public:
   static ChromeBrowsingContext* Cast(BrowsingContext* aContext);
   static const ChromeBrowsingContext* Cast(const BrowsingContext* aContext);
 
   bool IsOwnedByProcess(uint64_t aProcessId) const
   {
     return mProcessId == aProcessId;
   }
 
-  void GetWindowGlobals(nsTArray<RefPtr<WindowGlobalParent>>& aWindows);
-
-  // Called by WindowGlobalParent to register and unregister window globals.
-  void RegisterWindowGlobal(WindowGlobalParent* aGlobal);
-  void UnregisterWindowGlobal(WindowGlobalParent* aGlobal);
-
-  JSObject* WrapObject(JSContext* aCx,
-                       JS::Handle<JSObject*> aGivenProto) override;
-
 protected:
-  void Traverse(nsCycleCollectionTraversalCallback& cb);
-  void Unlink();
+  void Traverse(nsCycleCollectionTraversalCallback& cb) {}
+  void Unlink() {}
 
   using Type = BrowsingContext::Type;
   ChromeBrowsingContext(BrowsingContext* aParent,
                         const nsAString& aName,
                         uint64_t aBrowsingContextId,
                         uint64_t aProcessId,
                         Type aType = Type::Chrome);
 
 private:
   friend class BrowsingContext;
 
   // XXX(farre): Store a ContentParent pointer here rather than mProcessId?
   // Indicates which process owns the docshell.
   uint64_t mProcessId;
-
-  // All live window globals within this browsing context.
-  nsTHashtable<nsRefPtrHashKey<WindowGlobalParent>> mWindowGlobals;
 };
 
 } // namespace dom
 } // namespace mozilla
-
-#endif // !defined(mozilla_dom_ChromeBrowsingContext_h)
+#endif
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -420,17 +420,17 @@ SOURCES += [
     # Several conflicts with other bindings.
     'DOMIntersectionObserver.cpp',
     # Because of OS X headers.
     'nsContentUtils.cpp',
     # this file doesn't like windows.h
     'nsDOMWindowUtils.cpp',
     # Conflicts with windows.h's definition of SendMessage.
     'nsFrameMessageManager.cpp',
-    # These files have a #error "Never include unwrapped windows.h in this file!"
+    # These files have a #error "Never include windows.h in this file!"
     'nsGlobalWindowInner.cpp',
     'nsGlobalWindowOuter.cpp',
     # Conflicts with windows.h's definition of LoadImage.
     'nsImageLoadingContent.cpp',
     # Because of OS X headers.
     'nsObjectLoadingContent.cpp',
     # nsPluginArray.cpp includes npapi.h indirectly, and that includes a lot of system headers
     'nsPluginArray.cpp',
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -265,18 +265,16 @@
 #include "nsXULCommandDispatcher.h"
 #include "nsXULPopupManager.h"
 #include "nsIDocShellTreeOwner.h"
 #endif
 #include "nsIPresShellInlines.h"
 
 #include "mozilla/DocLoadingTimelineMarker.h"
 
-#include "mozilla/dom/WindowGlobalChild.h"
-
 #include "nsISpeculativeConnect.h"
 
 #include "mozilla/MediaManager.h"
 
 #include "nsIURIClassifier.h"
 #include "nsIURIMutator.h"
 #include "mozilla/DocumentStyleRootIterator.h"
 #include "mozilla/PendingFullscreenEvent.h"
@@ -3105,23 +3103,16 @@ nsIDocument::SetDocumentURI(nsIURI* aURI
   if (!mOriginalURI)
     mOriginalURI = mDocumentURI;
 
   // If changing the document's URI changed the base URI of the document, we
   // need to refresh the hrefs of all the links on the page.
   if (!equalBases) {
     RefreshLinkHrefs();
   }
-
-  // Tell our WindowGlobalParent that the document's URI has been changed.
-  nsPIDOMWindowInner* inner = GetInnerWindow();
-  WindowGlobalChild* wgc = inner ? inner->GetWindowGlobalChild() : nullptr;
-  if (wgc) {
-    Unused << wgc->SendUpdateDocumentURI(mDocumentURI);
-  }
 }
 
 static void
 GetFormattedTimeString(PRTime aTime, nsAString& aFormattedTimeString)
 {
   PRExplodedTime prtime;
   PR_ExplodeTime(aTime, PR_LocalTimeParameters, &prtime);
   // "MM/DD/YYYY hh:mm:ss"
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -95,17 +95,16 @@
 #include "mozilla/dom/CustomEvent.h"
 
 #include "mozilla/dom/ipc/StructuredCloneData.h"
 #include "mozilla/WebBrowserPersistLocalDocument.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/PromiseNativeHandler.h"
 #include "mozilla/dom/ParentSHistory.h"
 #include "mozilla/dom/ChildSHistory.h"
-#include "mozilla/dom/ChromeBrowsingContext.h"
 
 #include "mozilla/dom/HTMLBodyElement.h"
 
 #include "mozilla/ContentPrincipal.h"
 
 #ifdef XP_WIN
 #include "mozilla/plugins/PPluginWidgetParent.h"
 #include "../plugins/ipc/PluginWidgetParent.h"
@@ -3190,29 +3189,16 @@ nsFrameLoader::LoadContext()
       (mRemoteBrowser || TryRemoteBrowser())) {
     loadContext = mRemoteBrowser->GetLoadContext();
   } else {
     loadContext = do_GetInterface(GetDocShell(IgnoreErrors()));
   }
   return loadContext.forget();
 }
 
-already_AddRefed<BrowsingContext>
-nsFrameLoader::GetBrowsingContext()
-{
-  RefPtr<BrowsingContext> browsingContext;
-  if (IsRemoteFrame() &&
-      (mRemoteBrowser || TryRemoteBrowser())) {
-    browsingContext = mRemoteBrowser->GetBrowsingContext();
-  } else if (GetDocShell(IgnoreErrors())) {
-    browsingContext = nsDocShell::Cast(mDocShell)->GetBrowsingContext();
-  }
-  return browsingContext.forget();
-}
-
 void
 nsFrameLoader::InitializeBrowserAPI()
 {
   if (!OwnerIsMozBrowserFrame()) {
     return;
   }
   if (!IsRemoteFrame()) {
     nsresult rv = EnsureMessageManager();
--- a/dom/base/nsFrameLoader.h
+++ b/dom/base/nsFrameLoader.h
@@ -43,17 +43,16 @@ class nsIPrintSettings;
 class nsIWebBrowserPersistDocumentReceiver;
 class nsIWebProgressListener;
 
 namespace mozilla {
 
 class OriginAttributes;
 
 namespace dom {
-class BrowsingContext;
 class ChromeMessageSender;
 class ContentParent;
 class InProcessTabChildMessageManager;
 class MessageSender;
 class PBrowserParent;
 class ProcessMessageManager;
 class Promise;
 class TabParent;
@@ -117,18 +116,16 @@ public:
   // WebIDL methods
 
   nsIDocShell* GetDocShell(mozilla::ErrorResult& aRv);
 
   already_AddRefed<nsITabParent> GetTabParent();
 
   already_AddRefed<nsILoadContext> LoadContext();
 
-  already_AddRefed<mozilla::dom::BrowsingContext> GetBrowsingContext();
-
   /**
    * Start loading the frame. This method figures out what to load
    * from the owner content in the frame loader.
    */
   void LoadFrame(bool aOriginalSrc);
 
   /**
    * Loads the specified URI in this frame. Behaves identically to loadFrame,
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -253,18 +253,16 @@
 #ifdef MOZ_WEBSPEECH
 #include "mozilla/dom/SpeechSynthesis.h"
 #endif
 
 #include "mozilla/dom/ClientManager.h"
 #include "mozilla/dom/ClientSource.h"
 #include "mozilla/dom/ClientState.h"
 
-#include "mozilla/dom/WindowGlobalChild.h"
-
 // Apple system headers seem to have a check() macro.  <sigh>
 #ifdef check
 class nsIScriptTimeoutHandler;
 #undef check
 #endif // check
 #include "AccessCheck.h"
 
 #ifdef ANDROID
@@ -1343,21 +1341,16 @@ nsGlobalWindowInner::FreeInnerObjects(bo
 
   if (mCleanMessageManager) {
     MOZ_ASSERT(mIsChrome, "only chrome should have msg manager cleaned");
     if (mChromeFields.mMessageManager) {
       mChromeFields.mMessageManager->Disconnect();
     }
   }
 
-  if (mWindowGlobalChild && !mWindowGlobalChild->IsClosed()) {
-    mWindowGlobalChild->Send__delete__(mWindowGlobalChild);
-  }
-  mWindowGlobalChild = nullptr;
-
   mIntlUtils = nullptr;
 }
 
 //*****************************************************************************
 // nsGlobalWindowInner::nsISupports
 //*****************************************************************************
 
 // QueryInterface implementation for nsGlobalWindowInner
@@ -1738,25 +1731,16 @@ nsGlobalWindowInner::InnerSetNewDocument
   mPerformance = nullptr;
 
   // This must be called after nullifying the internal objects because here we
   // could recreate them, calling the getter methods, and store them into the JS
   // slots. If we nullify them after, the slot values and the objects will be
   // out of sync.
   ClearDocumentDependentSlots(aCx);
 
-  // FIXME: Currently, devtools can crete a fallback webextension window global
-  // in the content process which does not have a corresponding TabChild actor.
-  // This means we have no actor to be our parent. (Bug 1498293)
-  MOZ_DIAGNOSTIC_ASSERT(!mWindowGlobalChild,
-                        "Shouldn't have created WindowGlobalChild yet!");
-  if (XRE_IsParentProcess() || mTabChild) {
-    mWindowGlobalChild = WindowGlobalChild::Create(this);
-  }
-
 #ifdef DEBUG
   mLastOpenedURI = aDocument->GetDocumentURI();
 #endif
 
   Telemetry::Accumulate(Telemetry::INNERWINDOWS_WITH_MUTATION_LISTENERS,
                         mMutationBits ? 1 : 0);
   Telemetry::Accumulate(Telemetry::INNERWINDOWS_WITH_TEXT_EVENT_LISTENERS,
                         mMayHaveTextEventListenerInDefaultGroup ? 1 : 0);
@@ -7862,19 +7846,18 @@ nsGlobalWindowInner::FireOnNewGlobalObje
 {
   // AutoEntryScript required to invoke debugger hook, which is a
   // Gecko-specific concept at present.
   AutoEntryScript aes(this, "nsGlobalWindowInner report new global");
   JS::Rooted<JSObject*> global(aes.cx(), GetWrapper());
   JS_FireOnNewGlobalObject(aes.cx(), global);
 }
 
-#if defined(_WINDOWS_) && !defined(MOZ_WRAPPED_WINDOWS_H)
-#pragma message("wrapper failure reason: " MOZ_WINDOWS_WRAPPER_DISABLED_REASON)
-#error "Never include unwrapped windows.h in this file!"
+#ifdef _WINDOWS_
+#error "Never include windows.h in this file!"
 #endif
 
 already_AddRefed<Promise>
 nsGlobalWindowInner::CreateImageBitmap(JSContext* aCx,
                                        const ImageBitmapSource& aImage,
                                        ErrorResult& aRv)
 {
   return ImageBitmap::Create(this, aImage, Nothing(), aRv);
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -7633,19 +7633,18 @@ nsGlobalWindowOuter::ReportLargeAllocSta
 
   nsContentUtils::ReportToConsole(errorFlags,
                                   NS_LITERAL_CSTRING("DOM"),
                                   mDoc,
                                   nsContentUtils::eDOM_PROPERTIES,
                                   message);
 }
 
-#if defined(_WINDOWS_) && !defined(MOZ_WRAPPED_WINDOWS_H)
-#pragma message("wrapper failure reason: " MOZ_WINDOWS_WRAPPER_DISABLED_REASON)
-#error "Never include unwrapped windows.h in this file!"
+#ifdef _WINDOWS_
+#error "Never include windows.h in this file!"
 #endif
 
 // Helper called by methods that move/resize the window,
 // to ensure the presContext (if any) is aware of resolution
 // change that may happen in multi-monitor configuration.
 void
 nsGlobalWindowOuter::CheckForDPIChange()
 {
--- a/dom/base/nsPIDOMWindow.h
+++ b/dom/base/nsPIDOMWindow.h
@@ -63,17 +63,16 @@ class Performance;
 class Report;
 class ReportBody;
 class ReportingObserver;
 class Selection;
 class ServiceWorker;
 class ServiceWorkerDescriptor;
 class Timeout;
 class TimeoutManager;
-class WindowGlobalChild;
 class CustomElementRegistry;
 enum class CallerType : uint32_t;
 } // namespace dom
 } // namespace mozilla
 
 // Popup control state enum. The values in this enum must go from most
 // permissive to least permissive so that it's safe to push state in
 // all situations. Pushing popup state onto the stack never makes the
@@ -397,21 +396,16 @@ public:
   nsIDocument* GetDoc()
   {
     if (!mDoc) {
       MaybeCreateDoc();
     }
     return mDoc;
   }
 
-  mozilla::dom::WindowGlobalChild* GetWindowGlobalChild()
-  {
-    return mWindowGlobalChild;
-  }
-
   virtual PopupControlState GetPopupControlState() const = 0;
 
   // Determine if the window is suspended or frozen.  Outer windows
   // will forward this call to the inner window for convenience.  If
   // there is no inner window then the outer window is considered
   // suspended and frozen by default.
   virtual bool IsSuspended() const = 0;
   virtual bool IsFrozen() const = 0;
@@ -756,22 +750,16 @@ protected:
   // List of Report objects for ReportingObservers.
   nsTArray<RefPtr<mozilla::dom::ReportingObserver>> mReportingObservers;
   nsTArray<RefPtr<mozilla::dom::Report>> mReportRecords;
 
   // This is a list of storage access granted for the current window. These are
   // also set as permissions, but it could happen that we need to access them
   // synchronously in this context, and for this, we need a copy here.
   nsTArray<nsCString> mStorageAccessGranted;
-
-  // The WindowGlobalChild actor for this window.
-  //
-  // This will be non-null during the full lifetime of the window, initialized
-  // during SetNewDocument, and cleared during FreeInnerObjects.
-  RefPtr<mozilla::dom::WindowGlobalChild> mWindowGlobalChild;
 };
 
 NS_DEFINE_STATIC_IID_ACCESSOR(nsPIDOMWindowInner, NS_PIDOMWINDOWINNER_IID)
 
 class nsPIDOMWindowOuter : public mozIDOMWindowProxy
 {
 protected:
   explicit nsPIDOMWindowOuter(uint64_t aWindowID);
--- a/dom/chrome-webidl/BrowsingContext.webidl
+++ b/dom/chrome-webidl/BrowsingContext.webidl
@@ -12,13 +12,8 @@ interface BrowsingContext {
   sequence<BrowsingContext> getChildren();
 
   readonly attribute nsIDocShell? docShell;
 
   readonly attribute unsigned long long id;
 
   readonly attribute BrowsingContext? opener;
 };
-
-[Exposed=Window, ChromeOnly]
-interface ChromeBrowsingContext : BrowsingContext {
-  sequence<WindowGlobalParent> getWindowGlobals();
-};
deleted file mode 100644
--- a/dom/chrome-webidl/WindowGlobalActors.webidl
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-interface Principal;
-interface URI;
-interface nsIDocShell;
-
-[Exposed=Window, ChromeOnly]
-interface WindowGlobalParent {
-  readonly attribute boolean isClosed;
-  readonly attribute boolean isInProcess;
-  readonly attribute ChromeBrowsingContext browsingContext;
-
-  readonly attribute unsigned long long innerWindowId;
-  readonly attribute unsigned long long outerWindowId;
-
-  readonly attribute FrameLoader? rootFrameLoader; // Embedded (browser) only
-
-  readonly attribute WindowGlobalChild? childActor; // in-process only
-
-  // Information about the currently loaded document.
-  readonly attribute Principal documentPrincipal;
-  readonly attribute URI? documentURI;
-
-  static WindowGlobalParent? getByInnerWindowId(unsigned long long innerWindowId);
-};
-
-[Exposed=Window, ChromeOnly]
-interface WindowGlobalChild {
-  readonly attribute boolean isClosed;
-  readonly attribute boolean isInProcess;
-  readonly attribute BrowsingContext browsingContext;
-
-  readonly attribute unsigned long long innerWindowId;
-  readonly attribute unsigned long long outerWindowId;
-
-  readonly attribute WindowGlobalParent? parentActor; // in-process only
-
-  static WindowGlobalChild? getByInnerWindowId(unsigned long long innerWIndowId);
-};
--- a/dom/chrome-webidl/moz.build
+++ b/dom/chrome-webidl/moz.build
@@ -49,17 +49,16 @@ WEBIDL_FILES = [
     'MozStorageStatementParams.webidl',
     'MozStorageStatementRow.webidl',
     'PrecompiledScript.webidl',
     'PromiseDebugging.webidl',
     'StructuredCloneHolder.webidl',
     'TelemetryStopwatch.webidl',
     'WebExtensionContentScript.webidl',
     'WebExtensionPolicy.webidl',
-    'WindowGlobalActors.webidl',
     'XULFrameElement.webidl',
     'XULMenuElement.webidl',
     'XULScrollElement.webidl',
     'XULTextElement.webidl'
 ]
 
 if CONFIG['MOZ_PLACES']:
     WEBIDL_FILES += [
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -949,36 +949,34 @@ ContentChild::ProvideWindowCommon(TabChi
     tabGroup = aTabOpener->TabGroup();
   } else {
     tabGroup = new TabGroup();
   }
 
   TabContext newTabContext = aTabOpener ? *aTabOpener : TabContext();
   RefPtr<TabChild> newChild = new TabChild(this, tabId, tabGroup,
                                            newTabContext, aChromeFlags);
+  if (NS_FAILED(newChild->Init())) {
+    return NS_ERROR_ABORT;
+  }
 
   if (aTabOpener) {
     MOZ_ASSERT(ipcContext->type() == IPCTabContext::TPopupIPCTabContext);
     ipcContext->get_PopupIPCTabContext().opener() = aTabOpener;
   }
 
   nsCOMPtr<nsIEventTarget> target = tabGroup->EventTargetFor(TaskCategory::Other);
   SetEventTargetForActor(newChild, target);
 
   Unused << SendPBrowserConstructor(
     // We release this ref in DeallocPBrowserChild
     RefPtr<TabChild>(newChild).forget().take(),
     tabId, TabId(0), *ipcContext, aChromeFlags,
     GetID(), IsForBrowser());
 
-  // Now that |newChild| has had its IPC link established, call |Init| to set it up.
-  if (NS_FAILED(newChild->Init())) {
-    return NS_ERROR_ABORT;
-  }
-
   nsCOMPtr<nsPIDOMWindowInner> parentTopInnerWindow;
   if (aParent) {
     nsCOMPtr<nsPIDOMWindowOuter> parentTopWindow =
       nsPIDOMWindowOuter::From(aParent)->GetTop();
     if (parentTopWindow) {
       parentTopInnerWindow = parentTopWindow->GetCurrentInnerWindow();
     }
   }
--- a/dom/ipc/DOMTypes.ipdlh
+++ b/dom/ipc/DOMTypes.ipdlh
@@ -21,18 +21,16 @@ using LayoutDeviceIntRect from "Units.h"
 using DesktopIntRect from "Units.h";
 using DesktopToLayoutDeviceScale from "Units.h";
 using CSSToLayoutDeviceScale from "Units.h";
 using CSSRect from "Units.h";
 using CSSSize from "Units.h";
 using mozilla::LayoutDeviceIntPoint from "Units.h";
 using hal::ScreenOrientation from "mozilla/HalScreenConfiguration.h";
 using mozilla::gfx::SurfaceFormat from "mozilla/gfx/Types.h";
-using refcounted class nsIPrincipal from "mozilla/dom/PermissionMessageUtils.h";
-using mozilla::dom::BrowsingContextId from "mozilla/dom/ipc/IdType.h";
 
 
 namespace mozilla {
 namespace dom {
 
 struct MessagePortIdentifier
 {
   nsID uuid;
@@ -180,18 +178,10 @@ struct PerformanceInfo
   // True if the document window is the top window
   bool isTopLevel;
   // Memory
   PerformanceMemoryInfo memory;
   // Counters per category. For workers, a single entry
   CategoryDispatch[] items;
 };
 
-struct WindowGlobalInit
-{
-  nsIPrincipal principal;
-  BrowsingContextId browsingContextId;
-  uint64_t innerWindowId;
-  uint64_t outerWindowId;
-};
-
 } // namespace dom
 } // namespace mozilla
--- a/dom/ipc/PBrowser.ipdl
+++ b/dom/ipc/PBrowser.ipdl
@@ -13,17 +13,16 @@ include protocol PFilePicker;
 include protocol PIndexedDBPermissionRequest;
 include protocol PPluginWidget;
 include protocol PRemotePrintJob;
 include protocol PChildToParentStream;
 include protocol PParentToChildStream;
 include protocol PFileDescriptorSet;
 include protocol PIPCBlobInputStream;
 include protocol PPaymentRequest;
-include protocol PWindowGlobal;
 
 include DOMTypes;
 include IPCBlob;
 include IPCStream;
 include JavaScriptTypes;
 include URIParams;
 include PPrintingTypes;
 include PTabContext;
@@ -82,17 +81,16 @@ using mozilla::EventMessage from "mozill
 using nsEventStatus from "mozilla/EventForwards.h";
 using mozilla::Modifiers from "mozilla/EventForwards.h";
 using nsSizeMode from "nsIWidgetListener.h";
 using mozilla::widget::CandidateWindowPosition from "ipc/nsGUIEventIPC.h";
 using class mozilla::NativeEventData from "ipc/nsGUIEventIPC.h";
 using mozilla::FontRange from "ipc/nsGUIEventIPC.h";
 using mozilla::a11y::IAccessibleHolder from "mozilla/a11y/IPCTypes.h";
 using mozilla::OriginAttributes from "mozilla/ipc/BackgroundUtils.h";
-using mozilla::dom::BrowsingContextId from "mozilla/dom/ipc/IdType.h";
 
 namespace mozilla {
 namespace dom {
 
 struct ShowInfo
 {
   nsString name;
   bool fullscreenAllowed;
@@ -115,17 +113,16 @@ nested(upto inside_cpow) sync protocol P
     manager PContent or PContentBridge;
 
     manages PColorPicker;
     manages PDocAccessible;
     manages PFilePicker;
     manages PIndexedDBPermissionRequest;
     manages PPluginWidget;
     manages PPaymentRequest;
-    manages PWindowGlobal;
 
 both:
     async AsyncMessage(nsString aMessage, CpowEntry[] aCpows,
                        Principal aPrincipal, ClonedMessageData aData);
 
 parent:
     /**
      * Tell the parent process a new accessible document has been created.
@@ -143,22 +140,16 @@ parent:
      * in e10s mode. This is always initiated from the child in response
      * to windowed plugin creation.
      */
     sync PPluginWidget();
 
     async PPaymentRequest();
 
     /**
-     * Construct a new WindowGlobal actor for a window global in the given
-     * BrowsingContext and with the given principal.
-     */
-    async PWindowGlobal(WindowGlobalInit init);
-
-    /**
      * Sends an NS_NATIVE_CHILD_OF_SHAREABLE_WINDOW to be adopted by the
      * widget's shareable window on the chrome side. Only used on Windows.
      */
     async SetNativeChildOfShareableWindow(uintptr_t childWindow);
 
     /**
      * When content moves focus from a native plugin window that's a child
      * of the native browser window we need to move native focus to the
@@ -583,18 +574,16 @@ parent:
     async ShowCanvasPermissionPrompt(nsCString aFirstPartyURI);
 
     sync SetSystemFont(nsCString aFontName);
     sync GetSystemFont() returns (nsCString retval);
 
     sync SetPrefersReducedMotionOverrideForTest(bool aValue);
     sync ResetPrefersReducedMotionOverrideForTest();
 
-    async RootBrowsingContext(BrowsingContextId aId);
-
 child:
     /**
      * Notify the remote browser that it has been Show()n on this
      * side, with the given |visibleRect|.  This message is expected
      * to trigger creation of the remote browser's "widget".
      *
      * |Show()| and |Move()| take IntSizes rather than Rects because
      * content processes always render to a virtual <0, 0> top-left
deleted file mode 100644
--- a/dom/ipc/PWindowGlobal.ipdl
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
-/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
-/* 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 protocol PBrowser;
-include protocol PInProcess;
-
-include DOMTypes;
-
-using refcounted class nsIURI from "mozilla/ipc/URIUtils.h";
-
-namespace mozilla {
-namespace dom {
-
-/**
- * A PWindowGlobal actor has a lifetime matching that of a single Window Global,
- * specifically a |nsGlobalWindowInner|. These actors will form a parent/child
- * link either between the chrome/content process, or will be in-process, for
- * documents which are loaded in the chrome process.
- */
-async protocol PWindowGlobal
-{
-  manager PBrowser or PInProcess;
-
-parent:
-  /// Update the URI of the document in this WindowGlobal.
-  async UpdateDocumentURI(nsIURI aUri);
-
-  async __delete__();
-};
-
-} // namespace dom
-} // namespace mozilla
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -118,17 +118,16 @@
 #include "nsQueryObject.h"
 #include "nsIHttpChannel.h"
 #include "mozilla/dom/DocGroup.h"
 #include "nsString.h"
 #include "nsISupportsPrimitives.h"
 #include "mozilla/Telemetry.h"
 #include "nsDocShellLoadState.h"
 #include "nsWebBrowser.h"
-#include "mozilla/dom/WindowGlobalChild.h"
 
 #ifdef XP_WIN
 #include "mozilla/plugins/PluginWidgetChild.h"
 #endif
 
 #ifdef NS_PRINTING
 #include "nsIPrintSession.h"
 #include "nsIPrintSettings.h"
@@ -591,21 +590,16 @@ TabChild::Init()
   docShell->SetAffectPrivateSessionLifetime(
       mChromeFlags & nsIWebBrowserChrome::CHROME_PRIVATE_LIFETIME);
   nsCOMPtr<nsILoadContext> loadContext = do_GetInterface(WebNavigation());
   MOZ_ASSERT(loadContext);
   loadContext->SetPrivateBrowsing(OriginAttributesRef().mPrivateBrowsingId > 0);
   loadContext->SetRemoteTabs(
       mChromeFlags & nsIWebBrowserChrome::CHROME_REMOTE_WINDOW);
 
-  // Send our browsing context to the parent process.
-  RefPtr<BrowsingContext> browsingContext =
-    nsDocShell::Cast(docShell)->GetBrowsingContext();
-  SendRootBrowsingContext(BrowsingContextId(browsingContext->Id()));
-
   // Few lines before, baseWindow->Create() will end up creating a new
   // window root in nsGlobalWindow::SetDocShell.
   // Then this chrome event handler, will be inherited to inner windows.
   // We want to also set it to the docshell so that inner windows
   // and any code that has access to the docshell
   // can all listen to the same chrome event handler.
   // XXX: ideally, we would set a chrome event handler earlier,
   // and all windows, even the root one, will use the docshell one.
@@ -3445,31 +3439,16 @@ TabChild::AllocPPaymentRequestChild()
 
 bool
 TabChild::DeallocPPaymentRequestChild(PPaymentRequestChild* actor)
 {
   delete actor;
   return true;
 }
 
-PWindowGlobalChild*
-TabChild::AllocPWindowGlobalChild(const WindowGlobalInit&)
-{
-  MOZ_CRASH("We should never be manually allocating PWindowGlobalChild actors");
-  return nullptr;
-}
-
-bool
-TabChild::DeallocPWindowGlobalChild(PWindowGlobalChild* aActor)
-{
-  // This reference was added in WindowGlobalChild::Create.
-  static_cast<WindowGlobalChild*>(aActor)->Release();
-  return true;
-}
-
 ScreenIntSize
 TabChild::GetInnerSize()
 {
   LayoutDeviceIntSize innerSize =
     RoundedToInt(mUnscaledInnerSize * mPuppetWidget->GetDefaultScale());
   return ViewAs<ScreenPixel>(innerSize, PixelCastJustification::LayoutDeviceIsScreenForTabDims);
 };
 
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -700,20 +700,16 @@ public:
   {
     MOZ_ASSERT(HasVisibleTabs());
     return *sVisibleTabs;
   }
 
 protected:
   virtual ~TabChild();
 
-  virtual PWindowGlobalChild* AllocPWindowGlobalChild(const WindowGlobalInit& aInit) override;
-
-  virtual bool DeallocPWindowGlobalChild(PWindowGlobalChild* aActor) override;
-
   virtual mozilla::ipc::IPCResult RecvDestroy() override;
 
   virtual mozilla::ipc::IPCResult RecvSetDocShellIsActive(const bool& aIsActive) override;
 
   virtual mozilla::ipc::IPCResult RecvRenderLayers(const bool& aEnabled, const bool& aForce, const layers::LayersObserverEpoch& aEpoch) override;
 
   virtual mozilla::ipc::IPCResult RecvRequestRootPaint(const IntRect& aRect, const float& aScale, const nscolor& aBackgroundColor, RequestRootPaintResolver&& aResolve) override;
 
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -95,18 +95,16 @@
 #include "ImageOps.h"
 #include "UnitTransforms.h"
 #include <algorithm>
 #include "mozilla/NullPrincipal.h"
 #include "mozilla/WebBrowserPersistDocumentParent.h"
 #include "ProcessPriorityManager.h"
 #include "nsString.h"
 #include "IHistory.h"
-#include "mozilla/dom/WindowGlobalParent.h"
-#include "mozilla/dom/ChromeBrowsingContext.h"
 
 #ifdef XP_WIN
 #include "mozilla/plugins/PluginWidgetParent.h"
 #endif
 
 #if defined(XP_WIN) && defined(ACCESSIBILITY)
 #include "mozilla/a11y/AccessibleWrap.h"
 #include "mozilla/a11y/Compatibility.h"
@@ -1059,39 +1057,16 @@ TabParent::DeallocPIndexedDBPermissionRe
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aActor);
 
   return
     mozilla::dom::indexedDB::DeallocPIndexedDBPermissionRequestParent(aActor);
 }
 
-IPCResult
-TabParent::RecvPWindowGlobalConstructor(PWindowGlobalParent* aActor,
-                                        const WindowGlobalInit& aInit)
-{
-  static_cast<WindowGlobalParent*>(aActor)->Init(aInit);
-  return IPC_OK();
-}
-
-PWindowGlobalParent*
-TabParent::AllocPWindowGlobalParent(const WindowGlobalInit& aInit)
-{
-  // Reference freed in DeallocPWindowGlobalParent.
-  return do_AddRef(new WindowGlobalParent(aInit, /* inproc */ false)).take();
-}
-
-bool
-TabParent::DeallocPWindowGlobalParent(PWindowGlobalParent* aActor)
-{
-  // Free reference from AllocPWindowGlobalParent.
-  static_cast<WindowGlobalParent*>(aActor)->Release();
-  return true;
-}
-
 void
 TabParent::SendMouseEvent(const nsAString& aType, float aX, float aY,
                           int32_t aButton, int32_t aClickCount,
                           int32_t aModifiers, bool aIgnoreRootScrollFrame)
 {
   if (!mIsDestroyed) {
     Unused << PBrowserParent::SendMouseEvent(nsString(aType), aX, aY,
                                              aButton, aClickCount,
@@ -3743,25 +3718,16 @@ TabParent::RecvGetSystemFont(nsCString* 
 {
   nsCOMPtr<nsIWidget> widget = GetWidget();
   if (widget) {
     widget->GetSystemFont(*aFontName);
   }
   return IPC_OK();
 }
 
-mozilla::ipc::IPCResult
-TabParent::RecvRootBrowsingContext(const BrowsingContextId& aId)
-{
-  MOZ_ASSERT(!mBrowsingContext, "May only set browsing context once!");
-  mBrowsingContext = ChromeBrowsingContext::Get(aId);
-  MOZ_ASSERT(mBrowsingContext, "Invalid ID!");
-  return IPC_OK();
-}
-
 NS_IMETHODIMP
 FakeChannel::OnAuthAvailable(nsISupports *aContext, nsIAuthInformation *aAuthInfo)
 {
   nsAuthInformationHolder* holder =
     static_cast<nsAuthInformationHolder*>(aAuthInfo);
 
   if (!net::gNeckoChild->SendOnAuthAvailable(mCallbackId,
                                              holder->User(),
--- a/dom/ipc/TabParent.h
+++ b/dom/ipc/TabParent.h
@@ -62,17 +62,16 @@ struct IMENotification;
 
 namespace gfx {
 class SourceSurface;
 class DataSourceSurface;
 } // namespace gfx
 
 namespace dom {
 
-class ChromeBrowsingContext;
 class ClonedMessageData;
 class nsIContentParent;
 class Element;
 class DataTransfer;
 
 namespace ipc {
 class StructuredCloneData;
 } // ipc namespace
@@ -126,18 +125,16 @@ public:
   }
 
   already_AddRefed<nsILoadContext> GetLoadContext();
 
   already_AddRefed<nsIWidget> GetTopLevelWidget();
 
   nsIXULBrowserWindow* GetXULBrowserWindow();
 
-  ChromeBrowsingContext* GetBrowsingContext() { return mBrowsingContext; }
-
   void Destroy();
 
   void RemoveWindowListeners();
 
   void AddWindowListeners();
 
   virtual mozilla::ipc::IPCResult RecvMoveFocus(const bool& aForward,
                                                 const bool& aForDocumentNavigation) override;
@@ -325,26 +322,16 @@ public:
                                 const uint32_t& aMsaaID,
                                 const IAccessibleHolder& aDocCOMProxy) override;
 
   /**
    * Return the top level doc accessible parent for this tab.
    */
   a11y::DocAccessibleParent* GetTopLevelDocAccessible() const;
 
-  virtual PWindowGlobalParent*
-  AllocPWindowGlobalParent(const WindowGlobalInit& aInit) override;
-
-  virtual bool
-  DeallocPWindowGlobalParent(PWindowGlobalParent* aActor) override;
-
-  virtual mozilla::ipc::IPCResult
-  RecvPWindowGlobalConstructor(PWindowGlobalParent* aActor,
-                               const WindowGlobalInit& aInit) override;
-
   void LoadURL(nsIURI* aURI);
 
   void InitRendering();
   void MaybeShowFrame();
 
   // XXX/cjones: it's not clear what we gain by hiding these
   // message-sending functions under a layer of indirection and
   // eating the return values
@@ -631,18 +618,16 @@ protected:
   virtual mozilla::ipc::IPCResult RecvPaintWhileInterruptingJSNoOp(const LayersObserverEpoch& aEpoch) override;
 
   virtual mozilla::ipc::IPCResult RecvSetDimensions(const uint32_t& aFlags,
                                                     const int32_t& aX, const int32_t& aY,
                                                     const int32_t& aCx, const int32_t& aCy) override;
 
   virtual mozilla::ipc::IPCResult RecvShowCanvasPermissionPrompt(const nsCString& aFirstPartyURI) override;
 
-  virtual mozilla::ipc::IPCResult RecvRootBrowsingContext(const BrowsingContextId& aId) override;
-
   mozilla::ipc::IPCResult
   RecvSetSystemFont(const nsCString& aFontName) override;
   mozilla::ipc::IPCResult
   RecvGetSystemFont(nsCString* aFontName) override;
 
   virtual mozilla::ipc::IPCResult
   RecvVisitURI(const URIParams& aURI, const OptionalURIParams& aLastVisitedURI,
                const uint32_t& aFlags) override;
@@ -708,19 +693,16 @@ private:
 
   nsCOMPtr<nsILoadContext> mLoadContext;
 
   // We keep a strong reference to the frameloader after we've sent the
   // Destroy message and before we've received __delete__. This allows us to
   // dispatch message manager messages during this time.
   RefPtr<nsFrameLoader> mFrameLoader;
 
-  // The root browsing context loaded in this TabParent.
-  RefPtr<ChromeBrowsingContext> mBrowsingContext;
-
   TabId mTabId;
 
   // When loading a new tab or window via window.open, the child is
   // responsible for loading the URL it wants into the new TabChild. When the
   // parent receives the CreateWindow message, though, it sends a LoadURL
   // message, usually for about:blank. It's important for the about:blank load
   // to get processed because the Firefox frontend expects every new window to
   // immediately start loading something (see bug 1123090). However, we want
deleted file mode 100644
--- a/dom/ipc/WindowGlobalChild.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
-/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
-/* 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 "mozilla/dom/WindowGlobalChild.h"
-#include "mozilla/ipc/InProcessChild.h"
-#include "mozilla/dom/BrowsingContext.h"
-#include "mozilla/dom/WindowGlobalActorsBinding.h"
-
-namespace mozilla {
-namespace dom {
-
-typedef nsRefPtrHashtable<nsUint64HashKey, WindowGlobalChild> WGCByIdMap;
-static StaticAutoPtr<WGCByIdMap> gWindowGlobalChildById;
-
-WindowGlobalChild::WindowGlobalChild(nsGlobalWindowInner* aWindow,
-                                     dom::BrowsingContext* aBrowsingContext)
-  : mWindowGlobal(aWindow)
-  , mBrowsingContext(aBrowsingContext)
-  , mInnerWindowId(aWindow->WindowID())
-  , mOuterWindowId(aWindow->GetOuterWindow()->WindowID())
-  , mIPCClosed(true)
-{
-}
-
-already_AddRefed<WindowGlobalChild>
-WindowGlobalChild::Create(nsGlobalWindowInner* aWindow)
-{
-  nsCOMPtr<nsIPrincipal> principal = aWindow->GetPrincipal();
-  MOZ_ASSERT(principal);
-
-  RefPtr<nsDocShell> docshell = nsDocShell::Cast(aWindow->GetDocShell());
-  MOZ_ASSERT(docshell);
-
-  // Initalize our WindowGlobalChild object.
-  RefPtr<dom::BrowsingContext> bc = docshell->GetBrowsingContext();
-  RefPtr<WindowGlobalChild> wgc = new WindowGlobalChild(aWindow, bc);
-
-  WindowGlobalInit init(principal,
-                        BrowsingContextId(wgc->BrowsingContext()->Id()),
-                        wgc->mInnerWindowId,
-                        wgc->mOuterWindowId);
-
-  // Send the link constructor over PInProcessChild or PBrowser.
-  if (XRE_IsParentProcess()) {
-    InProcessChild* ipc = InProcessChild::Singleton();
-    if (!ipc) {
-      return nullptr;
-    }
-
-    // Note: ref is released in DeallocPWindowGlobalChild
-    ipc->SendPWindowGlobalConstructor(do_AddRef(wgc).take(), init);
-  } else {
-    RefPtr<TabChild> tabChild = TabChild::GetFrom(static_cast<mozIDOMWindow*>(aWindow));
-    MOZ_ASSERT(tabChild);
-
-    // Note: ref is released in DeallocPWindowGlobalChild
-    tabChild->SendPWindowGlobalConstructor(do_AddRef(wgc).take(), init);
-  }
-  wgc->mIPCClosed = false;
-
-  // Register this WindowGlobal in the gWindowGlobalParentsById map.
-  if (!gWindowGlobalChildById) {
-    gWindowGlobalChildById = new WGCByIdMap();
-    ClearOnShutdown(&gWindowGlobalChildById);
-  }
-  auto entry = gWindowGlobalChildById->LookupForAdd(wgc->mInnerWindowId);
-  MOZ_RELEASE_ASSERT(!entry, "Duplicate WindowGlobalChild entry for ID!");
-  entry.OrInsert([&] { return wgc; });
-
-  return wgc.forget();
-}
-
-/* static */ already_AddRefed<WindowGlobalChild>
-WindowGlobalChild::GetByInnerWindowId(uint64_t aInnerWindowId)
-{
-  if (!gWindowGlobalChildById) {
-    return nullptr;
-  }
-  return gWindowGlobalChildById->Get(aInnerWindowId);
-}
-
-already_AddRefed<WindowGlobalParent>
-WindowGlobalChild::GetParentActor()
-{
-  if (mIPCClosed) {
-    return nullptr;
-  }
-  IProtocol* otherSide = InProcessChild::ParentActorFor(this);
-  return do_AddRef(static_cast<WindowGlobalParent*>(otherSide));
-}
-
-void
-WindowGlobalChild::ActorDestroy(ActorDestroyReason aWhy)
-{
-  mIPCClosed = true;
-  gWindowGlobalChildById->Remove(mInnerWindowId);
-}
-
-WindowGlobalChild::~WindowGlobalChild()
-{
-  MOZ_ASSERT(!gWindowGlobalChildById ||
-             !gWindowGlobalChildById->Contains(mInnerWindowId));
-}
-
-JSObject*
-WindowGlobalChild::WrapObject(JSContext* aCx,
-                               JS::Handle<JSObject*> aGivenProto)
-{
-  return WindowGlobalChild_Binding::Wrap(aCx, this, aGivenProto);
-}
-
-nsISupports*
-WindowGlobalChild::GetParentObject()
-{
-  return xpc::NativeGlobal(xpc::PrivilegedJunkScope());
-}
-
-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(WindowGlobalChild,
-                                      mWindowGlobal,
-                                      mBrowsingContext)
-
-NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(WindowGlobalChild, AddRef)
-NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(WindowGlobalChild, Release)
-
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/ipc/WindowGlobalChild.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
-/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
-/* 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_WindowGlobalChild_h
-#define mozilla_dom_WindowGlobalChild_h
-
-#include "mozilla/RefPtr.h"
-#include "mozilla/dom/PWindowGlobalChild.h"
-#include "nsWrapperCache.h"
-
-class nsGlobalWindowInner;
-class nsDocShell;
-
-namespace mozilla {
-namespace dom  {
-
-class BrowsingContext;
-class WindowGlobalParent;
-
-/**
- * Actor for a single nsGlobalWindowInner. This actor is used to communicate
- * information to the parent process asynchronously.
- */
-class WindowGlobalChild : public nsWrapperCache
-                        , public PWindowGlobalChild
-{
-public:
-  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WindowGlobalChild)
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WindowGlobalChild)
-
-  static already_AddRefed<WindowGlobalChild>
-  GetByInnerWindowId(uint64_t aInnerWindowId);
-
-  static already_AddRefed<WindowGlobalChild>
-  GetByInnerWindowId(const GlobalObject& aGlobal, uint64_t aInnerWindowId) {
-    return GetByInnerWindowId(aInnerWindowId);
-  }
-
-  dom::BrowsingContext* BrowsingContext() { return mBrowsingContext; }
-  nsGlobalWindowInner* WindowGlobal() { return mWindowGlobal; }
-
-  // Has this actor been shut down
-  bool IsClosed() { return mIPCClosed; }
-
-  // Check if this actor is managed by PInProcess, as-in the document is loaded
-  // in the chrome process.
-  bool IsInProcess() { return XRE_IsParentProcess(); }
-
-  // The Window ID for this WindowGlobal
-  uint64_t InnerWindowId() { return mInnerWindowId; }
-  uint64_t OuterWindowId() { return mOuterWindowId; }
-
-  // Get the other side of this actor if it is an in-process actor. Returns
-  // |nullptr| if the actor has been torn down, or is not in-process.
-  already_AddRefed<WindowGlobalParent> GetParentActor();
-
-  // Create and initialize the WindowGlobalChild object.
-  static already_AddRefed<WindowGlobalChild>
-  Create(nsGlobalWindowInner* aWindow);
-
-  nsISupports* GetParentObject();
-  JSObject* WrapObject(JSContext* aCx,
-                       JS::Handle<JSObject*> aGivenProto) override;
-
-protected:
-  virtual void ActorDestroy(ActorDestroyReason aWhy) override;
-
-private:
-  WindowGlobalChild(nsGlobalWindowInner* aWindow, dom::BrowsingContext* aBc);
-  ~WindowGlobalChild();
-
-  RefPtr<nsGlobalWindowInner> mWindowGlobal;
-  RefPtr<dom::BrowsingContext> mBrowsingContext;
-  uint64_t mInnerWindowId;
-  uint64_t mOuterWindowId;
-  bool mIPCClosed;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // !defined(mozilla_dom_WindowGlobalChild_h)
deleted file mode 100644
--- a/dom/ipc/WindowGlobalParent.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
-/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
-/* 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 "mozilla/dom/WindowGlobalParent.h"
-#include "mozilla/ipc/InProcessParent.h"
-#include "mozilla/dom/ChromeBrowsingContext.h"
-#include "mozilla/dom/WindowGlobalActorsBinding.h"
-
-using namespace mozilla::ipc;
-
-namespace mozilla {
-namespace dom {
-
-typedef nsRefPtrHashtable<nsUint64HashKey, WindowGlobalParent> WGPByIdMap;
-static StaticAutoPtr<WGPByIdMap> gWindowGlobalParentsById;
-
-WindowGlobalParent::WindowGlobalParent(const WindowGlobalInit& aInit,
-                                       bool aInProcess)
-  : mDocumentPrincipal(aInit.principal())
-  , mInnerWindowId(aInit.innerWindowId())
-  , mOuterWindowId(aInit.outerWindowId())
-  , mInProcess(aInProcess)
-  , mIPCClosed(true)  // Closed until WGP::Init
-{
-  MOZ_DIAGNOSTIC_ASSERT(XRE_IsParentProcess(), "Parent process only");
-  MOZ_RELEASE_ASSERT(mDocumentPrincipal, "Must have a valid principal");
-
-  // NOTE: mBrowsingContext initialized in Init()
-  MOZ_RELEASE_ASSERT(aInit.browsingContextId() != 0,
-                     "Must be made in BrowsingContext");
-}
-
-void
-WindowGlobalParent::Init(const WindowGlobalInit& aInit)
-{
-  MOZ_ASSERT(Manager(), "Should have a manager!");
-  MOZ_ASSERT(!mFrameLoader, "Cannot Init() a WindowGlobalParent twice!");
-
-  MOZ_ASSERT(mIPCClosed, "IPC shouldn't be open yet");
-  mIPCClosed = false;
-
-  // Register this WindowGlobal in the gWindowGlobalParentsById map.
-  if (!gWindowGlobalParentsById) {
-    gWindowGlobalParentsById = new WGPByIdMap();
-    ClearOnShutdown(&gWindowGlobalParentsById);
-  }
-  auto entry = gWindowGlobalParentsById->LookupForAdd(mInnerWindowId);
-  MOZ_RELEASE_ASSERT(!entry, "Duplicate WindowGlobalParent entry for ID!");
-  entry.OrInsert([&] { return this; });
-
-  // Determine which content process the window global is coming from.
-  ContentParentId processId(0);
-  if (!mInProcess) {
-    processId = static_cast<ContentParent*>(Manager()->Manager())->ChildID();
-  }
-
-  mBrowsingContext = ChromeBrowsingContext::Get(aInit.browsingContextId());
-  MOZ_ASSERT(mBrowsingContext);
-
-  // XXX(nika): This won't be the case soon, but for now this is a good
-  // assertion as we can't switch processes. We should relax this eventually.
-  MOZ_ASSERT(mBrowsingContext->IsOwnedByProcess(processId));
-
-  // Attach ourself to the browsing context.
-  mBrowsingContext->RegisterWindowGlobal(this);
-
-  // Determine what toplevel frame element our WindowGlobalParent is being
-  // embedded in.
-  RefPtr<Element> frameElement;
-  if (mInProcess) {
-    // In the in-process case, we can get it from the other side's
-    // WindowGlobalChild.
-    MOZ_ASSERT(Manager()->GetProtocolTypeId() == PInProcessMsgStart);
-    RefPtr<WindowGlobalChild> otherSide = GetChildActor();
-    if (otherSide && otherSide->WindowGlobal()) {
-      // Get the toplevel window from the other side.
-      RefPtr<nsDocShell> docShell = nsDocShell::Cast(otherSide->WindowGlobal()->GetDocShell());
-      if (docShell) {
-        docShell->GetTopFrameElement(getter_AddRefs(frameElement));
-      }
-    }
-  } else {
-    // In the cross-process case, we can get the frame element from our manager.
-    MOZ_ASSERT(Manager()->GetProtocolTypeId() == PBrowserMsgStart);
-    frameElement = static_cast<TabParent*>(Manager())->GetOwnerElement();
-  }
-
-  // Extract the nsFrameLoader from the current frame element. We may not have a
-  // nsFrameLoader if we are a chrome document.
-  nsCOMPtr<nsIFrameLoaderOwner> flOwner = do_QueryInterface(frameElement);
-  if (flOwner) {
-    mFrameLoader = flOwner->GetFrameLoader();
-  }
-}
-
-/* static */ already_AddRefed<WindowGlobalParent>
-WindowGlobalParent::GetByInnerWindowId(uint64_t aInnerWindowId)
-{
-  if (!gWindowGlobalParentsById) {
-    return nullptr;
-  }
-  return gWindowGlobalParentsById->Get(aInnerWindowId);
-}
-
-already_AddRefed<WindowGlobalChild>
-WindowGlobalParent::GetChildActor()
-{
-  if (mIPCClosed) {
-    return nullptr;
-  }
-  IProtocol* otherSide = InProcessParent::ChildActorFor(this);
-  return do_AddRef(static_cast<WindowGlobalChild*>(otherSide));
-}
-
-IPCResult
-WindowGlobalParent::RecvUpdateDocumentURI(nsIURI* aURI)
-{
-  // XXX(nika): Assert that the URI change was one which makes sense (either
-  // about:blank -> a real URI, or a legal push/popstate URI change?)
-  mDocumentURI = aURI;
-  return IPC_OK();
-}
-
-void
-WindowGlobalParent::ActorDestroy(ActorDestroyReason aWhy)
-{
-  mIPCClosed = true;
-  gWindowGlobalParentsById->Remove(mInnerWindowId);
-  mBrowsingContext->UnregisterWindowGlobal(this);
-}
-
-WindowGlobalParent::~WindowGlobalParent()
-{
-  MOZ_ASSERT(!gWindowGlobalParentsById ||
-             !gWindowGlobalParentsById->Contains(mInnerWindowId));
-}
-
-JSObject*
-WindowGlobalParent::WrapObject(JSContext* aCx,
-                               JS::Handle<JSObject*> aGivenProto)
-{
-  return WindowGlobalParent_Binding::Wrap(aCx, this, aGivenProto);
-}
-
-nsISupports*
-WindowGlobalParent::GetParentObject()
-{
-  return xpc::NativeGlobal(xpc::PrivilegedJunkScope());
-}
-
-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(WindowGlobalParent,
-                                      mFrameLoader,
-                                      mBrowsingContext)
-
-NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(WindowGlobalParent, AddRef)
-NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(WindowGlobalParent, Release)
-
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/ipc/WindowGlobalParent.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
-/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
-/* 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_WindowGlobalParent_h
-#define mozilla_dom_WindowGlobalParent_h
-
-#include "mozilla/RefPtr.h"
-#include "mozilla/dom/PWindowGlobalParent.h"
-#include "nsWrapperCache.h"
-
-class nsIPrincipal;
-class nsIURI;
-class nsFrameLoader;
-
-namespace mozilla {
-namespace dom  {
-
-class ChromeBrowsingContext;
-class WindowGlobalChild;
-
-/**
- * A handle in the parent process to a specific nsGlobalWindowInner object.
- */
-class WindowGlobalParent final : public nsWrapperCache
-                               , public PWindowGlobalParent
-{
-public:
-  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WindowGlobalParent)
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WindowGlobalParent)
-
-  static already_AddRefed<WindowGlobalParent>
-  GetByInnerWindowId(uint64_t aInnerWindowId);
-
-  static already_AddRefed<WindowGlobalParent>
-  GetByInnerWindowId(const GlobalObject& aGlobal, uint64_t aInnerWindowId) {
-    return GetByInnerWindowId(aInnerWindowId);
-  }
-
-  // Has this actor been shut down
-  bool IsClosed() { return mIPCClosed; }
-
-  // Check if this actor is managed by PInProcess, as-in the document is loaded
-  // in-process.
-  bool IsInProcess() { return mInProcess; }
-
-  // Get the other side of this actor if it is an in-process actor. Returns
-  // |nullptr| if the actor has been torn down, or is not in-process.
-  already_AddRefed<WindowGlobalChild> GetChildActor();
-
-  // The principal of this WindowGlobal. This value will not change over the
-  // lifetime of the WindowGlobal object, even to reflect changes in
-  // |document.domain|.
-  nsIPrincipal* DocumentPrincipal() { return mDocumentPrincipal; }
-
-  // The BrowsingContext which this WindowGlobal has been loaded into.
-  ChromeBrowsingContext* BrowsingContext() { return mBrowsingContext; }
-
-  // Get the root nsFrameLoader object for the tree of BrowsingContext nodes
-  // which this WindowGlobal is a part of. This will be the nsFrameLoader
-  // holding the TabParent for remote tabs, and the root content frameloader for
-  // non-remote tabs.
-  nsFrameLoader* GetRootFrameLoader() { return mFrameLoader; }
-
-  // The current URI which loaded in the document.
-  nsIURI* GetDocumentURI() { return mDocumentURI; }
-
-  // Window IDs for inner/outer windows.
-  uint64_t OuterWindowId() { return mOuterWindowId; }
-  uint64_t InnerWindowId() { return mInnerWindowId; }
-
-  // Create a WindowGlobalParent from over IPC. This method should not be called
-  // from outside of the IPC constructors.
-  WindowGlobalParent(const WindowGlobalInit& aInit, bool aInProcess);
-
-  // Initialize the mFrameLoader fields for a created WindowGlobalParent. Must
-  // be called after setting the Manager actor.
-  void Init(const WindowGlobalInit& aInit);
-
-  nsISupports* GetParentObject();
-  JSObject* WrapObject(JSContext* aCx,
-                       JS::Handle<JSObject*> aGivenProto) override;
-
-protected:
-  // IPC messages
-  mozilla::ipc::IPCResult RecvUpdateDocumentURI(nsIURI* aURI) override;
-
-  void ActorDestroy(ActorDestroyReason aWhy) override;
-
-private:
-  ~WindowGlobalParent();
-
-  // NOTE: This document principal doesn't reflect possible |document.domain|
-  // mutations which may have been made in the actual document.
-  nsCOMPtr<nsIPrincipal> mDocumentPrincipal;
-  nsCOMPtr<nsIURI> mDocumentURI;
-  RefPtr<nsFrameLoader> mFrameLoader;
-  RefPtr<ChromeBrowsingContext> mBrowsingContext;
-  uint64_t mInnerWindowId;
-  uint64_t mOuterWindowId;
-  bool mInProcess;
-  bool mIPCClosed;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // !defined(mozilla_dom_WindowGlobalParent_h)
--- a/dom/ipc/moz.build
+++ b/dom/ipc/moz.build
@@ -45,18 +45,16 @@ EXPORTS.mozilla.dom += [
     'nsIContentParent.h',
     'PermissionMessageUtils.h',
     'TabChild.h',
     'TabContext.h',
     'TabMessageUtils.h',
     'TabParent.h',
     'URLClassifierChild.h',
     'URLClassifierParent.h',
-    'WindowGlobalChild.h',
-    'WindowGlobalParent.h',
 ]
 
 EXPORTS.mozilla += [
     'PreallocatedProcessManager.h',
     'ProcessHangMonitor.h',
     'ProcessHangMonitorIPC.h',
     'ProcessPriorityManager.h',
 ]
@@ -82,18 +80,16 @@ UNIFIED_SOURCES += [
     'SharedMap.cpp',
     'SharedStringMap.cpp',
     'StructuredCloneData.cpp',
     'TabChild.cpp',
     'TabContext.cpp',
     'TabMessageUtils.cpp',
     'TabParent.cpp',
     'URLClassifierParent.cpp',
-    'WindowGlobalChild.cpp',
-    'WindowGlobalParent.cpp',
 ]
 
 # ContentChild.cpp cannot be compiled in unified mode on  linux due to Time conflict
 SOURCES += [
     'ContentChild.cpp',
     'ProcessHangMonitor.cpp',
 ]
 
@@ -111,17 +107,16 @@ IPDL_SOURCES += [
     'PFilePicker.ipdl',
     'PLoginReputation.ipdl',
     'PPluginWidget.ipdl',
     'PProcessHangMonitor.ipdl',
     'PTabContext.ipdlh',
     'PURLClassifier.ipdl',
     'PURLClassifierInfo.ipdlh',
     'PURLClassifierLocal.ipdl',
-    'PWindowGlobal.ipdl',
     'ServiceWorkerConfiguration.ipdlh',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] == 'Darwin':
--- a/dom/webidl/FrameLoader.webidl
+++ b/dom/webidl/FrameLoader.webidl
@@ -29,22 +29,16 @@ interface FrameLoader {
   /**
    * Get an nsILoadContext for the top-level docshell. For remote
    * frames, a shim is returned that contains private browsing and app
    * information.
    */
   readonly attribute LoadContext loadContext;
 
   /**
-   * Get the root BrowsingContext within the frame.
-   * This may be null immediately after creating a remote frame.
-   */
-  readonly attribute BrowsingContext? browsingContext;
-
-  /**
    * Get the ParentSHistory for the nsFrameLoader. May return null if this
    * frameloader is not for a toplevel frame.
    */
   readonly attribute ParentSHistory? parentSHistory;
 
   /**
    * Find out whether the loader's frame is at too great a depth in
    * the frame tree.  This can be used to decide what operations may
--- a/gfx/cairo/cairo/src/moz.build
+++ b/gfx/cairo/cairo/src/moz.build
@@ -29,17 +29,16 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] not in (
         'cairo-pdf-surface.c',
         'cairo-truetype-subset.c',
         # cairo-type1-subset.c should be here, but it's only supported on freetype platforms
         'cairo-type1-fallback.c',
         'cairo-type3-glyph-surface.c',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
-    DEFINES['MOZ_DISABLE_WINDOWS_WRAPPER'] = True
     EXPORTS.cairo += [
         'cairo-win32.h',
     ]
     SOURCES += [
         'cairo-dwrite-font.cpp',
     ]
     if CONFIG['MOZ_ENABLE_D2D_SURFACE']:
         SOURCES += [
--- a/gfx/thebes/gfxDWriteFonts.cpp
+++ b/gfx/thebes/gfxDWriteFonts.cpp
@@ -257,17 +257,17 @@ gfxDWriteFont::ComputeMetrics(AntialiasO
         }
     }
 
     mMetrics->internalLeading = std::max(mMetrics->maxHeight - mMetrics->emHeight, 0.0);
     mMetrics->externalLeading = ceil(fontMetrics.lineGap * mFUnitsConvFactor);
 
     UINT32 ucs = L' ';
     UINT16 glyph;
-    HRESULT hr = mFontFace->GetGlyphIndices(&ucs, 1, &glyph);
+    HRESULT hr = mFontFace->GetGlyphIndicesW(&ucs, 1, &glyph);
     if (FAILED(hr)) {
         mMetrics->spaceWidth = 0;
     } else {
         mSpaceGlyph = glyph;
         mMetrics->spaceWidth = MeasureGlyphWidth(glyph);
     }
 
     // try to get aveCharWidth from the OS/2 table, fall back to measuring 'x'
@@ -287,27 +287,27 @@ gfxDWriteFont::ComputeMetrics(AntialiasO
                 mMetrics->aveCharWidth =
                     int16_t(os2->xAvgCharWidth) * mFUnitsConvFactor;
             }
         }
     }
 
     if (mMetrics->aveCharWidth < 1) {
         ucs = L'x';
-        if (SUCCEEDED(mFontFace->GetGlyphIndices(&ucs, 1, &glyph))) {
+        if (SUCCEEDED(mFontFace->GetGlyphIndicesW(&ucs, 1, &glyph))) {
             mMetrics->aveCharWidth = MeasureGlyphWidth(glyph);
         }
         if (mMetrics->aveCharWidth < 1) {
             // Let's just assume the X is square.
             mMetrics->aveCharWidth = fontMetrics.xHeight * mFUnitsConvFactor;
         }
     }
 
     ucs = L'0';
-    if (SUCCEEDED(mFontFace->GetGlyphIndices(&ucs, 1, &glyph))) {
+    if (SUCCEEDED(mFontFace->GetGlyphIndicesW(&ucs, 1, &glyph))) {
         mMetrics->zeroOrAveCharWidth = MeasureGlyphWidth(glyph);
     }
     if (mMetrics->zeroOrAveCharWidth < 1) {
         mMetrics->zeroOrAveCharWidth = mMetrics->aveCharWidth;
     }
 
     mMetrics->underlineOffset =
         fontMetrics.underlinePosition * mFUnitsConvFactor;
--- a/gfx/vr/service/openvr/moz.build
+++ b/gfx/vr/service/openvr/moz.build
@@ -3,19 +3,16 @@
 # 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/.
 
 FINAL_LIBRARY = 'xul'
 
 DEFINES['VR_API_PUBLIC'] = True
 
-# Windows.h wrappers conflict with internal methods in openvr
-DEFINES['MOZ_DISABLE_WINDOWS_WRAPPER'] = True
-
 if CONFIG['OS_ARCH'] == 'WINNT':
     if CONFIG['HAVE_64BIT_BUILD']:
         DEFINES['WIN64'] = True
     else:
         DEFINES['WIN32'] = True
 
 if CONFIG['OS_ARCH'] == 'Darwin':
     DEFINES['POSIX'] = True
deleted file mode 100644
--- a/ipc/glue/InProcessChild.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -*- 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/. */
-
-#include "mozilla/ipc/InProcessChild.h"
-#include "mozilla/dom/WindowGlobalChild.h"
-
-using namespace mozilla::dom;
-
-namespace mozilla {
-namespace ipc {
-
-PWindowGlobalChild*
-InProcessChild::AllocPWindowGlobalChild(const WindowGlobalInit& aInit)
-{
-  MOZ_ASSERT_UNREACHABLE("PWindowGlobalChild should not be created manually");
-  return nullptr;
-}
-
-bool
-InProcessChild::DeallocPWindowGlobalChild(PWindowGlobalChild* aActor)
-{
-  // Free IPC-held reference
-  static_cast<WindowGlobalChild*>(aActor)->Release();
-  return true;
-}
-
-} // namespace ipc
-} // namespace mozilla
deleted file mode 100644
--- a/ipc/glue/InProcessChild.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- 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_ipc_InProcessChild_h
-#define mozilla_ipc_InProcessChild_h
-
-#include "mozilla/ipc/PInProcessChild.h"
-#include "mozilla/StaticPtr.h"
-
-namespace mozilla {
-namespace dom {
-class PWindowGlobalParent;
-class PWindowGlobalChild;
-} // namespace dom
-
-namespace ipc {
-
-class InProcessParent;
-
-/**
- * The `InProcessChild` class represents the child half of a main-thread to
- * main-thread actor.
- *
- * The `PInProcess` actor should be used as an alternate manager to `PContent`
- * for async actors which want to communicate uniformly between Content->Chrome
- * and Chrome->Chrome situations.
- */
-class InProcessChild : public PInProcessChild
-{
-public:
-  friend class InProcessParent;
-
-  NS_INLINE_DECL_REFCOUNTING(InProcessChild)
-
-  // Get the singleton instance of this actor.
-  static InProcessChild* Singleton();
-
-  // Get the parent side of the in-process child actor |aActor|. If |aActor| is
-  // not an in-process actor, or is not connected, this method will return
-  // |nullptr|.
-  static IProtocol* ParentActorFor(IProtocol* aActor);
-
-protected:
-  virtual mozilla::dom::PWindowGlobalChild*
-  AllocPWindowGlobalChild(const WindowGlobalInit& aInit) override;
-
-  virtual bool
-  DeallocPWindowGlobalChild(mozilla::dom::PWindowGlobalChild* aActor) override;
-
-private:
-  // NOTE: PInProcess lifecycle management is declared as staic methods and
-  // state on InProcessParent, and implemented in InProcessImpl.cpp.
-  virtual void ActorDestroy(ActorDestroyReason aWhy) override;
-  virtual void DeallocPInProcessChild() override;
-  ~InProcessChild() = default;
-
-  static StaticRefPtr<InProcessChild> sSingleton;
-};
-
-} // namespace ipc
-} // namespace mozilla
-
-#endif // defined(mozilla_ipc_InProcessChild_h)
deleted file mode 100644
--- a/ipc/glue/InProcessImpl.cpp
+++ /dev/null
@@ -1,212 +0,0 @@
-/* -*- 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/. */
-
-#include "mozilla/ipc/InProcessParent.h"
-#include "mozilla/ipc/InProcessChild.h"
-#include "nsIObserverService.h"
-#include "mozilla/Services.h"
-
-// This file contains the implementation of core InProcess lifecycle management
-// facilities.
-
-namespace mozilla {
-namespace ipc {
-
-StaticRefPtr<InProcessParent> InProcessParent::sSingleton;
-StaticRefPtr<InProcessChild> InProcessChild::sSingleton;
-bool InProcessParent::sShutdown = false;
-
-
-//////////////////////////////////////////
-// InProcess actor lifecycle management //
-//////////////////////////////////////////
-
-/* static */ InProcessChild*
-InProcessChild::Singleton() {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (!sSingleton) {
-    InProcessParent::Startup();
-  }
-  return sSingleton;
-}
-
-/* static */ InProcessParent*
-InProcessParent::Singleton() {
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (!sSingleton) {
-    InProcessParent::Startup();
-  }
-  return sSingleton;
-}
-
-/* static */ void
-InProcessParent::Startup()
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (sShutdown) {
-    NS_WARNING("Could not get in-process actor while shutting down!");
-    return;
-  }
-
-  nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
-  if (!obs) {
-    sShutdown = true;
-    NS_WARNING("Failed to get nsIObserverService for in-process actor");
-    return;
-  }
-
-  RefPtr<InProcessParent> parent = new InProcessParent();
-  RefPtr<InProcessChild> child = new InProcessChild();
-
-  // Observe the shutdown event to close & clean up after ourselves.
-  nsresult rv = obs->AddObserver(parent, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
-  if (NS_WARN_IF(NS_FAILED(rv))) {
-    return;
-  }
-
-  // Link the two actors
-  if (!child->OpenOnSameThread(parent->GetIPCChannel(), ChildSide)) {
-    MOZ_CRASH("Failed to open InProcessChild!");
-  }
-
-  parent->SetOtherProcessId(base::GetCurrentProcId());
-
-  // Create references held by the IPC layer which will be freed in
-  // DeallocPInProcess{Parent,Child}.
-  parent.get()->AddRef();
-  child.get()->AddRef();
-
-  // Stash global references to fetch the other side of the reference.
-  InProcessParent::sSingleton = parent.forget();
-  InProcessChild::sSingleton = child.forget();
-}
-
-
-/* static */ void
-InProcessParent::Shutdown()
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  if (!sSingleton || sShutdown) {
-    return;
-  }
-
-  sShutdown = true;
-
-  RefPtr<InProcessParent> parent = sSingleton;
-  InProcessParent::sSingleton = nullptr;
-  InProcessChild::sSingleton = nullptr;
-
-  // Calling `Close` on the actor will cause the `Dealloc` methods to be called,
-  // freeing the remaining references.
-  parent->Close();
-}
-
-NS_IMETHODIMP
-InProcessParent::Observe(nsISupports* aSubject, const char* aTopic, const char16_t* aData)
-{
-  MOZ_ASSERT(!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID));
-  InProcessParent::Shutdown();
-  return NS_OK;
-}
-
-void
-InProcessParent::ActorDestroy(ActorDestroyReason aWhy)
-{
-  InProcessParent::Shutdown();
-}
-
-void
-InProcessChild::ActorDestroy(ActorDestroyReason aWhy)
-{
-  InProcessParent::Shutdown();
-}
-
-void
-InProcessParent::DeallocPInProcessParent()
-{
-  MOZ_ASSERT(!InProcessParent::sSingleton);
-  Release(); // Release the reference taken in InProcessParent::Startup.
-}
-
-void
-InProcessChild::DeallocPInProcessChild()
-{
-  MOZ_ASSERT(!InProcessChild::sSingleton);
-  Release(); // Release the reference taken in InProcessParent::Startup.
-}
-
-////////////////////////////////
-// In-Process Actor Utilities //
-////////////////////////////////
-
-// Helper method for implementing ParentActorFor and ChildActorFor.
-static IProtocol*
-GetOtherInProcessActor(IProtocol* aActor)
-{
-  MOZ_ASSERT(aActor->GetSide() != UnknownSide, "bad unknown side");
-
-  // Discover the manager of aActor which is PInProcess.
-  IProtocol* current = aActor;
-  while (current) {
-    if (current->GetProtocolTypeId() == PInProcessMsgStart) {
-      break; // Found the correct actor.
-    }
-    current = current->Manager();
-  }
-  if (!current) {
-    return nullptr; // Not a PInProcess actor, return |nullptr|
-  }
-
-  MOZ_ASSERT(current->GetSide() == aActor->GetSide(), "side changed?");
-  MOZ_ASSERT_IF(aActor->GetSide() == ParentSide,
-                current == InProcessParent::Singleton());
-  MOZ_ASSERT_IF(aActor->GetSide() == ChildSide,
-                current == InProcessChild::Singleton());
-
-  // Check whether this is InProcessParent or InProcessChild, and get the other
-  // side's toplevel actor.
-  IProtocol* otherRoot = nullptr;
-  if (aActor->GetSide() == ParentSide) {
-    otherRoot = InProcessChild::Singleton();
-  } else {
-    otherRoot = InProcessParent::Singleton();
-  }
-  if (NS_WARN_IF(!otherRoot)) {
-    return nullptr;
-  }
-
-  // Look up the actor on the other side, and return it.
-  IProtocol* otherActor = otherRoot->Lookup(aActor->Id());
-  if (otherActor) {
-    MOZ_ASSERT(otherActor->GetSide() != UnknownSide, "bad unknown side");
-    MOZ_ASSERT(otherActor->GetSide() != aActor->GetSide(), "Wrong side!");
-    MOZ_ASSERT(otherActor->GetProtocolTypeId() == aActor->GetProtocolTypeId(),
-               "Wrong type of protocol!");
-  }
-
-  return otherActor;
-}
-
-/* static */ IProtocol*
-InProcessParent::ChildActorFor(IProtocol* aActor)
-{
-  MOZ_ASSERT(aActor && aActor->GetSide() == ParentSide);
-  return GetOtherInProcessActor(aActor);
-}
-
-/* static */ IProtocol*
-InProcessChild::ParentActorFor(IProtocol* aActor)
-{
-  MOZ_ASSERT(aActor && aActor->GetSide() == ChildSide);
-  return GetOtherInProcessActor(aActor);
-}
-
-} // namespace ipc
-} // namespace mozilla
deleted file mode 100644
--- a/ipc/glue/InProcessParent.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- 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/. */
-
-#include "mozilla/ipc/InProcessParent.h"
-#include "mozilla/dom/WindowGlobalParent.h"
-
-using namespace mozilla::dom;
-
-namespace mozilla {
-namespace ipc {
-
-NS_IMPL_ISUPPORTS(InProcessParent, nsIObserver)
-
-IPCResult
-InProcessParent::RecvPWindowGlobalConstructor(PWindowGlobalParent* aActor,
-                                              const WindowGlobalInit& aInit)
-{
-  static_cast<WindowGlobalParent*>(aActor)->Init(aInit);
-  return IPC_OK();
-}
-
-PWindowGlobalParent*
-InProcessParent::AllocPWindowGlobalParent(const WindowGlobalInit& aInit)
-{
-  // Reference freed in DeallocPWindowGlobalParent.
-  return do_AddRef(new WindowGlobalParent(aInit, /* inproc */ true)).take();
-}
-
-bool
-InProcessParent::DeallocPWindowGlobalParent(PWindowGlobalParent* aActor)
-{
-  // Free IPC-held reference.
-  static_cast<WindowGlobalParent*>(aActor)->Release();
-  return true;
-}
-
-} // namespace ipc
-} // namespace mozilla
\ No newline at end of file
deleted file mode 100644
--- a/ipc/glue/InProcessParent.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- 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_ipc_InProcessParent_h
-#define mozilla_ipc_InProcessParent_h
-
-#include "mozilla/ipc/PInProcessParent.h"
-#include "mozilla/StaticPtr.h"
-
-namespace mozilla {
-namespace dom {
-class PWindowGlobalParent;
-class PWindowGlobalChild;
-} // namespace dom
-
-namespace ipc {
-
-class InProcessChild;
-
-/**
- * The `InProcessParent` class represents the parent half of a main-thread to
- * main-thread actor.
- *
- * The `PInProcess` actor should be used as an alternate manager to `PContent`
- * for async actors which want to communicate uniformly between Content->Chrome
- * and Chrome->Chrome situations.
- */
-class InProcessParent : public nsIObserver
-                      , public PInProcessParent
-{
-public:
-  friend class InProcessChild;
-
-  NS_DECL_ISUPPORTS
-  NS_DECL_NSIOBSERVER
-
-  // Get the singleton instance of this actor.
-  static InProcessParent* Singleton();
-
-  // Get the child side of the in-process child actor |aActor|. If |aActor| is
-  // not an in-process actor, or is not connected, this method will return
-  // |nullptr|.
-  static IProtocol* ChildActorFor(IProtocol* aActor);
-
-protected:
-  virtual mozilla::dom::PWindowGlobalParent*
-  AllocPWindowGlobalParent(const WindowGlobalInit& aInit) override;
-
-  virtual bool
-  DeallocPWindowGlobalParent(mozilla::dom::PWindowGlobalParent* aActor) override;
-
-  virtual IPCResult
-  RecvPWindowGlobalConstructor(mozilla::dom::PWindowGlobalParent* aActor,
-                               const WindowGlobalInit& aInit) override;
-
-private:
-  // Lifecycle management is implemented in InProcessImpl.cpp
-  virtual void ActorDestroy(ActorDestroyReason aWhy) override;
-  virtual void DeallocPInProcessParent() override;
-  ~InProcessParent() = default;
-
-  static void Startup();
-  static void Shutdown();
-
-  static StaticRefPtr<InProcessParent> sSingleton;
-  static bool sShutdown;
-};
-
-
-} // namespace ipc
-} // namespace mozilla
-
-#endif // defined(mozilla_ipc_InProcessParent_h)
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -629,18 +629,17 @@ MessageChannel::MessageChannel(const cha
     mSawInterruptOutMsg(false),
     mIsWaitingForIncoming(false),
     mAbortOnError(false),
     mNotifiedChannelDone(false),
     mFlags(REQUIRE_DEFAULT),
     mPeerPidSet(false),
     mPeerPid(-1),
     mIsPostponingSends(false),
-    mBuildIDsConfirmedMatch(false),
-    mIsSameThreadChannel(false)
+    mBuildIDsConfirmedMatch(false)
 {
     MOZ_COUNT_CTOR(ipc::MessageChannel);
 
 #ifdef OS_WIN
     mTopFrame = nullptr;
     mIsSyncWaitingOnNonMainThread = false;
 #endif
 
@@ -963,45 +962,16 @@ MessageChannel::CommonThreadOpenInit(Mes
     mWorkerLoop->AddDestructionObserver(this);
     mListener->SetIsMainThreadProtocol();
 
     mLink = new ThreadLink(this, aTargetChan);
     mSide = aSide;
 }
 
 bool
-MessageChannel::OpenOnSameThread(MessageChannel* aTargetChan,
-                                 mozilla::ipc::Side aSide)
-{
-    CommonThreadOpenInit(aTargetChan, aSide);
-
-    Side oppSide = UnknownSide;
-    switch (aSide) {
-      case ChildSide: oppSide = ParentSide; break;
-      case ParentSide: oppSide = ChildSide; break;
-      case UnknownSide: break;
-    }
-    mIsSameThreadChannel = true;
-
-    // XXX(nika): Avoid setting up a monitor for same thread channels? We
-    // shouldn't need it.
-    mMonitor = new RefCountedMonitor();
-
-    mChannelState = ChannelOpening;
-    aTargetChan->CommonThreadOpenInit(this, oppSide);
-
-    aTargetChan->mIsSameThreadChannel = true;
-    aTargetChan->mMonitor = mMonitor;
-
-    mChannelState = ChannelConnected;
-    aTargetChan->mChannelState = ChannelConnected;
-    return true;
-}
-
-bool
 MessageChannel::Echo(Message* aMsg)
 {
     UniquePtr<Message> msg(aMsg);
     AssertWorkerThread();
     mMonitor->AssertNotCurrentThreadOwns();
     if (MSG_ROUTING_NONE == msg->routing_id()) {
         ReportMessageRouteError("MessageChannel::Echo");
         return false;
@@ -1500,18 +1470,16 @@ MessageChannel::Send(Message* aMsg, Mess
         Telemetry::Accumulate(Telemetry::IPC_MESSAGE_SIZE2, aMsg->size());
     }
 
     UniquePtr<Message> msg(aMsg);
 
     // Sanity checks.
     AssertWorkerThread();
     mMonitor->AssertNotCurrentThreadOwns();
-    MOZ_RELEASE_ASSERT(!mIsSameThreadChannel,
-                       "sync send over same-thread channel will deadlock!");
 
 #ifdef OS_WIN
     SyncStackFrame frame(this, false);
     NeuteredWindowRegion neuteredRgn(mFlags & REQUIRE_DEFERRED_MESSAGE_PROTECTION);
 #endif
 #ifdef MOZ_TASK_TRACER
     AutoScopedLabel autolabel("sync message %s", aMsg->name());
 #endif
@@ -1707,18 +1675,16 @@ MessageChannel::Send(Message* aMsg, Mess
 }
 
 bool
 MessageChannel::Call(Message* aMsg, Message* aReply)
 {
     UniquePtr<Message> msg(aMsg);
     AssertWorkerThread();
     mMonitor->AssertNotCurrentThreadOwns();
-    MOZ_RELEASE_ASSERT(!mIsSameThreadChannel,
-                       "intr call send over same-thread channel will deadlock!");
 
 #ifdef OS_WIN
     SyncStackFrame frame(this, true);
 #endif
 #ifdef MOZ_TASK_TRACER
     AutoScopedLabel autolabel("sync message %s", aMsg->name());
 #endif
 
@@ -2485,19 +2451,16 @@ MessageChannel::WaitForSyncNotify(bool /
     // WARNING: We don't release the lock here. We can't because the link thread
     // could signal at this time and we would miss it. Instead we require
     // ArtificialTimeout() to be extremely simple.
     if (mListener->ArtificialTimeout()) {
         return false;
     }
 #endif
 
-    MOZ_RELEASE_ASSERT(!mIsSameThreadChannel,
-                       "Wait on same-thread channel will deadlock!");
-
     TimeDuration timeout = (kNoTimeout == mTimeoutMs) ?
                            TimeDuration::Forever() :
                            TimeDuration::FromMilliseconds(mTimeoutMs);
     CVStatus status = mMonitor->Wait(timeout);
 
     // If the timeout didn't expire, we know we received an event. The
     // converse is not true.
     return WaitResponse(status == CVStatus::Timeout);
@@ -2800,20 +2763,16 @@ public:
 };
 
 void
 MessageChannel::SynchronouslyClose()
 {
     AssertWorkerThread();
     mMonitor->AssertCurrentThreadOwns();
     mLink->SendClose();
-
-    MOZ_RELEASE_ASSERT(!mIsSameThreadChannel || ChannelClosed == mChannelState,
-                       "same-thread channel failed to synchronously close?");
-
     while (ChannelClosed != mChannelState)
         mMonitor->Wait();
 }
 
 void
 MessageChannel::CloseWithError()
 {
     AssertWorkerThread();
--- a/ipc/glue/MessageChannel.h
+++ b/ipc/glue/MessageChannel.h
@@ -175,25 +175,16 @@ private:
     // Returns true if the transport layer was successfully connected,
     // i.e., mChannelState == ChannelConnected.
     //
     // For more details on the process of opening a channel between
     // threads, see the extended comment on this function
     // in MessageChannel.cpp.
     bool Open(MessageChannel *aTargetChan, nsIEventTarget *aEventTarget, Side aSide);
 
-    // "Open" a connection to an actor on the current thread.
-    //
-    // Returns true if the transport layer was successfully connected,
-    // i.e., mChannelState == ChannelConnected.
-    //
-    // Same-thread channels may not perform synchronous or blocking message
-    // sends, to avoid deadlocks.
-    bool OpenOnSameThread(MessageChannel* aTargetChan, Side aSide);
-
     // Close the underlying transport channel.
     void Close();
 
     // Force the channel to behave as if a channel error occurred. Valid
     // for process links only, not thread links.
     void CloseWithError();
 
     void CloseWithTimeout();
@@ -568,30 +559,21 @@ private:
     // Can be run on either thread
     void AssertWorkerThread() const
     {
         MOZ_ASSERT(mWorkerThread, "Channel hasn't been opened yet");
         MOZ_RELEASE_ASSERT(mWorkerThread == GetCurrentVirtualThread(),
                            "not on worker thread!");
     }
 
-    // The "link" thread is either the I/O thread (ProcessLink), the other
-    // actor's work thread (ThreadLink), or the worker thread (same-thread
-    // channels).
+    // The "link" thread is either the I/O thread (ProcessLink) or the
+    // other actor's work thread (ThreadLink).  In either case, it is
+    // NOT our worker thread.
     void AssertLinkThread() const
     {
-        if (mIsSameThreadChannel) {
-            // If we're a same-thread channel, we have to be on our worker
-            // thread.
-            AssertWorkerThread();
-            return;
-        }
-
-        // If we aren't a same-thread channel, our "link" thread is _not_ our
-        // worker thread!
         MOZ_ASSERT(mWorkerThread, "Channel hasn't been opened yet");
         MOZ_RELEASE_ASSERT(mWorkerThread != GetCurrentVirtualThread(),
                            "on worker thread but should not be!");
     }
 
   private:
     class MessageTask :
         public CancelableRunnable,
@@ -874,20 +856,16 @@ private:
     int32_t mPeerPid;
 
     // Channels can enter messages are not sent immediately; instead, they are
     // held in a queue until another thread deems it is safe to send them.
     bool mIsPostponingSends;
     std::vector<UniquePtr<Message>> mPostponedSends;
 
     bool mBuildIDsConfirmedMatch;
-
-    // If this is true, both ends of this message channel have event targets
-    // on the same thread.
-    bool mIsSameThreadChannel;
 };
 
 void
 CancelCPOWs();
 
 } // namespace ipc
 } // namespace mozilla
 
deleted file mode 100644
--- a/ipc/glue/PInProcess.ipdl
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
-/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
-/* 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 protocol PWindowGlobal;
-
-include DOMTypes;
-
-namespace mozilla {
-namespace ipc {
-
-/**
- * PInProcess is intended for use as an alternative actor manager to PContent
- * for async actors which want to be used uniformly in both Content->Chrome and
- * Chrome->Chrome circumstances.
- *
- * `mozilla::ipc::InProcess{Parent, Child}::Singleton()` should be used to get
- * an instance of this actor.
- */
-async protocol PInProcess
-{
-  manages PWindowGlobal;
-
-parent:
-  /**
-   * Construct a new WindowGlobal actor for a window global in the given
-   * BrowsingContext and with the given principal.
-   */
-  async PWindowGlobal(WindowGlobalInit init);
-};
-
-} // namespace ipc
-} // namespace mozilla
--- a/ipc/glue/ProtocolUtils.cpp
+++ b/ipc/glue/ProtocolUtils.cpp
@@ -776,23 +776,16 @@ IToplevelProtocol::Open(MessageChannel* 
 bool
 IToplevelProtocol::OpenWithAsyncPid(mozilla::ipc::Transport* aTransport,
                                     MessageLoop* aThread,
                                     mozilla::ipc::Side aSide)
 {
   return GetIPCChannel()->Open(aTransport, aThread, aSide);
 }
 
-bool
-IToplevelProtocol::OpenOnSameThread(MessageChannel* aChannel, Side aSide)
-{
-  SetOtherProcessId(base::GetCurrentProcId());
-  return GetIPCChannel()->OpenOnSameThread(aChannel, aSide);
-}
-
 void
 IToplevelProtocol::Close()
 {
   GetIPCChannel()->Close();
 }
 
 void
 IToplevelProtocol::SetReplyTimeoutMs(int32_t aTimeoutMs)
--- a/ipc/glue/ProtocolUtils.h
+++ b/ipc/glue/ProtocolUtils.h
@@ -509,25 +509,16 @@ public:
     bool Open(MessageChannel* aChannel,
               nsIEventTarget* aEventTarget,
               mozilla::ipc::Side aSide = mozilla::ipc::UnknownSide);
 
     bool OpenWithAsyncPid(mozilla::ipc::Transport* aTransport,
                           MessageLoop* aThread = nullptr,
                           mozilla::ipc::Side aSide = mozilla::ipc::UnknownSide);
 
-    // Open a toplevel actor such that both ends of the actor's channel are on
-    // the same thread. This method should be called on the thread to perform
-    // the link.
-    //
-    // WARNING: Attempting to send a sync or intr message on the same thread
-    // will crash.
-    bool OpenOnSameThread(MessageChannel* aChannel,
-                          mozilla::ipc::Side aSide = mozilla::ipc::UnknownSide);
-
     void Close();
 
     void SetReplyTimeoutMs(int32_t aTimeoutMs);
 
     void DeallocShmems() { DowncastState()->DeallocShmems(); }
 
     bool ShmemCreated(const Message& aMsg) { return DowncastState()->ShmemCreated(aMsg); }
     bool ShmemDestroyed(const Message& aMsg) { return DowncastState()->ShmemDestroyed(aMsg); }
--- a/ipc/glue/moz.build
+++ b/ipc/glue/moz.build
@@ -22,18 +22,16 @@ EXPORTS.mozilla.ipc += [
     'CrossProcessMutex.h',
     'CrossProcessSemaphore.h',
     'EnvironmentMap.h',
     'FileDescriptor.h',
     'FileDescriptorSetChild.h',
     'FileDescriptorSetParent.h',
     'FileDescriptorUtils.h',
     'GeckoChildProcessHost.h',
-    'InProcessChild.h',
-    'InProcessParent.h',
     'InputStreamUtils.h',
     'IOThreadChild.h',
     'IPCStreamAlloc.h',
     'IPCStreamDestination.h',
     'IPCStreamSource.h',
     'IPCStreamUtils.h',
     'IPDLParamTraits.h',
     'MessageChannel.h',
@@ -144,19 +142,16 @@ UNIFIED_SOURCES += [
     'BackgroundImpl.cpp',
     'BackgroundUtils.cpp',
     'BrowserProcessSubThread.cpp',
     'CrashReporterClient.cpp',
     'CrashReporterHost.cpp',
     'CrashReporterMetadataShmem.cpp',
     'FileDescriptor.cpp',
     'FileDescriptorUtils.cpp',
-    'InProcessChild.cpp',
-    'InProcessImpl.cpp',
-    'InProcessParent.cpp',
     'InputStreamUtils.cpp',
     'IPCMessageUtils.cpp',
     'IPCStreamChild.cpp',
     'IPCStreamDestination.cpp',
     'IPCStreamParent.cpp',
     'IPCStreamSource.cpp',
     'IPCStreamUtils.cpp',
     'MessageChannel.cpp',
@@ -208,17 +203,16 @@ LOCAL_INCLUDES += [
 IPDL_SOURCES = [
     'InputStreamParams.ipdlh',
     'IPCStream.ipdlh',
     'PBackground.ipdl',
     'PBackgroundSharedTypes.ipdlh',
     'PBackgroundTest.ipdl',
     'PChildToParentStream.ipdl',
     'PFileDescriptorSet.ipdl',
-    'PInProcess.ipdl',
     'PParentToChildStream.ipdl',
     'ProtocolTypes.ipdlh',
     'URIParams.ipdlh',
 ]
 
 LOCAL_INCLUDES += [
     '/dom/ipc',
     '/toolkit/crashreporter',
--- a/python/mozbuild/mozbuild/backend/common.py
+++ b/python/mozbuild/mozbuild/backend/common.py
@@ -362,19 +362,18 @@ class CommonBackend(BuildBackend):
     def _write_unified_file(self, unified_file, source_filenames,
                             output_directory, poison_windows_h=False):
         with self._write_file(mozpath.join(output_directory, unified_file)) as f:
             f.write('#define MOZ_UNIFIED_BUILD\n')
             includeTemplate = '#include "%(cppfile)s"'
             if poison_windows_h:
                 includeTemplate += (
                     '\n'
-                    '#if defined(_WINDOWS_) && !defined(MOZ_WRAPPED_WINDOWS_H)\n'
-                    '#pragma message("wrapper failure reason: " MOZ_WINDOWS_WRAPPER_DISABLED_REASON)\n'
-                    '#error "%(cppfile)s included unwrapped windows.h"\n'
+                    '#ifdef _WINDOWS_\n'
+                    '#error "%(cppfile)s included windows.h"\n'
                     "#endif")
             includeTemplate += (
                 '\n'
                 '#ifdef PL_ARENA_CONST_ALIGN_MASK\n'
                 '#error "%(cppfile)s uses PL_ARENA_CONST_ALIGN_MASK, '
                 'so it cannot be built in unified mode."\n'
                 '#undef PL_ARENA_CONST_ALIGN_MASK\n'
                 '#endif\n'