Bug 1170771 - Remove now-empty nsDOMClassInfo. r=bz

MozReview-Commit-ID: 7XsiPD1kTt9

--HG--
extra : rebase_source : 2935c0fe1a51083f37e113c3e0599760f40829e2
This commit is contained in:
Adrian Wielgosik 2018-04-05 14:20:44 +02:00
Родитель 2bd02cd742
Коммит 2837c659de
16 изменённых файлов: 3 добавлений и 170 удалений

Просмотреть файл

@ -8,7 +8,6 @@
#include "mozilla/dom/EventTargetBinding.h"
#include "mozilla/dom/WindowBinding.h"
#include "nsContentUtils.h"
#include "nsDOMClassInfo.h"
#include "nsDOMWindowList.h"
#include "nsGlobalWindow.h"
#include "nsHTMLDocument.h"

Просмотреть файл

@ -295,7 +295,6 @@ UNIFIED_SOURCES += [
'nsDocumentEncoder.cpp',
'nsDOMAttributeMap.cpp',
'nsDOMCaretPosition.cpp',
'nsDOMClassInfo.cpp',
'nsDOMMutationObserver.cpp',
'nsDOMNavigationTiming.cpp',
'nsDOMSerializer.cpp',

Просмотреть файл

@ -1,109 +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/ArrayUtils.h"
// JavaScript includes
#include "jsapi.h"
#include "jsfriendapi.h"
#include "WrapperFactory.h"
#include "AccessCheck.h"
#include "XrayWrapper.h"
#include "xpcpublic.h"
#include "xpcprivate.h"
#include "xpc_make_class.h"
#include "XPCWrapper.h"
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/RegisterBindings.h"
#include "nscore.h"
#include "nsDOMClassInfo.h"
#include "nsIDOMClassInfo.h"
#include "nsCRT.h"
#include "nsCRTGlue.h"
#include "nsICategoryManager.h"
#include "nsIComponentRegistrar.h"
#include "nsXPCOM.h"
#include "nsISimpleEnumerator.h"
#include "nsISupportsPrimitives.h"
#include "nsIXPConnect.h"
#include "xptcall.h"
#include "nsTArray.h"
// General helper includes
#include "nsGlobalWindow.h"
#include "nsIContent.h"
#include "nsIDocument.h"
#include "nsIDOMDocument.h"
#include "nsIDOMEvent.h"
#include "nsIDOMEventListener.h"
#include "nsContentUtils.h"
#include "nsIDOMGlobalPropertyInitializer.h"
#include "mozilla/Attributes.h"
#include "mozilla/Telemetry.h"
// DOM base includes
#include "nsIDOMWindow.h"
#include "nsPIDOMWindow.h"
// DOM core includes
#include "nsError.h"
// Event related includes
#include "nsIDOMEventTarget.h"
// CSS related includes
#include "nsMemory.h"
// includes needed for the prototype chain interfaces
#include "nsIEventListenerService.h"
#include "mozilla/dom/TouchEvent.h"
#include "nsWrapperCacheInlines.h"
#include "mozilla/dom/HTMLCollectionBinding.h"
#include "nsDebug.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/Likely.h"
#include "nsIInterfaceInfoManager.h"
#ifdef MOZ_TIME_MANAGER
#include "TimeManager.h"
#endif
using namespace mozilla;
using namespace mozilla::dom;
bool nsDOMClassInfo::sIsInitialized = false;
// static
nsresult
nsDOMClassInfo::Init()
{
/* Errors that can trigger early returns are done first,
otherwise nsDOMClassInfo is left in a half inited state. */
static_assert(sizeof(uintptr_t) == sizeof(void*),
"BAD! You'll need to adjust the size of uintptr_t to the "
"size of a pointer on your platform.");
NS_ENSURE_TRUE(!sIsInitialized, NS_ERROR_ALREADY_INITIALIZED);
sIsInitialized = true;
return NS_OK;
}
// static
void
nsDOMClassInfo::ShutDown()
{
sIsInitialized = false;
}

Просмотреть файл

@ -1,27 +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 nsDOMClassInfo_h___
#define nsDOMClassInfo_h___
#include "mozilla/Attributes.h"
#include "nsIXPCScriptable.h"
#include "nsIScriptGlobalObject.h"
#include "js/Class.h"
#include "js/Id.h"
#include "nsIXPConnect.h"
class nsDOMClassInfo
{
public:
static nsresult Init();
static void ShutDown();
protected:
static bool sIsInitialized;
};
#endif /* nsDOMClassInfo_h___ */

Просмотреть файл

@ -47,7 +47,6 @@
#include "nsIDocShellTreeItem.h"
#include "nsCOMArray.h"
#include "nsQueryObject.h"
#include "nsDOMClassInfo.h"
#include "mozilla/Services.h"
#include "nsScreen.h"
#include "ChildIterator.h"

Просмотреть файл

@ -70,7 +70,6 @@
#include "nsIContentSecurityPolicy.h"
#include "GeckoProfiler.h"
#include "nsPluginFrame.h"
#include "nsDOMClassInfo.h"
#include "nsWrapperCacheInlines.h"
#include "nsDOMJSUtils.h"

Просмотреть файл

@ -55,7 +55,6 @@
#include "mozilla/dom/WorkerScope.h"
#include "mozilla/dom/XrayExpandoClass.h"
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
#include "nsDOMClassInfo.h"
#include "ipc/ErrorIPCUtils.h"
#include "mozilla/UseCounter.h"
#include "mozilla/dom/DocGroup.h"
@ -3281,25 +3280,17 @@ CreateGlobalOptionsWithXPConnect::PostCreateGlobal(JSContext* aCx,
static bool sRegisteredDOMNames = false;
nsresult
static void
RegisterDOMNames()
{
if (sRegisteredDOMNames) {
return NS_OK;
return;
}
// Register new DOM bindings
WebIDLGlobalNameHash::Init();
nsresult rv = nsDOMClassInfo::Init();
if (NS_FAILED(rv)) {
NS_ERROR("Could not initialize nsDOMClassInfo");
return rv;
}
sRegisteredDOMNames = true;
return NS_OK;
}
/* static */
@ -3307,10 +3298,7 @@ bool
CreateGlobalOptions<nsGlobalWindowInner>::PostCreateGlobal(JSContext* aCx,
JS::Handle<JSObject*> aGlobal)
{
nsresult rv = RegisterDOMNames();
if (NS_FAILED(rv)) {
return Throw(aCx, rv);
}
RegisterDOMNames();
return CreateGlobalOptionsWithXPConnect::PostCreateGlobal(aCx, aGlobal);
}

Просмотреть файл

@ -3126,9 +3126,6 @@ struct CreateGlobalOptions<nsGlobalWindowInner>
static bool PostCreateGlobal(JSContext* aCx, JS::Handle<JSObject*> aGlobal);
};
nsresult
RegisterDOMNames();
// The return value is true if we created and successfully performed our part of
// the setup for the global, false otherwise.
//

Просмотреть файл

@ -9,7 +9,6 @@
#include "xpcprivate.h"
#include "XPCWrapper.h"
#include "WrapperFactory.h"
#include "nsDOMClassInfo.h"
#include "nsWrapperCacheInlines.h"
#include "mozilla/dom/BindingUtils.h"

Просмотреть файл

@ -106,7 +106,6 @@
#include "mozilla/dom/Selection.h"
#include "nsCharsetSource.h"
#include "nsIStringBundle.h"
#include "nsDOMClassInfo.h"
#include "nsFocusManager.h"
#include "nsIFrame.h"
#include "nsIContent.h"

Просмотреть файл

@ -49,10 +49,6 @@
#include "nsNodeUtils.h"
#include "nsJSUtils.h"
// Nasty hack. Maybe we could move some of the classinfo utility methods
// (e.g. WrapNative) over to nsContentUtils?
#include "nsDOMClassInfo.h"
#include "mozilla/DeferredFinalize.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/ScriptSettings.h"

Просмотреть файл

@ -32,7 +32,6 @@
#include "mozilla/Scheduler.h"
#include "nsZipArchive.h"
#include "nsWindowMemoryReporter.h"
#include "nsDOMClassInfo.h"
#include "ShimInterfaceInfo.h"
#include "nsIException.h"
#include "nsIScriptError.h"

Просмотреть файл

@ -8,7 +8,6 @@
#include "nsContentUtils.h"
#include "BackstagePass.h"
#include "nsDOMClassInfo.h"
#include "nsIPrincipal.h"
#include "mozilla/dom/BindingUtils.h"

Просмотреть файл

@ -25,7 +25,6 @@
#include "nsCSSRendering.h"
#include "nsGenericHTMLFrameElement.h"
#include "mozilla/dom/Attr.h"
#include "nsDOMClassInfo.h"
#include "mozilla/EventListenerManager.h"
#include "nsFrame.h"
#include "nsGlobalWindow.h"
@ -367,7 +366,6 @@ nsLayoutStatics::Shutdown()
ShutdownJSEnvironment();
nsGlobalWindowInner::ShutDown();
nsGlobalWindowOuter::ShutDown();
nsDOMClassInfo::ShutDown();
WebIDLGlobalNameHash::Shutdown();
nsListControlFrame::Shutdown();
nsXBLService::Shutdown();

Просмотреть файл

@ -23,7 +23,6 @@
#include "mozStoragePrivateHelpers.h"
#include "mozStorageStatementRow.h"
#include "mozStorageStatement.h"
#include "nsDOMClassInfo.h"
#include "mozilla/Logging.h"

Просмотреть файл

@ -23,7 +23,6 @@
#include "mozStorageStatementRow.h"
#include "mozStorageStatement.h"
#include "GeckoProfiler.h"
#include "nsDOMClassInfo.h"
#include "mozilla/Logging.h"
#include "mozilla/Printf.h"