Backed out 2 changesets (bug 767640) for talos failure on scripts/MozillaFileLogger.js on a CLOSED TREE

Backed out changeset 073aecb9bee5 (bug 767640)
Backed out changeset 6bc5ccfb1bd3 (bug 767640)
This commit is contained in:
Dorel Luca 2018-01-30 21:53:28 +02:00
parent b66df5e67e
commit 0e6d4442ff
5 changed files with 1 additions and 59 deletions

View File

@ -82,10 +82,6 @@ const char* const XPCJSRuntime::mStrings[] = {
"value", // IDX_VALUE
"QueryInterface", // IDX_QUERY_INTERFACE
"Components", // IDX_COMPONENTS
"Cc", // IDX_CC
"Ci", // IDX_CI
"Cr", // IDX_CR
"Cu", // IDX_CU
"wrappedJSObject", // IDX_WRAPPED_JSOBJECT
"Object", // IDX_OBJECT
"Function", // IDX_FUNCTION

View File

@ -224,24 +224,6 @@ XPCWrappedNativeScope::ForcePrivilegedComponents()
mComponents = new nsXPCComponents(this);
}
static bool
DefineSubcomponentProperty(JSContext* aCx,
HandleObject aGlobal,
nsISupports* aSubcomponent,
const nsID* aIID,
unsigned int aStringIndex)
{
RootedValue subcompVal(aCx);
xpcObjectHelper helper(aSubcomponent);
if (!XPCConvert::NativeInterface2JSObject(&subcompVal, helper,
aIID, false, nullptr))
return false;
if (NS_WARN_IF(!subcompVal.isObject()))
return false;
RootedId id(aCx, XPCJSContext::Get()->GetStringID(aStringIndex));
return JS_DefinePropertyById(aCx, aGlobal, id, subcompVal, 0);
}
bool
XPCWrappedNativeScope::AttachComponentsObject(JSContext* aCx)
{
@ -261,30 +243,7 @@ XPCWrappedNativeScope::AttachComponentsObject(JSContext* aCx)
attrs |= JSPROP_PERMANENT;
RootedId id(aCx, XPCJSContext::Get()->GetStringID(XPCJSContext::IDX_COMPONENTS));
if (!JS_DefinePropertyById(aCx, global, id, components, attrs))
return false;
// _iid can be nullptr if the object implements classinfo.
#define DEFINE_SUBCOMPONENT_PROPERTY(_comp, _type, _iid, _id) \
nsCOMPtr<nsIXPCComponents_ ## _type> obj ## _type; \
if (NS_FAILED(_comp->Get ## _type(getter_AddRefs( obj ## _type )))) \
return false; \
if (!DefineSubcomponentProperty(aCx, global, obj ## _type, _iid, \
XPCJSContext::IDX_ ## _id)) \
return false;
DEFINE_SUBCOMPONENT_PROPERTY(mComponents, Interfaces, nullptr, CI)
DEFINE_SUBCOMPONENT_PROPERTY(mComponents, Results, nullptr, CR)
if (!c)
return true;
DEFINE_SUBCOMPONENT_PROPERTY(c, Classes, nullptr, CC)
DEFINE_SUBCOMPONENT_PROPERTY(c, Utils, &NS_GET_IID(nsIXPCComponents_Utils), CU)
#undef DEFINE_SUBCOMPONENT_PROPERTY
return true;
return JS_DefinePropertyById(aCx, global, id, components, attrs);
}
static bool

View File

@ -435,10 +435,6 @@ public:
IDX_VALUE ,
IDX_QUERY_INTERFACE ,
IDX_COMPONENTS ,
IDX_CC ,
IDX_CI ,
IDX_CR ,
IDX_CU ,
IDX_WRAPPED_JSOBJECT ,
IDX_OBJECT ,
IDX_FUNCTION ,

View File

@ -12,15 +12,11 @@ module.exports = {
"BrowserFeedWriter": false,
"CSSPrimitiveValue": false,
"CSSValueList": false,
"Cc": false,
"CheckerboardReportService": false,
// Specific to Firefox (Chrome code only).
"ChromeUtils": false,
"ChromeWorker": false,
"Ci": false,
"Components": false,
"Cr": false,
"Cu": false,
"DOMRequest": false,
"DedicatedWorkerGlobalScope": false,
"IDBFileRequest": false,

View File

@ -18,11 +18,6 @@ module.exports = {
"btoa": false,
"debug": false,
"dump": false,
// These globals are defined in XPCWrappedNativeScope::AttachComponentsObject.
"Cc": false,
"Ci": false,
"Cr": false,
"Cu": false,
// These globals are made available via WebIDL files, see ResolveSystemBinding in:
// https://searchfox.org/mozilla-central/source/__GENERATED__/dom/bindings/ResolveSystemBinding.cpp
"AbortController": false,