Backed out changeset e4b8bb93313b (bug 1229222)

This commit is contained in:
Carsten "Tomcat" Book 2016-02-19 15:55:25 +01:00
parent 7ebb137164
commit 3252feb284
3 changed files with 17 additions and 64 deletions

View File

@ -50,7 +50,7 @@ ThreadSafeChromeUtils::NondeterministicGetWeakSetKeys(GlobalObject& aGlobal,
}
}
/* static */ void
/* static */ void
ChromeUtils::OriginAttributesToSuffix(dom::GlobalObject& aGlobal,
const dom::OriginAttributesDictionary& aAttrs,
nsCString& aSuffix)
@ -71,17 +71,11 @@ ChromeUtils::OriginAttributesMatchPattern(dom::GlobalObject& aGlobal,
}
/* static */ void
ChromeUtils::CreateDefaultOriginAttributes(dom::GlobalObject& aGlobal,
dom::OriginAttributesDictionary& aAttrs)
{
aAttrs = GenericOriginAttributes();
}
/* static */ void
ChromeUtils::CreateOriginAttributesFromOrigin(dom::GlobalObject& aGlobal,
const nsAString& aOrigin,
dom::OriginAttributesDictionary& aAttrs,
ErrorResult& aRv)
ChromeUtils::CreateOriginAttributesWithUserContextId(dom::GlobalObject& aGlobal,
const nsAString& aOrigin,
uint32_t aUserContextId,
dom::OriginAttributesDictionary& aAttrs,
ErrorResult& aRv)
{
GenericOriginAttributes attrs;
nsAutoCString suffix;
@ -89,17 +83,10 @@ ChromeUtils::CreateOriginAttributesFromOrigin(dom::GlobalObject& aGlobal,
aRv.Throw(NS_ERROR_FAILURE);
return;
}
attrs.mUserContextId = aUserContextId;
aAttrs = attrs;
}
/* static */ void
ChromeUtils::CreateOriginAttributesFromDict(dom::GlobalObject& aGlobal,
const dom::OriginAttributesDictionary& aAttrs,
dom::OriginAttributesDictionary& aNewAttrs)
{
aNewAttrs = aAttrs;
}
} // namespace dom
} // namespace mozilla

View File

@ -59,19 +59,11 @@ public:
const dom::OriginAttributesPatternDictionary& aPattern);
static void
CreateDefaultOriginAttributes(dom::GlobalObject& aGlobal,
dom::OriginAttributesDictionary& aAttrs);
static void
CreateOriginAttributesFromOrigin(dom::GlobalObject& aGlobal,
const nsAString& aOrigin,
dom::OriginAttributesDictionary& aAttrs,
ErrorResult& aRv);
static void
CreateOriginAttributesFromDict(dom::GlobalObject& aGlobal,
const dom::OriginAttributesDictionary& aAttrs,
dom::OriginAttributesDictionary& aNewAttrs);
CreateOriginAttributesWithUserContextId(dom::GlobalObject& aGlobal,
const nsAString& aOrigin,
uint32_t aUserContextId,
dom::OriginAttributesDictionary& aAttrs,
ErrorResult& aRv);
};
} // namespace dom

View File

@ -30,39 +30,13 @@ interface ChromeUtils : ThreadSafeChromeUtils {
optional OriginAttributesPatternDictionary pattern);
/**
* Returns an OriginAttributesDictionary with all default attributes added
* and assigned default values.
*
* @returns An OriginAttributesDictionary populated with the
* default attributes added and assigned default values.
*/
static OriginAttributesDictionary
createDefaultOriginAttributes();
/**
* Returns an OriginAttributesDictionary with values from the |origin| suffix
* and unspecified attributes added and assigned default values.
*
* @param origin The origin URI to create from.
* @returns An OriginAttributesDictionary with values from
* the origin suffix and unspecified attributes
* added and assigned default values.
* Returns an OriginAttributes dictionary using the origin URI but forcing
* the passed userContextId.
*/
[Throws]
static OriginAttributesDictionary
createOriginAttributesFromOrigin(DOMString origin);
/**
* Returns an OriginAttributesDictionary that is a copy of |originAttrs| with
* unspecified attributes added and assigned default values.
*
* @param originAttrs The origin attributes to copy.
* @returns An OriginAttributesDictionary copy of |originAttrs|
* with unspecified attributes added and assigned
* default values.
*/
static OriginAttributesDictionary
createOriginAttributesFromDict(optional OriginAttributesDictionary originAttrs);
createOriginAttributesWithUserContextId(DOMString origin,
unsigned long userContextId);
};
/**