Merge m-c to fx-team.

This commit is contained in:
Ryan VanderMeulen 2013-07-08 16:18:49 -04:00
commit c926eefe62
300 changed files with 2874 additions and 2262 deletions

View File

@ -767,21 +767,6 @@ HyperTextAccessible::GetRelativeOffset(nsIPresShell* aPresShell,
-- hyperTextOffset;
}
}
else if (aAmount == eSelectEndLine && finalAccessible) {
// If not at very end of hypertext, we may need change the end of line offset by 1,
// to make sure we are in the right place relative to the line ending
if (finalAccessible->Role() == roles::WHITESPACE) { // Landed on <br> hard line break
// if aNeedsStart, set end of line exactly 1 character past line break
// XXX It would be cleaner if we did not have to have the hard line break check,
// and just got the correct results from PeekOffset() for the <br> case -- the returned offset should
// come after the new line, as it does in other cases.
++ hyperTextOffset; // Get past hard line break
}
// We are now 1 character past the line break
if (!aNeedsStart) {
-- hyperTextOffset;
}
}
return hyperTextOffset;
}
@ -1110,6 +1095,20 @@ HyperTextAccessible::GetTextAtOffset(int32_t aOffset,
}
case BOUNDARY_LINE_END: {
// Empty last line doesn't have own frame (a previous line contains '\n'
// character instead) thus we can't operate on last line separately
// from the previous line.
if (offset == CharacterCount()) {
nsAutoString lastChar;
GetText(offset -1, -1, lastChar);
if (lastChar.EqualsLiteral("\n")) {
*aStartOffset = offset - 1;
*aEndOffset = offset;
aText = lastChar;
return NS_OK;
}
}
// In contrast to word end boundary we follow the spec here. End key,
// then up arrow and if not on first line then end key.
*aEndOffset = FindLineBoundary(offset, eDirNext, eSelectEndLine);

View File

@ -12,18 +12,6 @@ include $(DEPTH)/config/autoconf.mk
EXPORT_LIBRARY = ..
LIBXUL_LIBRARY = 1
DISABLED_CMMSRCS = \
AccessibleWrap.mm \
DocAccessibleWrap.mm \
mozAccessible.mm \
mozDocAccessible.mm \
mozActionElements.mm \
mozTextAccessible.mm \
mozHTMLAccessible.mm \
MacUtils.mm \
Platform.mm \
RootAccessibleWrap.mm \
$(NULL)
# we don't want the shared lib, but we want to force the creation of a static lib.
FORCE_STATIC_LIB = 1

View File

@ -50,7 +50,7 @@
"textarea", kTodo, kTodo, kOk);
testTextAtOffset(kCaretOffset, BOUNDARY_LINE_END, "words", 10, 15,
"textarea", kTodo, kTodo, kOk);
"textarea", kOk, kOk, kOk);
testTextBeforeOffset(kCaretOffset, BOUNDARY_LINE_START, "words", 10, 15,
"textarea", kOk, kOk, kOk);
@ -113,7 +113,7 @@
"textarea", kOk, kOk, kOk);
testTextAtOffset(kCaretOffset, BOUNDARY_LINE_END, "\ntwo ", 5, 10,
"textarea", kTodo, kTodo, kTodo);
"textarea", kOk, kOk, kOk);
testTextBeforeOffset(kCaretOffset, BOUNDARY_LINE_START, "aword\n", 0, 6,
"textarea", kTodo, kTodo, kOk);
@ -169,7 +169,7 @@
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(kCaretOffset, BOUNDARY_LINE_END, "aword", 0, 5,
"textarea", kTodo, kOk, kTodo);
"textarea", kOk, kOk, kOk);
testTextAtOffset(kCaretOffset, BOUNDARY_LINE_START, "aword\n", 0, 6,
"textarea", kOk, kOk, kOk);
@ -206,7 +206,7 @@
"textarea", kOk, kOk, kOk);
testTextAtOffset(kCaretOffset, BOUNDARY_LINE_END, "aword", 0, 5,
"textarea", kTodo, kOk, kTodo);
"textarea", kOk, kOk, kOk);
testTextBeforeOffset(kCaretOffset, BOUNDARY_LINE_START, "", 0, 0,
"textarea", kTodo, kOk, kTodo);

View File

@ -16,7 +16,7 @@
function doTest()
{
SimpleTest.expectAssertions(38);
SimpleTest.expectAssertions(35);
// __o__n__e__w__o__r__d__\n
// 0 1 2 3 4 5 6 7
@ -54,15 +54,15 @@
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(9, BOUNDARY_LINE_START, "", 19, 19,
"div", kTodo, kTodo, kTodo,
"divbr", kTodo, kTodo, kOk,
"divbr", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"editablebr", kTodo, kTodo, kOk,
"editablebr", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(19, BOUNDARY_LINE_START, "", 19, 19,
"div", kOk, kOk, kTodo,
"divbr", kOk, kOk, kOk,
"divbr", kOk, kOk, kTodo,
"editable", kOk, kOk, kTodo,
"editablebr", kOk, kOk, kOk,
"editablebr", kOk, kOk, kTodo,
"textarea", kOk, kOk, kTodo);
// BOUNDARY_LINE_END
@ -79,11 +79,11 @@
"editablebr", kOk, kOk, kOk,
"textarea", kOk, kOk, kOk);
testTextAfterOffset(8, BOUNDARY_LINE_END, "\ntwo words", 8, 18,
"div", kTodo, kOk, kTodo,
"div", kOk, kOk, kOk,
"divbr", kOk, kOk, kOk,
"editable", kTodo, kOk, kTodo,
"editable", kOk, kOk, kOk,
"editablebr", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
"textarea", kOk, kOk, kOk);
testTextAfterOffset(9, BOUNDARY_LINE_END, "\n", 18, 19,
"div", kTodo, kTodo, kTodo,
"divbr", kTodo, kTodo, kTodo,
@ -91,11 +91,11 @@
"editablebr", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAfterOffset(18, BOUNDARY_LINE_END, "\n", 18, 19,
"div", kTodo, kOk, kTodo,
"div", kOk, kOk, kOk,
"divbr", kOk, kOk, kOk,
"editable", kTodo, kOk, kTodo,
"editable", kOk, kOk, kOk,
"editablebr", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
"textarea", kOk, kOk, kOk);
testTextAfterOffset(19, BOUNDARY_LINE_END, "", 19, 19,
"div", kOk, kTodo, kTodo,
"divbr", kOk, kTodo, kTodo,
@ -189,48 +189,13 @@
testTextAtOffset(19, BOUNDARY_LINE_START, "", 19, 19, IDs);
// BOUNDARY_LINE_END
testTextAtOffset(0, BOUNDARY_LINE_END, "oneword", 0, 7,
"div", kTodo, kOk, kTodo,
"divbr", kOk, kOk, kOk,
"editable", kTodo, kOk, kTodo,
"editablebr", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
testTextAtOffset(7, BOUNDARY_LINE_END, "oneword", 0, 7,
"div", kTodo, kOk, kTodo,
"divbr", kOk, kOk, kOk,
"editable", kTodo, kOk, kTodo,
"editablebr", kOk, kOk, kOk,
"textarea", kTodo, kOk, kTodo);
testTextAtOffset(8, BOUNDARY_LINE_END, "\n", 7, 8,
"div", kTodo, kTodo, kTodo,
"divbr", kOk, kOk, kOk,
"editable", kTodo, kTodo, kTodo,
"editablebr", kOk, kOk, kOk,
"textarea", kTodo, kTodo, kTodo);
testTextAtOffset(9, BOUNDARY_LINE_END, "\ntwo words", 8, 18,
"div", kTodo, kTodo, kTodo,
"divbr", kOk, kOk, kOk,
"editable", kTodo, kTodo, kTodo,
"editablebr", kOk, kOk, kOk,
"textarea", kTodo, kTodo, kTodo);
testTextAtOffset(17, BOUNDARY_LINE_END, "\ntwo words", 8, 18,
"div", kTodo, kTodo, kTodo,
"divbr", kOk, kOk, kOk,
"editable", kTodo, kTodo, kTodo,
"editablebr", kOk, kOk, kOk,
"textarea", kTodo, kTodo, kTodo);
testTextAtOffset(18, BOUNDARY_LINE_END, "\ntwo words", 8, 18,
"div", kTodo, kTodo, kTodo,
"divbr", kOk, kOk, kOk,
"editable", kTodo, kTodo, kTodo,
"editablebr", kOk, kOk, kOk,
"textarea", kTodo, kTodo, kTodo);
testTextAtOffset(19, BOUNDARY_LINE_END, "\n", 18, 19,
"div", kTodo, kTodo, kTodo,
"divbr", kTodo, kTodo, kTodo,
"editable", kTodo, kTodo, kTodo,
"editablebr", kTodo, kTodo, kTodo,
"textarea", kTodo, kTodo, kTodo);
testTextAtOffset(0, BOUNDARY_LINE_END, "oneword", 0, 7, IDs);
testTextAtOffset(7, BOUNDARY_LINE_END, "oneword", 0, 7, IDs);
testTextAtOffset(8, BOUNDARY_LINE_END, "\n", 7, 8, IDs);
testTextAtOffset(9, BOUNDARY_LINE_END, "\ntwo words", 8, 18, IDs);
testTextAtOffset(17, BOUNDARY_LINE_END, "\ntwo words", 8, 18, IDs);
testTextAtOffset(18, BOUNDARY_LINE_END, "\ntwo words", 8, 18, IDs);
testTextAtOffset(19, BOUNDARY_LINE_END, "\n", 18, 19, IDs);
SimpleTest.finish();
}

View File

@ -1,4 +1,4 @@
{
"revision": "a80b392a3551e220c252228c5354cd85496cb625",
"revision": "09cdef3222986569ee93081d7ef0e7f9cc0894f9",
"repo_path": "/integration/gaia-central"
}

View File

@ -1588,6 +1588,12 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
background-color: Window;
}
.browserContainer > findbar {
background-color: -moz-dialog;
color: -moz-DialogText;
text-shadow: none;
}
/* Throbber */
#navigator-throbber {
width: 16px;

View File

@ -2135,6 +2135,14 @@ sidebarheader > .tabs-closebutton > .toolbarbutton-text {
display: none;
}
/* ----- CONTENT ----- */
.browserContainer > findbar {
background: @scopeBarBackground@;
border-top: @scopeBarSeparatorBorder@;
color: -moz-DialogText;
text-shadow: none;
}
/* ----- THROBBER ----- */

View File

@ -43,7 +43,8 @@
@media (-moz-windows-default-theme) {
#navigator-toolbox > toolbar:not(:-moz-lwtheme),
#browser-bottombox:not(:-moz-lwtheme) {
#browser-bottombox:not(:-moz-lwtheme),
.browserContainer > findbar {
background-color: @customToolbarColor@;
}

View File

@ -1914,6 +1914,12 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
-moz-padding-start: 0px;
}
.browserContainer > findbar {
background-color: -moz-dialog;
color: -moz-DialogText;
text-shadow: none;
}
/* ::::: throbber ::::: */
#navigator-throbber {

View File

@ -239,9 +239,10 @@ _ENABLE_PIC=1
ifdef LIBXUL_LIBRARY
ifdef IS_COMPONENT
ifndef MODULE_NAME
$(error Component makefile does not specify MODULE_NAME.)
$(error IS_COMPONENT is set, but is not compatible with LIBXUL_LIBRARY)
endif
ifdef MODULE_NAME
$(error MODULE_NAME is $(MODULE_NAME) but MODULE_NAME and LIBXUL_LIBRARY are not compatible)
endif
FORCE_STATIC_LIB=1
ifneq ($(SHORT_LIBNAME),)

View File

@ -1615,6 +1615,18 @@ NS_IMETHOD MozRequestPointerLock(void) MOZ_FINAL \
{ \
Element::MozRequestPointerLock(); \
return NS_OK; \
} \
using nsINode::QuerySelector; \
NS_IMETHOD QuerySelector(const nsAString& aSelector, \
nsIDOMElement **aReturn) MOZ_FINAL \
{ \
return nsINode::QuerySelector(aSelector, aReturn); \
} \
using nsINode::QuerySelectorAll; \
NS_IMETHOD QuerySelectorAll(const nsAString& aSelector, \
nsIDOMNodeList **aReturn) MOZ_FINAL \
{ \
return nsINode::QuerySelectorAll(aSelector, aReturn); \
}
#endif // mozilla_dom_Element_h__

View File

@ -1310,6 +1310,11 @@ public:
*/
static bool IsSystemPrincipal(nsIPrincipal* aPrincipal);
/**
* Returns true if aPrincipal is an nsExpandedPrincipal.
*/
static bool IsExpandedPrincipal(nsIPrincipal* aPrincipal);
/**
* Gets the system principal from the security manager.
*/

View File

@ -1084,6 +1084,9 @@ public:
already_AddRefed<nsINodeList> QuerySelectorAll(const nsAString& aSelector,
mozilla::ErrorResult& aResult);
nsresult QuerySelector(const nsAString& aSelector, nsIDOMElement **aReturn);
nsresult QuerySelectorAll(const nsAString& aSelector, nsIDOMNodeList **aReturn);
/**
* Associate an object aData to aKey on this node. If aData is null any
* previously registered object and UserDataHandler associated to aKey on

View File

@ -45,6 +45,20 @@ DocumentFragment::GetIDAttributeName() const
return nullptr;
}
NS_IMETHODIMP
DocumentFragment::QuerySelector(const nsAString& aSelector,
nsIDOMElement **aReturn)
{
return nsINode::QuerySelector(aSelector, aReturn);
}
NS_IMETHODIMP
DocumentFragment::QuerySelectorAll(const nsAString& aSelector,
nsIDOMNodeList **aReturn)
{
return nsINode::QuerySelectorAll(aSelector, aReturn);
}
#ifdef DEBUG
void
DocumentFragment::List(FILE* out, int32_t aIndent) const

View File

@ -26,18 +26,6 @@ class HTMLTemplateElement;
class DocumentFragment : public FragmentOrElement,
public nsIDOMDocumentFragment
{
public:
using FragmentOrElement::GetFirstChild;
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// interface nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// interface nsIDOMDocumentFragment
// NS_DECL_NSIDOCUMENTFRAGMENT Empty
private:
void Init()
{
@ -51,6 +39,19 @@ private:
}
public:
using FragmentOrElement::GetFirstChild;
using nsINode::QuerySelector;
using nsINode::QuerySelectorAll;
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// interface nsIDOMNode
NS_FORWARD_NSIDOMNODE_TO_NSINODE
// interface nsIDOMDocumentFragment
NS_DECL_NSIDOMDOCUMENTFRAGMENT
DocumentFragment(already_AddRefed<nsINodeInfo> aNodeInfo)
: FragmentOrElement(aNodeInfo), mHost(nullptr)
{

View File

@ -4360,6 +4360,13 @@ nsContentUtils::IsSystemPrincipal(nsIPrincipal* aPrincipal)
return NS_SUCCEEDED(rv) && isSystem;
}
bool
nsContentUtils::IsExpandedPrincipal(nsIPrincipal* aPrincipal)
{
nsCOMPtr<nsIExpandedPrincipal> ep = do_QueryInterface(aPrincipal);
return !!ep;
}
nsIPrincipal*
nsContentUtils::GetSystemPrincipal()
{

View File

@ -11231,6 +11231,18 @@ nsDocument::DocSizeOfExcludingThis(nsWindowSizes* aWindowSizes) const
// - many!
}
NS_IMETHODIMP
nsDocument::QuerySelector(const nsAString& aSelector, nsIDOMElement **aReturn)
{
return nsINode::QuerySelector(aSelector, aReturn);
}
NS_IMETHODIMP
nsDocument::QuerySelectorAll(const nsAString& aSelector, nsIDOMNodeList **aReturn)
{
return nsINode::QuerySelectorAll(aSelector, aReturn);
}
already_AddRefed<nsIDocument>
nsIDocument::Constructor(const GlobalObject& aGlobal, ErrorResult& rv)
{

View File

@ -2360,6 +2360,27 @@ nsINode::QuerySelectorAll(const nsAString& aSelector, ErrorResult& aResult)
return contentList.forget();
}
nsresult
nsINode::QuerySelector(const nsAString& aSelector, nsIDOMElement **aReturn)
{
ErrorResult rv;
Element* result = nsINode::QuerySelector(aSelector, rv);
if (rv.Failed()) {
return rv.ErrorCode();
}
nsCOMPtr<nsIDOMElement> elt = do_QueryInterface(result);
elt.forget(aReturn);
return NS_OK;
}
nsresult
nsINode::QuerySelectorAll(const nsAString& aSelector, nsIDOMNodeList **aReturn)
{
ErrorResult rv;
*aReturn = nsINode::QuerySelectorAll(aSelector, rv).get();
return rv.ErrorCode();
}
JSObject*
nsINode::WrapObject(JSContext *aCx, JS::Handle<JSObject*> aScope)
{

View File

@ -41,18 +41,18 @@ SpeechSynthesisChild::RecvSetDefaultVoice(const nsString& aUri,
}
PSpeechSynthesisRequestChild*
SpeechSynthesisChild::AllocPSpeechSynthesisRequest(const nsString& aText,
const nsString& aLang,
const nsString& aUri,
const float& aVolume,
const float& aRate,
const float& aPitch)
SpeechSynthesisChild::AllocPSpeechSynthesisRequestChild(const nsString& aText,
const nsString& aLang,
const nsString& aUri,
const float& aVolume,
const float& aRate,
const float& aPitch)
{
MOZ_CRASH("Caller is supposed to manually construct a request!");
}
bool
SpeechSynthesisChild::DeallocPSpeechSynthesisRequest(PSpeechSynthesisRequestChild* aActor)
SpeechSynthesisChild::DeallocPSpeechSynthesisRequestChild(PSpeechSynthesisRequestChild* aActor)
{
delete aActor;
return true;

View File

@ -31,13 +31,13 @@ protected:
SpeechSynthesisChild();
virtual ~SpeechSynthesisChild();
PSpeechSynthesisRequestChild* AllocPSpeechSynthesisRequest(const nsString& aLang,
const nsString& aUri,
const nsString& aText,
const float& aVolume,
const float& aPitch,
const float& aRate);
bool DeallocPSpeechSynthesisRequest(PSpeechSynthesisRequestChild* aActor);
PSpeechSynthesisRequestChild* AllocPSpeechSynthesisRequestChild(const nsString& aLang,
const nsString& aUri,
const nsString& aText,
const float& aVolume,
const float& aPitch,
const float& aRate);
bool DeallocPSpeechSynthesisRequestChild(PSpeechSynthesisRequestChild* aActor);
};
class SpeechSynthesisRequestChild : public PSpeechSynthesisRequestChild

View File

@ -27,12 +27,12 @@ SpeechSynthesisParent::RecvReadVoiceList(InfallibleTArray<RemoteVoice>* aVoices,
}
PSpeechSynthesisRequestParent*
SpeechSynthesisParent::AllocPSpeechSynthesisRequest(const nsString& aText,
const nsString& aLang,
const nsString& aUri,
const float& aVolume,
const float& aRate,
const float& aPitch)
SpeechSynthesisParent::AllocPSpeechSynthesisRequestParent(const nsString& aText,
const nsString& aLang,
const nsString& aUri,
const float& aVolume,
const float& aRate,
const float& aPitch)
{
nsRefPtr<SpeechTaskParent> task = new SpeechTaskParent(aVolume, aText);
SpeechSynthesisRequestParent* actor = new SpeechSynthesisRequestParent(task);
@ -40,7 +40,7 @@ SpeechSynthesisParent::AllocPSpeechSynthesisRequest(const nsString& aText,
}
bool
SpeechSynthesisParent::DeallocPSpeechSynthesisRequest(PSpeechSynthesisRequestParent* aActor)
SpeechSynthesisParent::DeallocPSpeechSynthesisRequestParent(PSpeechSynthesisRequestParent* aActor)
{
delete aActor;
return true;

View File

@ -27,14 +27,14 @@ public:
protected:
SpeechSynthesisParent();
virtual ~SpeechSynthesisParent();
PSpeechSynthesisRequestParent* AllocPSpeechSynthesisRequest(const nsString& aText,
const nsString& aLang,
const nsString& aUri,
const float& aVolume,
const float& aRate,
const float& aPitch);
PSpeechSynthesisRequestParent* AllocPSpeechSynthesisRequestParent(const nsString& aText,
const nsString& aLang,
const nsString& aUri,
const float& aVolume,
const float& aRate,
const float& aPitch);
bool DeallocPSpeechSynthesisRequest(PSpeechSynthesisRequestParent* aActor);
bool DeallocPSpeechSynthesisRequestParent(PSpeechSynthesisRequestParent* aActor);
bool RecvPSpeechSynthesisRequestConstructor(PSpeechSynthesisRequestParent* aActor,
const nsString& aText,

View File

@ -8,8 +8,6 @@ topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
IS_COMPONENT = 1
MODULE_NAME = docshell_provider
include $(DEPTH)/config/autoconf.mk

View File

@ -961,8 +961,6 @@ static const char js_zeal_option_str[] = JS_OPTIONS_DOT_STR "gczeal";
static const char js_zeal_frequency_str[] = JS_OPTIONS_DOT_STR "gczeal.frequency";
#endif
static const char js_typeinfer_str[] = JS_OPTIONS_DOT_STR "typeinference";
static const char js_pccounts_content_str[] = JS_OPTIONS_DOT_STR "pccounts.content";
static const char js_pccounts_chrome_str[] = JS_OPTIONS_DOT_STR "pccounts.chrome";
static const char js_jit_hardening_str[] = JS_OPTIONS_DOT_STR "jit_hardening";
static const char js_memlog_option_str[] = JS_OPTIONS_DOT_STR "mem.log";
static const char js_memnotify_option_str[] = JS_OPTIONS_DOT_STR "mem.notify";
@ -1004,9 +1002,6 @@ nsJSContext::JSOptionChangedCallback(const char *pref, void *data)
nsCOMPtr<nsIDOMWindow> contentWindow(do_QueryInterface(global));
nsCOMPtr<nsIDOMChromeWindow> chromeWindow(do_QueryInterface(global));
bool usePCCounts = Preferences::GetBool(chromeWindow || !contentWindow ?
js_pccounts_chrome_str :
js_pccounts_content_str);
bool useTypeInference = !chromeWindow && contentWindow && Preferences::GetBool(js_typeinfer_str);
bool useHardening = Preferences::GetBool(js_jit_hardening_str);
bool useBaselineJIT = Preferences::GetBool(chromeWindow || !contentWindow ?
@ -1022,7 +1017,6 @@ nsJSContext::JSOptionChangedCallback(const char *pref, void *data)
bool safeMode = false;
xr->GetInSafeMode(&safeMode);
if (safeMode) {
usePCCounts = false;
useTypeInference = false;
useHardening = false;
useBaselineJIT = false;
@ -1033,11 +1027,6 @@ nsJSContext::JSOptionChangedCallback(const char *pref, void *data)
}
}
if (usePCCounts)
newDefaultJSOptions |= JSOPTION_PCCOUNT;
else
newDefaultJSOptions &= ~JSOPTION_PCCOUNT;
if (useTypeInference)
newDefaultJSOptions |= JSOPTION_TYPE_INFERENCE;
else

View File

@ -115,13 +115,13 @@ BluetoothChild::RecvNotificationsStopped()
}
PBluetoothRequestChild*
BluetoothChild::AllocPBluetoothRequest(const Request& aRequest)
BluetoothChild::AllocPBluetoothRequestChild(const Request& aRequest)
{
MOZ_CRASH("Caller is supposed to manually construct a request!");
}
bool
BluetoothChild::DeallocPBluetoothRequest(PBluetoothRequestChild* aActor)
BluetoothChild::DeallocPBluetoothRequestChild(PBluetoothRequestChild* aActor)
{
delete aActor;
return true;

View File

@ -71,10 +71,10 @@ protected:
RecvNotificationsStopped() MOZ_OVERRIDE;
virtual PBluetoothRequestChild*
AllocPBluetoothRequest(const Request& aRequest) MOZ_OVERRIDE;
AllocPBluetoothRequestChild(const Request& aRequest) MOZ_OVERRIDE;
virtual bool
DeallocPBluetoothRequest(PBluetoothRequestChild* aActor) MOZ_OVERRIDE;
DeallocPBluetoothRequestChild(PBluetoothRequestChild* aActor) MOZ_OVERRIDE;
};
/*******************************************************************************

View File

@ -238,14 +238,14 @@ BluetoothParent::RecvPBluetoothRequestConstructor(
}
PBluetoothRequestParent*
BluetoothParent::AllocPBluetoothRequest(const Request& aRequest)
BluetoothParent::AllocPBluetoothRequestParent(const Request& aRequest)
{
MOZ_ASSERT(mService);
return new BluetoothRequestParent(mService);
}
bool
BluetoothParent::DeallocPBluetoothRequest(PBluetoothRequestParent* aActor)
BluetoothParent::DeallocPBluetoothRequestParent(PBluetoothRequestParent* aActor)
{
delete aActor;
return true;

View File

@ -83,10 +83,10 @@ protected:
const Request& aRequest) MOZ_OVERRIDE;
virtual PBluetoothRequestParent*
AllocPBluetoothRequest(const Request& aRequest) MOZ_OVERRIDE;
AllocPBluetoothRequestParent(const Request& aRequest) MOZ_OVERRIDE;
virtual bool
DeallocPBluetoothRequest(PBluetoothRequestParent* aActor) MOZ_OVERRIDE;
DeallocPBluetoothRequestParent(PBluetoothRequestParent* aActor) MOZ_OVERRIDE;
virtual void
Notify(const BluetoothSignal& aSignal) MOZ_OVERRIDE;

View File

@ -9,7 +9,7 @@ interface nsIDOMEventListener;
interface nsIDOMDOMRequest;
interface nsIDOMContact;
[scriptable, builtinclass, uuid(b4e16bb0-a258-11e2-9e96-0800200c9a66)]
[scriptable, builtinclass, uuid(d21b7070-c2bc-11e2-8b8b-0800200c9a66)]
interface nsIDOMMozIccManager : nsIDOMEventTarget
{
/**
@ -275,6 +275,22 @@ interface nsIDOMMozIccManager : nsIDOMEventTarget
*/
[implicit_jscontext] attribute jsval onstksessionend;
// UICC Card State.
/**
* Indicates the state of the device's ICC card.
*
* Possible values: null, 'unknown', 'absent', 'pinRequired', 'pukRequired',
* 'networkLocked', 'corporateLocked', 'serviceProviderLocked', 'ready'.
*/
readonly attribute DOMString cardState;
/**
* The 'cardstatechange' event is notified when the 'cardState' attribute
* changes value.
*/
[implicit_jscontext] attribute jsval oncardstatechange;
// UICC Card Lock interfaces.
/**

View File

@ -8,19 +8,20 @@ interface nsIDOMWindow;
interface nsIDOMDOMRequest;
interface nsIDOMContact;
[scriptable, uuid(dca08580-a25a-11e2-9e96-0800200c9a66)]
[scriptable, uuid(5902d9b0-c2be-11e2-8b8b-0800200c9a66)]
interface nsIIccListener : nsISupports
{
void notifyStkCommand(in DOMString aMessage);
void notifyStkSessionEnd();
void notifyIccCardLockError(in DOMString lockType,
in unsigned long retryCount);
void notifyCardStateChanged();
};
/**
* XPCOM component (in the content process) that provides the ICC information.
*/
[scriptable, uuid(e60ec460-a25a-11e2-9e96-0800200c9a66)]
[scriptable, uuid(77487bf0-c2be-11e2-8b8b-0800200c9a66)]
interface nsIIccProvider : nsISupports
{
/**
@ -31,6 +32,11 @@ interface nsIIccProvider : nsISupports
void registerIccMsg(in nsIIccListener listener);
void unregisterIccMsg(in nsIIccListener listener);
/**
* Card State
*/
readonly attribute DOMString cardState;
/**
* STK interfaces.
*/

View File

@ -129,6 +129,17 @@ IccManager::SendStkEventDownload(const JS::Value& aEvent)
return NS_OK;
}
NS_IMETHODIMP
IccManager::GetCardState(nsAString& cardState)
{
cardState.SetIsVoid(true);
if (!mProvider) {
return NS_ERROR_FAILURE;
}
return mProvider->GetCardState(cardState);
}
NS_IMETHODIMP
IccManager::GetCardLock(const nsAString& aLockType, nsIDOMDOMRequest** aDomRequest)
{
@ -215,6 +226,7 @@ IccManager::UpdateContact(const nsAString& aContactType,
NS_IMPL_EVENT_HANDLER(IccManager, stkcommand)
NS_IMPL_EVENT_HANDLER(IccManager, stksessionend)
NS_IMPL_EVENT_HANDLER(IccManager, icccardlockerror)
NS_IMPL_EVENT_HANDLER(IccManager, cardstatechange)
// nsIIccListener
@ -247,3 +259,9 @@ IccManager::NotifyIccCardLockError(const nsAString& aLockType, uint32_t aRetryCo
return DispatchTrustedEvent(ce);
}
NS_IMETHODIMP
IccManager::NotifyCardStateChanged()
{
return DispatchTrustedEvent(NS_LITERAL_STRING("cardstatechange"));
}

View File

@ -6,6 +6,7 @@ qemu = true
[test_stk_proactive_command.js]
[test_icc_contact.js]
[test_icc_card_lock.js]
[test_icc_card_state.js]
[test_stk_refresh.js]
[test_stk_poll_off.js]
[test_stk_setup_event_list.js]

View File

@ -0,0 +1,61 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
MARIONETTE_TIMEOUT = 30000;
SpecialPowers.addPermission("mobileconnection", true, document);
SpecialPowers.addPermission("settings-write", true, document);
let icc = navigator.mozIccManager;
ok(icc instanceof MozIccManager, "icc is instanceof " + icc.constructor);
is(icc.cardState, "ready");
function setAirplaneModeEnabled(enabled) {
let settings = window.navigator.mozSettings;
let setLock = settings.createLock();
let obj = {
"ril.radio.disabled": enabled
};
let setReq = setLock.set(obj);
log("set airplane mode to " + enabled);
setReq.addEventListener("success", function onSetSuccess() {
log("set 'ril.radio.disabled' to " + enabled);
});
setReq.addEventListener("error", function onSetError() {
ok(false, "cannot set 'ril.radio.disabled' to " + enabled);
});
}
function waitCardStateChangedEvent(expectedCardState, callback) {
icc.addEventListener("cardstatechange", function oncardstatechange() {
log("card state changes to " + icc.cardState);
if (icc.cardState === expectedCardState) {
log("got expected card state: " + icc.cardState);
icc.removeEventListener("cardstatechange", oncardstatechange);
callback();
}
});
}
// Test cardstatechange event by switching airplane mode
function testCardStateChange(airplaneMode, expectedCardState, callback) {
setAirplaneModeEnabled(airplaneMode);
waitCardStateChangedEvent(expectedCardState, callback);
}
function cleanUp() {
SpecialPowers.removePermission("mobileconnection", document);
SpecialPowers.removePermission("settings-write", document);
finish();
}
// Enable Airplane mode, expect got cardstatechange to null
testCardStateChange(true, null,
// Disable Airplane mode, expect got cardstatechange to 'ready'
testCardStateChange.bind(this, false, "ready", cleanUp)
);

View File

@ -210,27 +210,27 @@ IndexedDBChild::ActorDestroy(ActorDestroyReason aWhy)
}
PIndexedDBDatabaseChild*
IndexedDBChild::AllocPIndexedDBDatabase(const nsString& aName,
const uint64_t& aVersion)
IndexedDBChild::AllocPIndexedDBDatabaseChild(const nsString& aName,
const uint64_t& aVersion)
{
return new IndexedDBDatabaseChild(aName, aVersion);
}
bool
IndexedDBChild::DeallocPIndexedDBDatabase(PIndexedDBDatabaseChild* aActor)
IndexedDBChild::DeallocPIndexedDBDatabaseChild(PIndexedDBDatabaseChild* aActor)
{
delete aActor;
return true;
}
PIndexedDBDeleteDatabaseRequestChild*
IndexedDBChild::AllocPIndexedDBDeleteDatabaseRequest(const nsString& aName)
IndexedDBChild::AllocPIndexedDBDeleteDatabaseRequestChild(const nsString& aName)
{
MOZ_CRASH("Caller is supposed to manually construct a request!");
}
bool
IndexedDBChild::DeallocPIndexedDBDeleteDatabaseRequest(
IndexedDBChild::DeallocPIndexedDBDeleteDatabaseRequestChild(
PIndexedDBDeleteDatabaseRequestChild* aActor)
{
delete aActor;
@ -533,7 +533,7 @@ IndexedDBDatabaseChild::RecvPIndexedDBTransactionConstructor(
}
PIndexedDBTransactionChild*
IndexedDBDatabaseChild::AllocPIndexedDBTransaction(
IndexedDBDatabaseChild::AllocPIndexedDBTransactionChild(
const TransactionParams& aParams)
{
MOZ_ASSERT(aParams.type() ==
@ -542,7 +542,7 @@ IndexedDBDatabaseChild::AllocPIndexedDBTransaction(
}
bool
IndexedDBDatabaseChild::DeallocPIndexedDBTransaction(
IndexedDBDatabaseChild::DeallocPIndexedDBTransactionChild(
PIndexedDBTransactionChild* aActor)
{
delete aActor;
@ -656,14 +656,14 @@ IndexedDBTransactionChild::RecvComplete(const CompleteParams& aParams)
}
PIndexedDBObjectStoreChild*
IndexedDBTransactionChild::AllocPIndexedDBObjectStore(
IndexedDBTransactionChild::AllocPIndexedDBObjectStoreChild(
const ObjectStoreConstructorParams& aParams)
{
MOZ_CRASH("Caller is supposed to manually construct an object store!");
}
bool
IndexedDBTransactionChild::DeallocPIndexedDBObjectStore(
IndexedDBTransactionChild::DeallocPIndexedDBObjectStoreChild(
PIndexedDBObjectStoreChild* aActor)
{
delete aActor;
@ -754,14 +754,14 @@ IndexedDBObjectStoreChild::RecvPIndexedDBCursorConstructor(
}
PIndexedDBRequestChild*
IndexedDBObjectStoreChild::AllocPIndexedDBRequest(
IndexedDBObjectStoreChild::AllocPIndexedDBRequestChild(
const ObjectStoreRequestParams& aParams)
{
MOZ_CRASH("Caller is supposed to manually construct a request!");
}
bool
IndexedDBObjectStoreChild::DeallocPIndexedDBRequest(
IndexedDBObjectStoreChild::DeallocPIndexedDBRequestChild(
PIndexedDBRequestChild* aActor)
{
delete aActor;
@ -769,28 +769,28 @@ IndexedDBObjectStoreChild::DeallocPIndexedDBRequest(
}
PIndexedDBIndexChild*
IndexedDBObjectStoreChild::AllocPIndexedDBIndex(
IndexedDBObjectStoreChild::AllocPIndexedDBIndexChild(
const IndexConstructorParams& aParams)
{
MOZ_CRASH("Caller is supposed to manually construct an index!");
}
bool
IndexedDBObjectStoreChild::DeallocPIndexedDBIndex(PIndexedDBIndexChild* aActor)
IndexedDBObjectStoreChild::DeallocPIndexedDBIndexChild(PIndexedDBIndexChild* aActor)
{
delete aActor;
return true;
}
PIndexedDBCursorChild*
IndexedDBObjectStoreChild::AllocPIndexedDBCursor(
IndexedDBObjectStoreChild::AllocPIndexedDBCursorChild(
const ObjectStoreCursorConstructorParams& aParams)
{
return new IndexedDBCursorChild();
}
bool
IndexedDBObjectStoreChild::DeallocPIndexedDBCursor(
IndexedDBObjectStoreChild::DeallocPIndexedDBCursorChild(
PIndexedDBCursorChild* aActor)
{
delete aActor;
@ -895,27 +895,27 @@ IndexedDBIndexChild::RecvPIndexedDBCursorConstructor(
}
PIndexedDBRequestChild*
IndexedDBIndexChild::AllocPIndexedDBRequest(const IndexRequestParams& aParams)
IndexedDBIndexChild::AllocPIndexedDBRequestChild(const IndexRequestParams& aParams)
{
MOZ_CRASH("Caller is supposed to manually construct a request!");
}
bool
IndexedDBIndexChild::DeallocPIndexedDBRequest(PIndexedDBRequestChild* aActor)
IndexedDBIndexChild::DeallocPIndexedDBRequestChild(PIndexedDBRequestChild* aActor)
{
delete aActor;
return true;
}
PIndexedDBCursorChild*
IndexedDBIndexChild::AllocPIndexedDBCursor(
IndexedDBIndexChild::AllocPIndexedDBCursorChild(
const IndexCursorConstructorParams& aParams)
{
return new IndexedDBCursorChild();
}
bool
IndexedDBIndexChild::DeallocPIndexedDBCursor(PIndexedDBCursorChild* aActor)
IndexedDBIndexChild::DeallocPIndexedDBCursorChild(PIndexedDBCursorChild* aActor)
{
delete aActor;
return true;
@ -972,13 +972,13 @@ IndexedDBCursorChild::ActorDestroy(ActorDestroyReason aWhy)
}
PIndexedDBRequestChild*
IndexedDBCursorChild::AllocPIndexedDBRequest(const CursorRequestParams& aParams)
IndexedDBCursorChild::AllocPIndexedDBRequestChild(const CursorRequestParams& aParams)
{
MOZ_CRASH("Caller is supposed to manually construct a request!");
}
bool
IndexedDBCursorChild::DeallocPIndexedDBRequest(PIndexedDBRequestChild* aActor)
IndexedDBCursorChild::DeallocPIndexedDBRequestChild(PIndexedDBRequestChild* aActor)
{
delete aActor;
return true;

View File

@ -65,17 +65,17 @@ protected:
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
virtual PIndexedDBDatabaseChild*
AllocPIndexedDBDatabase(const nsString& aName, const uint64_t& aVersion)
MOZ_OVERRIDE;
AllocPIndexedDBDatabaseChild(const nsString& aName, const uint64_t& aVersion)
MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBDatabase(PIndexedDBDatabaseChild* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBDatabaseChild(PIndexedDBDatabaseChild* aActor) MOZ_OVERRIDE;
virtual PIndexedDBDeleteDatabaseRequestChild*
AllocPIndexedDBDeleteDatabaseRequest(const nsString& aName) MOZ_OVERRIDE;
AllocPIndexedDBDeleteDatabaseRequestChild(const nsString& aName) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBDeleteDatabaseRequest(
DeallocPIndexedDBDeleteDatabaseRequestChild(
PIndexedDBDeleteDatabaseRequestChild* aActor)
MOZ_OVERRIDE;
};
@ -139,10 +139,10 @@ protected:
MOZ_OVERRIDE;
virtual PIndexedDBTransactionChild*
AllocPIndexedDBTransaction(const TransactionParams& aParams) MOZ_OVERRIDE;
AllocPIndexedDBTransactionChild(const TransactionParams& aParams) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBTransaction(PIndexedDBTransactionChild* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBTransactionChild(PIndexedDBTransactionChild* aActor) MOZ_OVERRIDE;
};
/*******************************************************************************
@ -183,11 +183,11 @@ protected:
RecvComplete(const CompleteParams& aParams) MOZ_OVERRIDE;
virtual PIndexedDBObjectStoreChild*
AllocPIndexedDBObjectStore(const ObjectStoreConstructorParams& aParams)
MOZ_OVERRIDE;
AllocPIndexedDBObjectStoreChild(const ObjectStoreConstructorParams& aParams)
MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBObjectStore(PIndexedDBObjectStoreChild* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBObjectStoreChild(PIndexedDBObjectStoreChild* aActor) MOZ_OVERRIDE;
};
/*******************************************************************************
@ -216,23 +216,23 @@ protected:
MOZ_OVERRIDE;
virtual PIndexedDBRequestChild*
AllocPIndexedDBRequest(const ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
AllocPIndexedDBRequestChild(const ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBRequest(PIndexedDBRequestChild* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBRequestChild(PIndexedDBRequestChild* aActor) MOZ_OVERRIDE;
virtual PIndexedDBIndexChild*
AllocPIndexedDBIndex(const IndexConstructorParams& aParams) MOZ_OVERRIDE;
AllocPIndexedDBIndexChild(const IndexConstructorParams& aParams) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBIndex(PIndexedDBIndexChild* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBIndexChild(PIndexedDBIndexChild* aActor) MOZ_OVERRIDE;
virtual PIndexedDBCursorChild*
AllocPIndexedDBCursor(const ObjectStoreCursorConstructorParams& aParams)
MOZ_OVERRIDE;
AllocPIndexedDBCursorChild(const ObjectStoreCursorConstructorParams& aParams)
MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBCursor(PIndexedDBCursorChild* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBCursorChild(PIndexedDBCursorChild* aActor) MOZ_OVERRIDE;
};
/*******************************************************************************
@ -260,17 +260,17 @@ protected:
MOZ_OVERRIDE;
virtual PIndexedDBRequestChild*
AllocPIndexedDBRequest(const IndexRequestParams& aParams) MOZ_OVERRIDE;
AllocPIndexedDBRequestChild(const IndexRequestParams& aParams) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBRequest(PIndexedDBRequestChild* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBRequestChild(PIndexedDBRequestChild* aActor) MOZ_OVERRIDE;
virtual PIndexedDBCursorChild*
AllocPIndexedDBCursor(const IndexCursorConstructorParams& aParams)
MOZ_OVERRIDE;
AllocPIndexedDBCursorChild(const IndexCursorConstructorParams& aParams)
MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBCursor(PIndexedDBCursorChild* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBCursorChild(PIndexedDBCursorChild* aActor) MOZ_OVERRIDE;
};
/*******************************************************************************
@ -304,10 +304,10 @@ protected:
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
virtual PIndexedDBRequestChild*
AllocPIndexedDBRequest(const CursorRequestParams& aParams) MOZ_OVERRIDE;
AllocPIndexedDBRequestChild(const CursorRequestParams& aParams) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBRequest(PIndexedDBRequestChild* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBRequestChild(PIndexedDBRequestChild* aActor) MOZ_OVERRIDE;
};
/*******************************************************************************

View File

@ -208,27 +208,27 @@ IndexedDBParent::RecvPIndexedDBDeleteDatabaseRequestConstructor(
}
PIndexedDBDatabaseParent*
IndexedDBParent::AllocPIndexedDBDatabase(const nsString& aName,
const uint64_t& aVersion)
IndexedDBParent::AllocPIndexedDBDatabaseParent(const nsString& aName,
const uint64_t& aVersion)
{
return new IndexedDBDatabaseParent();
}
bool
IndexedDBParent::DeallocPIndexedDBDatabase(PIndexedDBDatabaseParent* aActor)
IndexedDBParent::DeallocPIndexedDBDatabaseParent(PIndexedDBDatabaseParent* aActor)
{
delete aActor;
return true;
}
PIndexedDBDeleteDatabaseRequestParent*
IndexedDBParent::AllocPIndexedDBDeleteDatabaseRequest(const nsString& aName)
IndexedDBParent::AllocPIndexedDBDeleteDatabaseRequestParent(const nsString& aName)
{
return new IndexedDBDeleteDatabaseRequestParent(mFactory);
}
bool
IndexedDBParent::DeallocPIndexedDBDeleteDatabaseRequest(
IndexedDBParent::DeallocPIndexedDBDeleteDatabaseRequestParent(
PIndexedDBDeleteDatabaseRequestParent* aActor)
{
delete aActor;
@ -627,7 +627,7 @@ IndexedDBDatabaseParent::RecvPIndexedDBTransactionConstructor(
}
PIndexedDBTransactionParent*
IndexedDBDatabaseParent::AllocPIndexedDBTransaction(
IndexedDBDatabaseParent::AllocPIndexedDBTransactionParent(
const TransactionParams& aParams)
{
MOZ_ASSERT(aParams.type() ==
@ -636,7 +636,7 @@ IndexedDBDatabaseParent::AllocPIndexedDBTransaction(
}
bool
IndexedDBDatabaseParent::DeallocPIndexedDBTransaction(
IndexedDBDatabaseParent::DeallocPIndexedDBTransactionParent(
PIndexedDBTransactionParent* aActor)
{
delete aActor;
@ -827,14 +827,14 @@ IndexedDBTransactionParent::RecvPIndexedDBObjectStoreConstructor(
}
PIndexedDBObjectStoreParent*
IndexedDBTransactionParent::AllocPIndexedDBObjectStore(
IndexedDBTransactionParent::AllocPIndexedDBObjectStoreParent(
const ObjectStoreConstructorParams& aParams)
{
return new IndexedDBObjectStoreParent();
}
bool
IndexedDBTransactionParent::DeallocPIndexedDBObjectStore(
IndexedDBTransactionParent::DeallocPIndexedDBObjectStoreParent(
PIndexedDBObjectStoreParent* aActor)
{
delete aActor;
@ -954,7 +954,7 @@ IndexedDBVersionChangeTransactionParent::RecvPIndexedDBObjectStoreConstructor(
}
PIndexedDBObjectStoreParent*
IndexedDBVersionChangeTransactionParent::AllocPIndexedDBObjectStore(
IndexedDBVersionChangeTransactionParent::AllocPIndexedDBObjectStoreParent(
const ObjectStoreConstructorParams& aParams)
{
if (aParams.type() ==
@ -963,7 +963,7 @@ IndexedDBVersionChangeTransactionParent::AllocPIndexedDBObjectStore(
return new IndexedDBVersionChangeObjectStoreParent();
}
return IndexedDBTransactionParent::AllocPIndexedDBObjectStore(aParams);
return IndexedDBTransactionParent::AllocPIndexedDBObjectStoreParent(aParams);
}
/*******************************************************************************
@ -1030,7 +1030,7 @@ IndexedDBCursorParent::RecvPIndexedDBRequestConstructor(
}
PIndexedDBRequestParent*
IndexedDBCursorParent::AllocPIndexedDBRequest(
IndexedDBCursorParent::AllocPIndexedDBRequestParent(
const CursorRequestParams& aParams)
{
MOZ_ASSERT(mCursor);
@ -1038,7 +1038,7 @@ IndexedDBCursorParent::AllocPIndexedDBRequest(
}
bool
IndexedDBCursorParent::DeallocPIndexedDBRequest(PIndexedDBRequestParent* aActor)
IndexedDBCursorParent::DeallocPIndexedDBRequestParent(PIndexedDBRequestParent* aActor)
{
delete aActor;
return true;
@ -1179,14 +1179,14 @@ IndexedDBObjectStoreParent::RecvPIndexedDBIndexConstructor(
}
PIndexedDBRequestParent*
IndexedDBObjectStoreParent::AllocPIndexedDBRequest(
IndexedDBObjectStoreParent::AllocPIndexedDBRequestParent(
const ObjectStoreRequestParams& aParams)
{
return new IndexedDBObjectStoreRequestParent(mObjectStore, aParams.type());
}
bool
IndexedDBObjectStoreParent::DeallocPIndexedDBRequest(
IndexedDBObjectStoreParent::DeallocPIndexedDBRequestParent(
PIndexedDBRequestParent* aActor)
{
delete aActor;
@ -1194,14 +1194,14 @@ IndexedDBObjectStoreParent::DeallocPIndexedDBRequest(
}
PIndexedDBIndexParent*
IndexedDBObjectStoreParent::AllocPIndexedDBIndex(
IndexedDBObjectStoreParent::AllocPIndexedDBIndexParent(
const IndexConstructorParams& aParams)
{
return new IndexedDBIndexParent();
}
bool
IndexedDBObjectStoreParent::DeallocPIndexedDBIndex(
IndexedDBObjectStoreParent::DeallocPIndexedDBIndexParent(
PIndexedDBIndexParent* aActor)
{
delete aActor;
@ -1209,14 +1209,14 @@ IndexedDBObjectStoreParent::DeallocPIndexedDBIndex(
}
PIndexedDBCursorParent*
IndexedDBObjectStoreParent::AllocPIndexedDBCursor(
IndexedDBObjectStoreParent::AllocPIndexedDBCursorParent(
const ObjectStoreCursorConstructorParams& aParams)
{
MOZ_CRASH("Caller is supposed to manually construct a cursor!");
}
bool
IndexedDBObjectStoreParent::DeallocPIndexedDBCursor(
IndexedDBObjectStoreParent::DeallocPIndexedDBCursorParent(
PIndexedDBCursorParent* aActor)
{
delete aActor;
@ -1408,27 +1408,27 @@ IndexedDBIndexParent::RecvPIndexedDBRequestConstructor(
}
PIndexedDBRequestParent*
IndexedDBIndexParent::AllocPIndexedDBRequest(const IndexRequestParams& aParams)
IndexedDBIndexParent::AllocPIndexedDBRequestParent(const IndexRequestParams& aParams)
{
return new IndexedDBIndexRequestParent(mIndex, aParams.type());
}
bool
IndexedDBIndexParent::DeallocPIndexedDBRequest(PIndexedDBRequestParent* aActor)
IndexedDBIndexParent::DeallocPIndexedDBRequestParent(PIndexedDBRequestParent* aActor)
{
delete aActor;
return true;
}
PIndexedDBCursorParent*
IndexedDBIndexParent::AllocPIndexedDBCursor(
IndexedDBIndexParent::AllocPIndexedDBCursorParent(
const IndexCursorConstructorParams& aParams)
{
MOZ_CRASH("Caller is supposed to manually construct a cursor!");
}
bool
IndexedDBIndexParent::DeallocPIndexedDBCursor(PIndexedDBCursorParent* aActor)
IndexedDBIndexParent::DeallocPIndexedDBCursorParent(PIndexedDBCursorParent* aActor)
{
delete aActor;
return true;

View File

@ -213,17 +213,17 @@ protected:
const nsString& aName) MOZ_OVERRIDE;
virtual PIndexedDBDatabaseParent*
AllocPIndexedDBDatabase(const nsString& aName, const uint64_t& aVersion)
MOZ_OVERRIDE;
AllocPIndexedDBDatabaseParent(const nsString& aName, const uint64_t& aVersion)
MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBDatabase(PIndexedDBDatabaseParent* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBDatabaseParent(PIndexedDBDatabaseParent* aActor) MOZ_OVERRIDE;
virtual PIndexedDBDeleteDatabaseRequestParent*
AllocPIndexedDBDeleteDatabaseRequest(const nsString& aName) MOZ_OVERRIDE;
AllocPIndexedDBDeleteDatabaseRequestParent(const nsString& aName) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBDeleteDatabaseRequest(
DeallocPIndexedDBDeleteDatabaseRequestParent(
PIndexedDBDeleteDatabaseRequestParent* aActor)
MOZ_OVERRIDE;
};
@ -287,11 +287,11 @@ protected:
MOZ_OVERRIDE;
virtual PIndexedDBTransactionParent*
AllocPIndexedDBTransaction(const TransactionParams& aParams) MOZ_OVERRIDE;
AllocPIndexedDBTransactionParent(const TransactionParams& aParams) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBTransaction(PIndexedDBTransactionParent* aActor)
MOZ_OVERRIDE;
DeallocPIndexedDBTransactionParent(PIndexedDBTransactionParent* aActor)
MOZ_OVERRIDE;
};
/*******************************************************************************
@ -353,12 +353,12 @@ protected:
MOZ_OVERRIDE;
virtual PIndexedDBObjectStoreParent*
AllocPIndexedDBObjectStore(const ObjectStoreConstructorParams& aParams)
MOZ_OVERRIDE;
AllocPIndexedDBObjectStoreParent(const ObjectStoreConstructorParams& aParams)
MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBObjectStore(PIndexedDBObjectStoreParent* aActor)
MOZ_OVERRIDE;
DeallocPIndexedDBObjectStoreParent(PIndexedDBObjectStoreParent* aActor)
MOZ_OVERRIDE;
};
/*******************************************************************************
@ -391,8 +391,8 @@ protected:
MOZ_OVERRIDE;
virtual PIndexedDBObjectStoreParent*
AllocPIndexedDBObjectStore(const ObjectStoreConstructorParams& aParams)
MOZ_OVERRIDE;
AllocPIndexedDBObjectStoreParent(const ObjectStoreConstructorParams& aParams)
MOZ_OVERRIDE;
};
/*******************************************************************************
@ -429,10 +429,10 @@ protected:
MOZ_OVERRIDE;
virtual PIndexedDBRequestParent*
AllocPIndexedDBRequest(const CursorRequestParams& aParams) MOZ_OVERRIDE;
AllocPIndexedDBRequestParent(const CursorRequestParams& aParams) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBRequest(PIndexedDBRequestParent* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBRequestParent(PIndexedDBRequestParent* aActor) MOZ_OVERRIDE;
};
/*******************************************************************************
@ -513,23 +513,23 @@ protected:
MOZ_OVERRIDE;
virtual PIndexedDBRequestParent*
AllocPIndexedDBRequest(const ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
AllocPIndexedDBRequestParent(const ObjectStoreRequestParams& aParams) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBRequest(PIndexedDBRequestParent* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBRequestParent(PIndexedDBRequestParent* aActor) MOZ_OVERRIDE;
virtual PIndexedDBIndexParent*
AllocPIndexedDBIndex(const IndexConstructorParams& aParams) MOZ_OVERRIDE;
AllocPIndexedDBIndexParent(const IndexConstructorParams& aParams) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBIndex(PIndexedDBIndexParent* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBIndexParent(PIndexedDBIndexParent* aActor) MOZ_OVERRIDE;
virtual PIndexedDBCursorParent*
AllocPIndexedDBCursor(const ObjectStoreCursorConstructorParams& aParams)
MOZ_OVERRIDE;
AllocPIndexedDBCursorParent(const ObjectStoreCursorConstructorParams& aParams)
MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBCursor(PIndexedDBCursorParent* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBCursorParent(PIndexedDBCursorParent* aActor) MOZ_OVERRIDE;
};
/*******************************************************************************
@ -630,17 +630,17 @@ protected:
MOZ_OVERRIDE;
virtual PIndexedDBRequestParent*
AllocPIndexedDBRequest(const IndexRequestParams& aParams) MOZ_OVERRIDE;
AllocPIndexedDBRequestParent(const IndexRequestParams& aParams) MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBRequest(PIndexedDBRequestParent* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBRequestParent(PIndexedDBRequestParent* aActor) MOZ_OVERRIDE;
virtual PIndexedDBCursorParent*
AllocPIndexedDBCursor(const IndexCursorConstructorParams& aParams)
MOZ_OVERRIDE;
AllocPIndexedDBCursorParent(const IndexCursorConstructorParams& aParams)
MOZ_OVERRIDE;
virtual bool
DeallocPIndexedDBCursor(PIndexedDBCursorParent* aActor) MOZ_OVERRIDE;
DeallocPIndexedDBCursorParent(PIndexedDBCursorParent* aActor) MOZ_OVERRIDE;
};
/*******************************************************************************

View File

@ -27,7 +27,7 @@ interface nsIDOMLocation;
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
*/
[scriptable, uuid(75996de6-6b0f-43e5-ae79-c98fa669da9a)]
[scriptable, uuid(18de0c13-f82e-4c7e-9a48-b778e00df9ca)]
interface nsIDOMDocument : nsIDOMNode
{
readonly attribute nsIDOMDocumentType doctype;
@ -408,4 +408,12 @@ interface nsIDOMDocument : nsIDOMNode
* strict mode. (XML documents are always in strict mode.)
*/
readonly attribute DOMString compatMode;
/**
* Return nodes that match a given CSS selector.
*
* @see <http://dev.w3.org/2006/webapi/selectors-api/>
*/
nsIDOMElement querySelector([Null(Stringify)] in DOMString selectors);
nsIDOMNodeList querySelectorAll([Null(Stringify)] in DOMString selectors);
};

View File

@ -14,7 +14,14 @@
* http://www.w3.org/TR/DOM-Level-2-Core/
*/
[scriptable, builtinclass, uuid(33127aed-9d6a-4b0d-95aa-0529f51bcb9c)]
[scriptable, builtinclass, uuid(75a237af-133e-40f0-8196-2a172867c41a)]
interface nsIDOMDocumentFragment : nsIDOMNode
{
/**
* Return nodes that match a given CSS selector.
*
* @see <http://dev.w3.org/2006/webapi/selectors-api/>
*/
nsIDOMElement querySelector([Null(Stringify)] in DOMString selectors);
nsIDOMNodeList querySelectorAll([Null(Stringify)] in DOMString selectors);
};

View File

@ -15,7 +15,7 @@ interface nsIDOMMozNamedAttrMap;
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-element
*/
[scriptable, uuid(43d985da-b7ee-4d1f-a26f-348ccd9506f3)]
[scriptable, uuid(c3646b5d-a07d-470a-8e40-784459833c9f)]
interface nsIDOMElement : nsIDOMNode
{
readonly attribute DOMString tagName;
@ -212,4 +212,12 @@ interface nsIDOMElement : nsIDOMNode
* @see <http://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html>
*/
void mozRequestPointerLock();
/**
* Return nodes that match a given CSS selector.
*
* @see <http://dev.w3.org/2006/webapi/selectors-api/>
*/
nsIDOMElement querySelector([Null(Stringify)] in DOMString selectors);
nsIDOMNodeList querySelectorAll([Null(Stringify)] in DOMString selectors);
};

View File

@ -1367,17 +1367,30 @@ Blob<Child>::RecvPBlobStreamConstructor(StreamType* aActor)
return aActor->Send__delete__(aActor, params);
}
template <ActorFlavorEnum ActorFlavor>
typename Blob<ActorFlavor>::StreamType*
Blob<ActorFlavor>::AllocPBlobStream()
BlobTraits<Parent>::StreamType*
BlobTraits<Parent>::BaseType::AllocPBlobStreamParent()
{
MOZ_ASSERT(NS_IsMainThread());
return new InputStreamActor<ActorFlavor>();
return new InputStreamActor<Parent>();
}
BlobTraits<Child>::StreamType*
BlobTraits<Child>::BaseType::AllocPBlobStreamChild()
{
MOZ_ASSERT(NS_IsMainThread());
return new InputStreamActor<Child>();
}
template <ActorFlavorEnum ActorFlavor>
bool
Blob<ActorFlavor>::DeallocPBlobStream(StreamType* aActor)
BlobTraits<Parent>::BaseType::DeallocPBlobStreamParent(BlobTraits<Parent>::StreamType* aActor)
{
MOZ_ASSERT(NS_IsMainThread());
delete aActor;
return true;
}
bool
BlobTraits<Child>::BaseType::DeallocPBlobStreamChild(BlobTraits<Child>::StreamType* aActor)
{
MOZ_ASSERT(NS_IsMainThread());
delete aActor;

View File

@ -84,6 +84,12 @@ struct BlobTraits<Parent>
}
protected:
virtual StreamType*
AllocPBlobStreamParent() MOZ_OVERRIDE;
virtual bool
DeallocPBlobStreamParent(StreamType* aActor) MOZ_OVERRIDE;
BaseType();
virtual ~BaseType();
@ -133,6 +139,12 @@ struct BlobTraits<Child>
}
protected:
virtual StreamType*
AllocPBlobStreamChild() MOZ_OVERRIDE;
virtual bool
DeallocPBlobStreamChild(StreamType* aActor) MOZ_OVERRIDE;
BaseType()
{ }
@ -217,12 +229,6 @@ private:
virtual bool
RecvPBlobStreamConstructor(StreamType* aActor) MOZ_OVERRIDE;
virtual StreamType*
AllocPBlobStream() MOZ_OVERRIDE;
virtual bool
DeallocPBlobStream(StreamType* aActor) MOZ_OVERRIDE;
};
} // namespace ipc
@ -233,4 +239,4 @@ typedef mozilla::dom::ipc::Blob<mozilla::dom::ipc::Parent> BlobParent;
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_ipc_Blob_h
#endif // mozilla_dom_ipc_Blob_h

View File

@ -382,7 +382,7 @@ ContentChild::InitXPCOM()
}
PMemoryReportRequestChild*
ContentChild::AllocPMemoryReportRequest()
ContentChild::AllocPMemoryReportRequestChild()
{
return new MemoryReportRequestChild();
}
@ -492,7 +492,7 @@ ContentChild::RecvAudioChannelNotify()
}
bool
ContentChild::DeallocPMemoryReportRequest(PMemoryReportRequestChild* actor)
ContentChild::DeallocPMemoryReportRequestChild(PMemoryReportRequestChild* actor)
{
delete actor;
return true;
@ -512,25 +512,26 @@ ContentChild::RecvDumpMemoryInfoToTempDir(const nsString& aIdentifier,
bool
ContentChild::RecvDumpGCAndCCLogsToFile(const nsString& aIdentifier,
const bool& aDumpAllTraces,
const bool& aDumpChildProcesses)
{
nsCOMPtr<nsIMemoryInfoDumper> dumper = do_GetService("@mozilla.org/memory-info-dumper;1");
dumper->DumpGCAndCCLogsToFile(
aIdentifier, aDumpChildProcesses);
dumper->DumpGCAndCCLogsToFile(aIdentifier, aDumpAllTraces,
aDumpChildProcesses);
return true;
}
PCompositorChild*
ContentChild::AllocPCompositor(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess)
ContentChild::AllocPCompositorChild(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess)
{
return CompositorChild::Create(aTransport, aOtherProcess);
}
PImageBridgeChild*
ContentChild::AllocPImageBridge(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess)
ContentChild::AllocPImageBridgeChild(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess)
{
return ImageBridgeChild::StartUpInChildProcess(aTransport, aOtherProcess);
}
@ -556,7 +557,7 @@ static void FirstIdle(void)
}
mozilla::jsipc::PJavaScriptChild *
ContentChild::AllocPJavaScript()
ContentChild::AllocPJavaScriptChild()
{
nsCOMPtr<nsIJSRuntimeService> svc = do_GetService("@mozilla.org/js/xpc/RuntimeService;1");
NS_ENSURE_TRUE(svc, NULL);
@ -574,15 +575,15 @@ ContentChild::AllocPJavaScript()
}
bool
ContentChild::DeallocPJavaScript(PJavaScriptChild *child)
ContentChild::DeallocPJavaScriptChild(PJavaScriptChild *child)
{
delete child;
return true;
}
PBrowserChild*
ContentChild::AllocPBrowser(const IPCTabContext& aContext,
const uint32_t& aChromeFlags)
ContentChild::AllocPBrowserChild(const IPCTabContext& aContext,
const uint32_t& aChromeFlags)
{
// We'll happily accept any kind of IPCTabContext here; we don't need to
// check that it's of a certain type for security purposes, because we
@ -590,7 +591,7 @@ ContentChild::AllocPBrowser(const IPCTabContext& aContext,
nsRefPtr<TabChild> child = TabChild::Create(TabContext(aContext), aChromeFlags);
// The ref here is released in DeallocPBrowser.
// The ref here is released in DeallocPBrowserChild.
return child.forget().get();
}
@ -599,7 +600,7 @@ ContentChild::RecvPBrowserConstructor(PBrowserChild* actor,
const IPCTabContext& context,
const uint32_t& chromeFlags)
{
// This runs after AllocPBrowser() returns and the IPC machinery for this
// This runs after AllocPBrowserChild() returns and the IPC machinery for this
// PBrowserChild has been set up.
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
@ -623,7 +624,7 @@ ContentChild::RecvPBrowserConstructor(PBrowserChild* actor,
bool
ContentChild::DeallocPBrowser(PBrowserChild* iframe)
ContentChild::DeallocPBrowserChild(PBrowserChild* iframe)
{
TabChild* child = static_cast<TabChild*>(iframe);
NS_RELEASE(child);
@ -631,13 +632,13 @@ ContentChild::DeallocPBrowser(PBrowserChild* iframe)
}
PBlobChild*
ContentChild::AllocPBlob(const BlobConstructorParams& aParams)
ContentChild::AllocPBlobChild(const BlobConstructorParams& aParams)
{
return BlobChild::Create(aParams);
}
bool
ContentChild::DeallocPBlob(PBlobChild* aActor)
ContentChild::DeallocPBlobChild(PBlobChild* aActor)
{
delete aActor;
return true;
@ -731,8 +732,8 @@ ContentChild::GetOrCreateActorForBlob(nsIDOMBlob* aBlob)
}
PCrashReporterChild*
ContentChild::AllocPCrashReporter(const mozilla::dom::NativeThreadId& id,
const uint32_t& processType)
ContentChild::AllocPCrashReporterChild(const mozilla::dom::NativeThreadId& id,
const uint32_t& processType)
{
#ifdef MOZ_CRASHREPORTER
return new CrashReporterChild();
@ -742,47 +743,47 @@ ContentChild::AllocPCrashReporter(const mozilla::dom::NativeThreadId& id,
}
bool
ContentChild::DeallocPCrashReporter(PCrashReporterChild* crashreporter)
ContentChild::DeallocPCrashReporterChild(PCrashReporterChild* crashreporter)
{
delete crashreporter;
return true;
}
PHalChild*
ContentChild::AllocPHal()
ContentChild::AllocPHalChild()
{
return CreateHalChild();
}
bool
ContentChild::DeallocPHal(PHalChild* aHal)
ContentChild::DeallocPHalChild(PHalChild* aHal)
{
delete aHal;
return true;
}
PIndexedDBChild*
ContentChild::AllocPIndexedDB()
ContentChild::AllocPIndexedDBChild()
{
NS_NOTREACHED("Should never get here!");
return NULL;
}
bool
ContentChild::DeallocPIndexedDB(PIndexedDBChild* aActor)
ContentChild::DeallocPIndexedDBChild(PIndexedDBChild* aActor)
{
delete aActor;
return true;
}
PTestShellChild*
ContentChild::AllocPTestShell()
ContentChild::AllocPTestShellChild()
{
return new TestShellChild();
}
bool
ContentChild::DeallocPTestShell(PTestShellChild* shell)
ContentChild::DeallocPTestShellChild(PTestShellChild* shell)
{
delete shell;
return true;
@ -805,38 +806,38 @@ ContentChild::RecvPTestShellConstructor(PTestShellChild* actor)
}
PDeviceStorageRequestChild*
ContentChild::AllocPDeviceStorageRequest(const DeviceStorageParams& aParams)
ContentChild::AllocPDeviceStorageRequestChild(const DeviceStorageParams& aParams)
{
return new DeviceStorageRequestChild();
}
bool
ContentChild::DeallocPDeviceStorageRequest(PDeviceStorageRequestChild* aDeviceStorage)
ContentChild::DeallocPDeviceStorageRequestChild(PDeviceStorageRequestChild* aDeviceStorage)
{
delete aDeviceStorage;
return true;
}
PNeckoChild*
ContentChild::AllocPNecko()
PNeckoChild*
ContentChild::AllocPNeckoChild()
{
return new NeckoChild();
}
bool
ContentChild::DeallocPNecko(PNeckoChild* necko)
bool
ContentChild::DeallocPNeckoChild(PNeckoChild* necko)
{
delete necko;
return true;
}
PExternalHelperAppChild*
ContentChild::AllocPExternalHelperApp(const OptionalURIParams& uri,
const nsCString& aMimeContentType,
const nsCString& aContentDisposition,
const bool& aForceSave,
const int64_t& aContentLength,
const OptionalURIParams& aReferrer)
ContentChild::AllocPExternalHelperAppChild(const OptionalURIParams& uri,
const nsCString& aMimeContentType,
const nsCString& aContentDisposition,
const bool& aForceSave,
const int64_t& aContentLength,
const OptionalURIParams& aReferrer)
{
ExternalHelperAppChild *child = new ExternalHelperAppChild();
child->AddRef();
@ -844,7 +845,7 @@ ContentChild::AllocPExternalHelperApp(const OptionalURIParams& uri,
}
bool
ContentChild::DeallocPExternalHelperApp(PExternalHelperAppChild* aService)
ContentChild::DeallocPExternalHelperAppChild(PExternalHelperAppChild* aService)
{
ExternalHelperAppChild *child = static_cast<ExternalHelperAppChild*>(aService);
child->Release();
@ -852,27 +853,27 @@ ContentChild::DeallocPExternalHelperApp(PExternalHelperAppChild* aService)
}
PSmsChild*
ContentChild::AllocPSms()
ContentChild::AllocPSmsChild()
{
return new SmsChild();
}
bool
ContentChild::DeallocPSms(PSmsChild* aSms)
ContentChild::DeallocPSmsChild(PSmsChild* aSms)
{
delete aSms;
return true;
}
PStorageChild*
ContentChild::AllocPStorage()
ContentChild::AllocPStorageChild()
{
NS_NOTREACHED("We should never be manually allocating PStorageChild actors");
return nullptr;
}
bool
ContentChild::DeallocPStorage(PStorageChild* aActor)
ContentChild::DeallocPStorageChild(PStorageChild* aActor)
{
DOMStorageDBChild* child = static_cast<DOMStorageDBChild*>(aActor);
child->ReleaseIPDLReference();
@ -880,7 +881,7 @@ ContentChild::DeallocPStorage(PStorageChild* aActor)
}
PBluetoothChild*
ContentChild::AllocPBluetooth()
ContentChild::AllocPBluetoothChild()
{
#ifdef MOZ_B2G_BT
MOZ_CRASH("No one should be allocating PBluetoothChild actors");
@ -890,7 +891,7 @@ ContentChild::AllocPBluetooth()
}
bool
ContentChild::DeallocPBluetooth(PBluetoothChild* aActor)
ContentChild::DeallocPBluetoothChild(PBluetoothChild* aActor)
{
#ifdef MOZ_B2G_BT
delete aActor;
@ -901,7 +902,7 @@ ContentChild::DeallocPBluetooth(PBluetoothChild* aActor)
}
PSpeechSynthesisChild*
ContentChild::AllocPSpeechSynthesis()
ContentChild::AllocPSpeechSynthesisChild()
{
#ifdef MOZ_WEBSPEECH
MOZ_CRASH("No one should be allocating PSpeechSynthesisChild actors");
@ -911,7 +912,7 @@ ContentChild::AllocPSpeechSynthesis()
}
bool
ContentChild::DeallocPSpeechSynthesis(PSpeechSynthesisChild* aActor)
ContentChild::DeallocPSpeechSynthesisChild(PSpeechSynthesisChild* aActor)
{
#ifdef MOZ_WEBSPEECH
delete aActor;

View File

@ -77,41 +77,41 @@ public:
const void GetProcessName(nsAString& aName);
PCompositorChild*
AllocPCompositor(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
AllocPCompositorChild(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
PImageBridgeChild*
AllocPImageBridge(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
AllocPImageBridgeChild(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
virtual bool RecvSetProcessPrivileges(const ChildPrivileges& aPrivs);
virtual PBrowserChild* AllocPBrowser(const IPCTabContext &aContext,
const uint32_t &chromeFlags);
virtual bool DeallocPBrowser(PBrowserChild*);
virtual PBrowserChild* AllocPBrowserChild(const IPCTabContext &aContext,
const uint32_t &chromeFlags);
virtual bool DeallocPBrowserChild(PBrowserChild*);
virtual PDeviceStorageRequestChild* AllocPDeviceStorageRequest(const DeviceStorageParams&);
virtual bool DeallocPDeviceStorageRequest(PDeviceStorageRequestChild*);
virtual PDeviceStorageRequestChild* AllocPDeviceStorageRequestChild(const DeviceStorageParams&);
virtual bool DeallocPDeviceStorageRequestChild(PDeviceStorageRequestChild*);
virtual PBlobChild* AllocPBlob(const BlobConstructorParams& aParams);
virtual bool DeallocPBlob(PBlobChild*);
virtual PBlobChild* AllocPBlobChild(const BlobConstructorParams& aParams);
virtual bool DeallocPBlobChild(PBlobChild*);
virtual PCrashReporterChild*
AllocPCrashReporter(const mozilla::dom::NativeThreadId& id,
const uint32_t& processType);
AllocPCrashReporterChild(const mozilla::dom::NativeThreadId& id,
const uint32_t& processType);
virtual bool
DeallocPCrashReporter(PCrashReporterChild*);
DeallocPCrashReporterChild(PCrashReporterChild*);
virtual PHalChild* AllocPHal() MOZ_OVERRIDE;
virtual bool DeallocPHal(PHalChild*) MOZ_OVERRIDE;
virtual PHalChild* AllocPHalChild() MOZ_OVERRIDE;
virtual bool DeallocPHalChild(PHalChild*) MOZ_OVERRIDE;
virtual PIndexedDBChild* AllocPIndexedDB();
virtual bool DeallocPIndexedDB(PIndexedDBChild* aActor);
virtual PIndexedDBChild* AllocPIndexedDBChild();
virtual bool DeallocPIndexedDBChild(PIndexedDBChild* aActor);
virtual PMemoryReportRequestChild*
AllocPMemoryReportRequest();
AllocPMemoryReportRequestChild();
virtual bool
DeallocPMemoryReportRequest(PMemoryReportRequestChild* actor);
DeallocPMemoryReportRequestChild(PMemoryReportRequestChild* actor);
virtual bool
RecvPMemoryReportRequestConstructor(PMemoryReportRequestChild* child);
@ -125,44 +125,45 @@ public:
const bool& aDumpChildProcesses);
virtual bool
RecvDumpGCAndCCLogsToFile(const nsString& aIdentifier,
const bool& aDumpAllTraces,
const bool& aDumpChildProcesses);
virtual PTestShellChild* AllocPTestShell();
virtual bool DeallocPTestShell(PTestShellChild*);
virtual PTestShellChild* AllocPTestShellChild();
virtual bool DeallocPTestShellChild(PTestShellChild*);
virtual bool RecvPTestShellConstructor(PTestShellChild*);
jsipc::JavaScriptChild *GetCPOWManager();
virtual PNeckoChild* AllocPNecko();
virtual bool DeallocPNecko(PNeckoChild*);
virtual PNeckoChild* AllocPNeckoChild();
virtual bool DeallocPNeckoChild(PNeckoChild*);
virtual PExternalHelperAppChild *AllocPExternalHelperApp(
virtual PExternalHelperAppChild *AllocPExternalHelperAppChild(
const OptionalURIParams& uri,
const nsCString& aMimeContentType,
const nsCString& aContentDisposition,
const bool& aForceSave,
const int64_t& aContentLength,
const OptionalURIParams& aReferrer);
virtual bool DeallocPExternalHelperApp(PExternalHelperAppChild *aService);
virtual bool DeallocPExternalHelperAppChild(PExternalHelperAppChild *aService);
virtual PSmsChild* AllocPSms();
virtual bool DeallocPSms(PSmsChild*);
virtual PSmsChild* AllocPSmsChild();
virtual bool DeallocPSmsChild(PSmsChild*);
virtual PStorageChild* AllocPStorage();
virtual bool DeallocPStorage(PStorageChild* aActor);
virtual PStorageChild* AllocPStorageChild();
virtual bool DeallocPStorageChild(PStorageChild* aActor);
virtual PBluetoothChild* AllocPBluetooth();
virtual bool DeallocPBluetooth(PBluetoothChild* aActor);
virtual PBluetoothChild* AllocPBluetoothChild();
virtual bool DeallocPBluetoothChild(PBluetoothChild* aActor);
virtual PSpeechSynthesisChild* AllocPSpeechSynthesis();
virtual bool DeallocPSpeechSynthesis(PSpeechSynthesisChild* aActor);
virtual PSpeechSynthesisChild* AllocPSpeechSynthesisChild();
virtual bool DeallocPSpeechSynthesisChild(PSpeechSynthesisChild* aActor);
virtual bool RecvRegisterChrome(const InfallibleTArray<ChromePackage>& packages,
const InfallibleTArray<ResourceMapping>& resources,
const InfallibleTArray<OverrideMapping>& overrides,
const nsCString& locale);
virtual mozilla::jsipc::PJavaScriptChild* AllocPJavaScript();
virtual bool DeallocPJavaScript(mozilla::jsipc::PJavaScriptChild*);
virtual mozilla::jsipc::PJavaScriptChild* AllocPJavaScriptChild();
virtual bool DeallocPJavaScriptChild(mozilla::jsipc::PJavaScriptChild*);
virtual bool RecvSetOffline(const bool& offline);

View File

@ -1555,15 +1555,15 @@ ContentParent::Observe(nsISupports* aSubject,
}
PCompositorParent*
ContentParent::AllocPCompositor(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess)
ContentParent::AllocPCompositorParent(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess)
{
return CompositorParent::Create(aTransport, aOtherProcess);
}
PImageBridgeParent*
ContentParent::AllocPImageBridge(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess)
ContentParent::AllocPImageBridgeParent(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess)
{
return ImageBridgeParent::Create(aTransport, aOtherProcess);
}
@ -1591,7 +1591,7 @@ ContentParent::RecvGetXPCOMProcessAttributes(bool* aIsOffline)
}
mozilla::jsipc::PJavaScriptParent *
ContentParent::AllocPJavaScript()
ContentParent::AllocPJavaScriptParent()
{
mozilla::jsipc::JavaScriptParent *parent = new mozilla::jsipc::JavaScriptParent();
if (!parent->init()) {
@ -1602,15 +1602,15 @@ ContentParent::AllocPJavaScript()
}
bool
ContentParent::DeallocPJavaScript(PJavaScriptParent *parent)
ContentParent::DeallocPJavaScriptParent(PJavaScriptParent *parent)
{
static_cast<mozilla::jsipc::JavaScriptParent *>(parent)->destroyFromContent();
return true;
}
PBrowserParent*
ContentParent::AllocPBrowser(const IPCTabContext& aContext,
const uint32_t &aChromeFlags)
ContentParent::AllocPBrowserParent(const IPCTabContext& aContext,
const uint32_t &aChromeFlags)
{
unused << aChromeFlags;
@ -1621,14 +1621,14 @@ ContentParent::AllocPBrowser(const IPCTabContext& aContext,
// (PopupIPCTabContext lets the child process prove that it has access to
// the app it's trying to open.)
if (appBrowser.type() != IPCTabAppBrowserContext::TPopupIPCTabContext) {
NS_ERROR("Unexpected IPCTabContext type. Aborting AllocPBrowser.");
NS_ERROR("Unexpected IPCTabContext type. Aborting AllocPBrowserParent.");
return nullptr;
}
const PopupIPCTabContext& popupContext = appBrowser.get_PopupIPCTabContext();
TabParent* opener = static_cast<TabParent*>(popupContext.openerParent());
if (!opener) {
NS_ERROR("Got null opener from child; aborting AllocPBrowser.");
NS_ERROR("Got null opener from child; aborting AllocPBrowserParent.");
return nullptr;
}
@ -1636,19 +1636,19 @@ ContentParent::AllocPBrowser(const IPCTabContext& aContext,
// isBrowser. Allocating a !isBrowser frame with same app ID would allow
// the content to access data it's not supposed to.
if (!popupContext.isBrowserElement() && opener->IsBrowserElement()) {
NS_ERROR("Child trying to escalate privileges! Aborting AllocPBrowser.");
NS_ERROR("Child trying to escalate privileges! Aborting AllocPBrowserParent.");
return nullptr;
}
TabParent* parent = new TabParent(TabContext(aContext));
// We release this ref in DeallocPBrowser()
// We release this ref in DeallocPBrowserParent()
NS_ADDREF(parent);
return parent;
}
bool
ContentParent::DeallocPBrowser(PBrowserParent* frame)
ContentParent::DeallocPBrowserParent(PBrowserParent* frame)
{
TabParent* parent = static_cast<TabParent*>(frame);
NS_RELEASE(parent);
@ -1656,7 +1656,7 @@ ContentParent::DeallocPBrowser(PBrowserParent* frame)
}
PDeviceStorageRequestParent*
ContentParent::AllocPDeviceStorageRequest(const DeviceStorageParams& aParams)
ContentParent::AllocPDeviceStorageRequestParent(const DeviceStorageParams& aParams)
{
nsRefPtr<DeviceStorageRequestParent> result = new DeviceStorageRequestParent(aParams);
if (!result->EnsureRequiredPermissions(this)) {
@ -1667,7 +1667,7 @@ ContentParent::AllocPDeviceStorageRequest(const DeviceStorageParams& aParams)
}
bool
ContentParent::DeallocPDeviceStorageRequest(PDeviceStorageRequestParent* doomed)
ContentParent::DeallocPDeviceStorageRequestParent(PDeviceStorageRequestParent* doomed)
{
DeviceStorageRequestParent *parent = static_cast<DeviceStorageRequestParent*>(doomed);
NS_RELEASE(parent);
@ -1675,13 +1675,13 @@ ContentParent::DeallocPDeviceStorageRequest(PDeviceStorageRequestParent* doomed)
}
PBlobParent*
ContentParent::AllocPBlob(const BlobConstructorParams& aParams)
ContentParent::AllocPBlobParent(const BlobConstructorParams& aParams)
{
return BlobParent::Create(aParams);
}
bool
ContentParent::DeallocPBlob(PBlobParent* aActor)
ContentParent::DeallocPBlobParent(PBlobParent* aActor)
{
delete aActor;
return true;
@ -1809,8 +1809,8 @@ ContentParent::FriendlyName(nsAString& aName)
}
PCrashReporterParent*
ContentParent::AllocPCrashReporter(const NativeThreadId& tid,
const uint32_t& processType)
ContentParent::AllocPCrashReporterParent(const NativeThreadId& tid,
const uint32_t& processType)
{
#ifdef MOZ_CRASHREPORTER
return new CrashReporterParent();
@ -1829,33 +1829,33 @@ ContentParent::RecvPCrashReporterConstructor(PCrashReporterParent* actor,
}
bool
ContentParent::DeallocPCrashReporter(PCrashReporterParent* crashreporter)
ContentParent::DeallocPCrashReporterParent(PCrashReporterParent* crashreporter)
{
delete crashreporter;
return true;
}
hal_sandbox::PHalParent*
ContentParent::AllocPHal()
ContentParent::AllocPHalParent()
{
return hal_sandbox::CreateHalParent();
}
bool
ContentParent::DeallocPHal(hal_sandbox::PHalParent* aHal)
ContentParent::DeallocPHalParent(hal_sandbox::PHalParent* aHal)
{
delete aHal;
return true;
}
PIndexedDBParent*
ContentParent::AllocPIndexedDB()
ContentParent::AllocPIndexedDBParent()
{
return new IndexedDBParent(this);
}
bool
ContentParent::DeallocPIndexedDB(PIndexedDBParent* aActor)
ContentParent::DeallocPIndexedDBParent(PIndexedDBParent* aActor)
{
delete aActor;
return true;
@ -1885,14 +1885,14 @@ ContentParent::RecvPIndexedDBConstructor(PIndexedDBParent* aActor)
}
PMemoryReportRequestParent*
ContentParent::AllocPMemoryReportRequest()
ContentParent::AllocPMemoryReportRequestParent()
{
MemoryReportRequestParent* parent = new MemoryReportRequestParent();
return parent;
}
bool
ContentParent::DeallocPMemoryReportRequest(PMemoryReportRequestParent* actor)
ContentParent::DeallocPMemoryReportRequestParent(PMemoryReportRequestParent* actor)
{
delete actor;
return true;
@ -1929,38 +1929,38 @@ ContentParent::SetChildMemoryReporters(const InfallibleTArray<MemoryReport>& rep
}
PTestShellParent*
ContentParent::AllocPTestShell()
ContentParent::AllocPTestShellParent()
{
return new TestShellParent();
}
bool
ContentParent::DeallocPTestShell(PTestShellParent* shell)
ContentParent::DeallocPTestShellParent(PTestShellParent* shell)
{
delete shell;
return true;
}
PNeckoParent*
ContentParent::AllocPNecko()
PNeckoParent*
ContentParent::AllocPNeckoParent()
{
return new NeckoParent();
}
bool
ContentParent::DeallocPNecko(PNeckoParent* necko)
bool
ContentParent::DeallocPNeckoParent(PNeckoParent* necko)
{
delete necko;
return true;
}
PExternalHelperAppParent*
ContentParent::AllocPExternalHelperApp(const OptionalURIParams& uri,
const nsCString& aMimeContentType,
const nsCString& aContentDisposition,
const bool& aForceSave,
const int64_t& aContentLength,
const OptionalURIParams& aReferrer)
ContentParent::AllocPExternalHelperAppParent(const OptionalURIParams& uri,
const nsCString& aMimeContentType,
const nsCString& aContentDisposition,
const bool& aForceSave,
const int64_t& aContentLength,
const OptionalURIParams& aReferrer)
{
ExternalHelperAppParent *parent = new ExternalHelperAppParent(uri, aContentLength);
parent->AddRef();
@ -1969,7 +1969,7 @@ ContentParent::AllocPExternalHelperApp(const OptionalURIParams& uri,
}
bool
ContentParent::DeallocPExternalHelperApp(PExternalHelperAppParent* aService)
ContentParent::DeallocPExternalHelperAppParent(PExternalHelperAppParent* aService)
{
ExternalHelperAppParent *parent = static_cast<ExternalHelperAppParent *>(aService);
parent->Release();
@ -1977,7 +1977,7 @@ ContentParent::DeallocPExternalHelperApp(PExternalHelperAppParent* aService)
}
PSmsParent*
ContentParent::AllocPSms()
ContentParent::AllocPSmsParent()
{
if (!AssertAppProcessPermission(this, "sms")) {
return nullptr;
@ -1989,20 +1989,20 @@ ContentParent::AllocPSms()
}
bool
ContentParent::DeallocPSms(PSmsParent* aSms)
ContentParent::DeallocPSmsParent(PSmsParent* aSms)
{
static_cast<SmsParent*>(aSms)->Release();
return true;
}
PStorageParent*
ContentParent::AllocPStorage()
ContentParent::AllocPStorageParent()
{
return new DOMStorageDBParent();
}
bool
ContentParent::DeallocPStorage(PStorageParent* aActor)
ContentParent::DeallocPStorageParent(PStorageParent* aActor)
{
DOMStorageDBParent* child = static_cast<DOMStorageDBParent*>(aActor);
child->ReleaseIPDLReference();
@ -2010,7 +2010,7 @@ ContentParent::DeallocPStorage(PStorageParent* aActor)
}
PBluetoothParent*
ContentParent::AllocPBluetooth()
ContentParent::AllocPBluetoothParent()
{
#ifdef MOZ_B2G_BT
if (!AssertAppProcessPermission(this, "bluetooth")) {
@ -2023,7 +2023,7 @@ ContentParent::AllocPBluetooth()
}
bool
ContentParent::DeallocPBluetooth(PBluetoothParent* aActor)
ContentParent::DeallocPBluetoothParent(PBluetoothParent* aActor)
{
#ifdef MOZ_B2G_BT
delete aActor;
@ -2047,7 +2047,7 @@ ContentParent::RecvPBluetoothConstructor(PBluetoothParent* aActor)
}
PSpeechSynthesisParent*
ContentParent::AllocPSpeechSynthesis()
ContentParent::AllocPSpeechSynthesisParent()
{
#ifdef MOZ_WEBSPEECH
return new mozilla::dom::SpeechSynthesisParent();
@ -2057,7 +2057,7 @@ ContentParent::AllocPSpeechSynthesis()
}
bool
ContentParent::DeallocPSpeechSynthesis(PSpeechSynthesisParent* aActor)
ContentParent::DeallocPSpeechSynthesisParent(PSpeechSynthesisParent* aActor)
{
#ifdef MOZ_WEBSPEECH
delete aActor;

View File

@ -246,33 +246,33 @@ private:
void ShutDownProcess();
PCompositorParent*
AllocPCompositor(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
AllocPCompositorParent(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
PImageBridgeParent*
AllocPImageBridge(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
AllocPImageBridgeParent(mozilla::ipc::Transport* aTransport,
base::ProcessId aOtherProcess) MOZ_OVERRIDE;
virtual bool RecvGetProcessAttributes(uint64_t* aId,
bool* aIsForApp,
bool* aIsForBrowser) MOZ_OVERRIDE;
virtual bool RecvGetXPCOMProcessAttributes(bool* aIsOffline) MOZ_OVERRIDE;
virtual mozilla::jsipc::PJavaScriptParent* AllocPJavaScript();
virtual bool DeallocPJavaScript(mozilla::jsipc::PJavaScriptParent*);
virtual mozilla::jsipc::PJavaScriptParent* AllocPJavaScriptParent();
virtual bool DeallocPJavaScriptParent(mozilla::jsipc::PJavaScriptParent*);
virtual PBrowserParent* AllocPBrowser(const IPCTabContext& aContext,
const uint32_t& aChromeFlags);
virtual bool DeallocPBrowser(PBrowserParent* frame);
virtual PBrowserParent* AllocPBrowserParent(const IPCTabContext& aContext,
const uint32_t& aChromeFlags);
virtual bool DeallocPBrowserParent(PBrowserParent* frame);
virtual PDeviceStorageRequestParent* AllocPDeviceStorageRequest(const DeviceStorageParams&);
virtual bool DeallocPDeviceStorageRequest(PDeviceStorageRequestParent*);
virtual PDeviceStorageRequestParent* AllocPDeviceStorageRequestParent(const DeviceStorageParams&);
virtual bool DeallocPDeviceStorageRequestParent(PDeviceStorageRequestParent*);
virtual PBlobParent* AllocPBlob(const BlobConstructorParams& aParams);
virtual bool DeallocPBlob(PBlobParent*);
virtual PBlobParent* AllocPBlobParent(const BlobConstructorParams& aParams);
virtual bool DeallocPBlobParent(PBlobParent*);
virtual PCrashReporterParent* AllocPCrashReporter(const NativeThreadId& tid,
const uint32_t& processType);
virtual bool DeallocPCrashReporter(PCrashReporterParent* crashreporter);
virtual PCrashReporterParent* AllocPCrashReporterParent(const NativeThreadId& tid,
const uint32_t& processType);
virtual bool DeallocPCrashReporterParent(PCrashReporterParent* crashreporter);
virtual bool RecvPCrashReporterConstructor(PCrashReporterParent* actor,
const NativeThreadId& tid,
const uint32_t& processType);
@ -280,46 +280,46 @@ private:
virtual bool RecvGetRandomValues(const uint32_t& length,
InfallibleTArray<uint8_t>* randomValues);
virtual PHalParent* AllocPHal() MOZ_OVERRIDE;
virtual bool DeallocPHal(PHalParent*) MOZ_OVERRIDE;
virtual PHalParent* AllocPHalParent() MOZ_OVERRIDE;
virtual bool DeallocPHalParent(PHalParent*) MOZ_OVERRIDE;
virtual PIndexedDBParent* AllocPIndexedDB();
virtual PIndexedDBParent* AllocPIndexedDBParent();
virtual bool DeallocPIndexedDB(PIndexedDBParent* aActor);
virtual bool DeallocPIndexedDBParent(PIndexedDBParent* aActor);
virtual bool
RecvPIndexedDBConstructor(PIndexedDBParent* aActor);
virtual PMemoryReportRequestParent* AllocPMemoryReportRequest();
virtual bool DeallocPMemoryReportRequest(PMemoryReportRequestParent* actor);
virtual PMemoryReportRequestParent* AllocPMemoryReportRequestParent();
virtual bool DeallocPMemoryReportRequestParent(PMemoryReportRequestParent* actor);
virtual PTestShellParent* AllocPTestShell();
virtual bool DeallocPTestShell(PTestShellParent* shell);
virtual PTestShellParent* AllocPTestShellParent();
virtual bool DeallocPTestShellParent(PTestShellParent* shell);
virtual PNeckoParent* AllocPNecko();
virtual bool DeallocPNecko(PNeckoParent* necko);
virtual PNeckoParent* AllocPNeckoParent();
virtual bool DeallocPNeckoParent(PNeckoParent* necko);
virtual PExternalHelperAppParent* AllocPExternalHelperApp(
virtual PExternalHelperAppParent* AllocPExternalHelperAppParent(
const OptionalURIParams& aUri,
const nsCString& aMimeContentType,
const nsCString& aContentDisposition,
const bool& aForceSave,
const int64_t& aContentLength,
const OptionalURIParams& aReferrer);
virtual bool DeallocPExternalHelperApp(PExternalHelperAppParent* aService);
virtual bool DeallocPExternalHelperAppParent(PExternalHelperAppParent* aService);
virtual PSmsParent* AllocPSms();
virtual bool DeallocPSms(PSmsParent*);
virtual PSmsParent* AllocPSmsParent();
virtual bool DeallocPSmsParent(PSmsParent*);
virtual PStorageParent* AllocPStorage();
virtual bool DeallocPStorage(PStorageParent* aActor);
virtual PStorageParent* AllocPStorageParent();
virtual bool DeallocPStorageParent(PStorageParent* aActor);
virtual PBluetoothParent* AllocPBluetooth();
virtual bool DeallocPBluetooth(PBluetoothParent* aActor);
virtual PBluetoothParent* AllocPBluetoothParent();
virtual bool DeallocPBluetoothParent(PBluetoothParent* aActor);
virtual bool RecvPBluetoothConstructor(PBluetoothParent* aActor);
virtual PSpeechSynthesisParent* AllocPSpeechSynthesis();
virtual bool DeallocPSpeechSynthesis(PSpeechSynthesisParent* aActor);
virtual PSpeechSynthesisParent* AllocPSpeechSynthesisParent();
virtual bool DeallocPSpeechSynthesisParent(PSpeechSynthesisParent* aActor);
virtual bool RecvPSpeechSynthesisConstructor(PSpeechSynthesisParent* aActor);
virtual bool RecvReadPrefsArray(InfallibleTArray<PrefSetting>* aPrefs);

View File

@ -317,6 +317,7 @@ child:
* MemoryInfoDumper::dumpGCAndCCLogsToFile.
*/
async DumpGCAndCCLogsToFile(nsString identifier,
bool dumpAllTraces,
bool dumpChildProcesses);
PTestShell();

View File

@ -1877,18 +1877,18 @@ TabChild::DispatchWidgetEvent(nsGUIEvent& event)
}
PDocumentRendererChild*
TabChild::AllocPDocumentRenderer(const nsRect& documentRect,
const gfxMatrix& transform,
const nsString& bgcolor,
const uint32_t& renderFlags,
const bool& flushLayout,
const nsIntSize& renderSize)
TabChild::AllocPDocumentRendererChild(const nsRect& documentRect,
const gfxMatrix& transform,
const nsString& bgcolor,
const uint32_t& renderFlags,
const bool& flushLayout,
const nsIntSize& renderSize)
{
return new DocumentRendererChild();
}
bool
TabChild::DeallocPDocumentRenderer(PDocumentRendererChild* actor)
TabChild::DeallocPDocumentRendererChild(PDocumentRendererChild* actor)
{
delete actor;
return true;
@ -1928,31 +1928,31 @@ TabChild::RecvPDocumentRendererConstructor(PDocumentRendererChild* actor,
}
PContentDialogChild*
TabChild::AllocPContentDialog(const uint32_t&,
const nsCString&,
const nsCString&,
const InfallibleTArray<int>&,
const InfallibleTArray<nsString>&)
TabChild::AllocPContentDialogChild(const uint32_t&,
const nsCString&,
const nsCString&,
const InfallibleTArray<int>&,
const InfallibleTArray<nsString>&)
{
return new ContentDialogChild();
}
bool
TabChild::DeallocPContentDialog(PContentDialogChild* aDialog)
TabChild::DeallocPContentDialogChild(PContentDialogChild* aDialog)
{
delete aDialog;
return true;
}
PContentPermissionRequestChild*
TabChild::AllocPContentPermissionRequest(const nsCString& aType, const nsCString& aAccess, const IPC::Principal&)
TabChild::AllocPContentPermissionRequestChild(const nsCString& aType, const nsCString& aAccess, const IPC::Principal&)
{
NS_RUNTIMEABORT("unused");
return nullptr;
}
bool
TabChild::DeallocPContentPermissionRequest(PContentPermissionRequestChild* actor)
TabChild::DeallocPContentPermissionRequestChild(PContentPermissionRequestChild* actor)
{
PCOMContentPermissionRequestChild* child =
static_cast<PCOMContentPermissionRequestChild*>(actor);
@ -1977,16 +1977,16 @@ TabChild::RecvActivateFrameEvent(const nsString& aType, const bool& capture)
}
POfflineCacheUpdateChild*
TabChild::AllocPOfflineCacheUpdate(const URIParams& manifestURI,
const URIParams& documentURI,
const bool& stickDocument)
TabChild::AllocPOfflineCacheUpdateChild(const URIParams& manifestURI,
const URIParams& documentURI,
const bool& stickDocument)
{
NS_RUNTIMEABORT("unused");
return nullptr;
}
bool
TabChild::DeallocPOfflineCacheUpdate(POfflineCacheUpdateChild* actor)
TabChild::DeallocPOfflineCacheUpdateChild(POfflineCacheUpdateChild* actor)
{
OfflineCacheUpdateChild* offlineCacheUpdate = static_cast<OfflineCacheUpdateChild*>(actor);
delete offlineCacheUpdate;
@ -2077,7 +2077,7 @@ TabChild::RecvDestroy()
}
PRenderFrameChild*
TabChild::AllocPRenderFrame(ScrollingBehavior* aScrolling,
TabChild::AllocPRenderFrameChild(ScrollingBehavior* aScrolling,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId)
{
@ -2085,7 +2085,7 @@ TabChild::AllocPRenderFrame(ScrollingBehavior* aScrolling,
}
bool
TabChild::DeallocPRenderFrame(PRenderFrameChild* aFrame)
TabChild::DeallocPRenderFrameChild(PRenderFrameChild* aFrame)
{
delete aFrame;
return true;
@ -2295,14 +2295,14 @@ TabChild::GetMessageManager(nsIContentFrameMessageManager** aResult)
}
PIndexedDBChild*
TabChild::AllocPIndexedDB(const nsCString& aASCIIOrigin, bool* /* aAllowed */)
TabChild::AllocPIndexedDBChild(const nsCString& aASCIIOrigin, bool* /* aAllowed */)
{
NS_NOTREACHED("Should never get here!");
return NULL;
}
bool
TabChild::DeallocPIndexedDB(PIndexedDBChild* aActor)
TabChild::DeallocPIndexedDBChild(PIndexedDBChild* aActor)
{
delete aActor;
return true;

View File

@ -230,11 +230,11 @@ public:
const ClonedMessageData& aData);
virtual PDocumentRendererChild*
AllocPDocumentRenderer(const nsRect& documentRect, const gfxMatrix& transform,
const nsString& bgcolor,
const uint32_t& renderFlags, const bool& flushLayout,
const nsIntSize& renderSize);
virtual bool DeallocPDocumentRenderer(PDocumentRendererChild* actor);
AllocPDocumentRendererChild(const nsRect& documentRect, const gfxMatrix& transform,
const nsString& bgcolor,
const uint32_t& renderFlags, const bool& flushLayout,
const nsIntSize& renderSize);
virtual bool DeallocPDocumentRendererChild(PDocumentRendererChild* actor);
virtual bool RecvPDocumentRendererConstructor(PDocumentRendererChild* actor,
const nsRect& documentRect,
const gfxMatrix& transform,
@ -243,12 +243,12 @@ public:
const bool& flushLayout,
const nsIntSize& renderSize);
virtual PContentDialogChild* AllocPContentDialog(const uint32_t&,
const nsCString&,
const nsCString&,
const InfallibleTArray<int>&,
const InfallibleTArray<nsString>&);
virtual bool DeallocPContentDialog(PContentDialogChild* aDialog);
virtual PContentDialogChild* AllocPContentDialogChild(const uint32_t&,
const nsCString&,
const nsCString&,
const InfallibleTArray<int>&,
const InfallibleTArray<nsString>&);
virtual bool DeallocPContentDialogChild(PContentDialogChild* aDialog);
static void ParamsToArrays(nsIDialogParamBlock* aParams,
InfallibleTArray<int>& aIntParams,
InfallibleTArray<nsString>& aStringParams);
@ -269,16 +269,16 @@ public:
}
#endif /* DEBUG */
virtual PContentPermissionRequestChild* AllocPContentPermissionRequest(const nsCString& aType,
const nsCString& aAccess,
const IPC::Principal& aPrincipal);
virtual bool DeallocPContentPermissionRequest(PContentPermissionRequestChild* actor);
virtual PContentPermissionRequestChild* AllocPContentPermissionRequestChild(const nsCString& aType,
const nsCString& aAccess,
const IPC::Principal& aPrincipal);
virtual bool DeallocPContentPermissionRequestChild(PContentPermissionRequestChild* actor);
virtual POfflineCacheUpdateChild* AllocPOfflineCacheUpdate(
virtual POfflineCacheUpdateChild* AllocPOfflineCacheUpdateChild(
const URIParams& manifestURI,
const URIParams& documentURI,
const bool& stickDocument);
virtual bool DeallocPOfflineCacheUpdate(POfflineCacheUpdateChild* offlineCacheUpdate);
virtual bool DeallocPOfflineCacheUpdateChild(POfflineCacheUpdateChild* offlineCacheUpdate);
nsIWebNavigation* WebNavigation() { return mWebNav; }
@ -327,18 +327,18 @@ public:
nsICachedFileDescriptorListener* aCallback);
protected:
virtual PRenderFrameChild* AllocPRenderFrame(ScrollingBehavior* aScrolling,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId) MOZ_OVERRIDE;
virtual bool DeallocPRenderFrame(PRenderFrameChild* aFrame) MOZ_OVERRIDE;
virtual PRenderFrameChild* AllocPRenderFrameChild(ScrollingBehavior* aScrolling,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId) MOZ_OVERRIDE;
virtual bool DeallocPRenderFrameChild(PRenderFrameChild* aFrame) MOZ_OVERRIDE;
virtual bool RecvDestroy() MOZ_OVERRIDE;
nsEventStatus DispatchWidgetEvent(nsGUIEvent& event);
virtual PIndexedDBChild* AllocPIndexedDB(const nsCString& aASCIIOrigin,
bool* /* aAllowed */);
virtual PIndexedDBChild* AllocPIndexedDBChild(const nsCString& aASCIIOrigin,
bool* /* aAllowed */);
virtual bool DeallocPIndexedDB(PIndexedDBChild* aActor);
virtual bool DeallocPIndexedDBChild(PIndexedDBChild* aActor);
private:
/**

View File

@ -539,31 +539,31 @@ TabParent::SetDocShell(nsIDocShell *aDocShell)
}
PDocumentRendererParent*
TabParent::AllocPDocumentRenderer(const nsRect& documentRect,
const gfxMatrix& transform,
const nsString& bgcolor,
const uint32_t& renderFlags,
const bool& flushLayout,
const nsIntSize& renderSize)
TabParent::AllocPDocumentRendererParent(const nsRect& documentRect,
const gfxMatrix& transform,
const nsString& bgcolor,
const uint32_t& renderFlags,
const bool& flushLayout,
const nsIntSize& renderSize)
{
return new DocumentRendererParent();
}
bool
TabParent::DeallocPDocumentRenderer(PDocumentRendererParent* actor)
TabParent::DeallocPDocumentRendererParent(PDocumentRendererParent* actor)
{
delete actor;
return true;
}
PContentPermissionRequestParent*
TabParent::AllocPContentPermissionRequest(const nsCString& type, const nsCString& access, const IPC::Principal& principal)
TabParent::AllocPContentPermissionRequestParent(const nsCString& type, const nsCString& access, const IPC::Principal& principal)
{
return new ContentPermissionRequestParent(type, access, mFrameElement, principal);
}
bool
TabParent::DeallocPContentPermissionRequest(PContentPermissionRequestParent* actor)
TabParent::DeallocPContentPermissionRequestParent(PContentPermissionRequestParent* actor)
{
delete actor;
return true;
@ -1111,13 +1111,13 @@ TabParent::ReceiveMessage(const nsString& aMessage,
}
PIndexedDBParent*
TabParent::AllocPIndexedDB(const nsCString& aASCIIOrigin, bool* /* aAllowed */)
TabParent::AllocPIndexedDBParent(const nsCString& aASCIIOrigin, bool* /* aAllowed */)
{
return new IndexedDBParent(this);
}
bool
TabParent::DeallocPIndexedDB(PIndexedDBParent* aActor)
TabParent::DeallocPIndexedDBParent(PIndexedDBParent* aActor)
{
delete aActor;
return true;
@ -1221,11 +1221,11 @@ TabParent::GetAuthPrompt(uint32_t aPromptReason, const nsIID& iid,
}
PContentDialogParent*
TabParent::AllocPContentDialog(const uint32_t& aType,
const nsCString& aName,
const nsCString& aFeatures,
const InfallibleTArray<int>& aIntParams,
const InfallibleTArray<nsString>& aStringParams)
TabParent::AllocPContentDialogParent(const uint32_t& aType,
const nsCString& aName,
const nsCString& aFeatures,
const InfallibleTArray<int>& aIntParams,
const InfallibleTArray<nsString>& aStringParams)
{
ContentDialogParent* parent = new ContentDialogParent();
nsCOMPtr<nsIDialogParamBlock> params =
@ -1295,9 +1295,9 @@ TabParent::HandleDelayedDialogs()
}
PRenderFrameParent*
TabParent::AllocPRenderFrame(ScrollingBehavior* aScrolling,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId)
TabParent::AllocPRenderFrameParent(ScrollingBehavior* aScrolling,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId)
{
MOZ_ASSERT(ManagedPRenderFrameParent().IsEmpty());
@ -1314,16 +1314,16 @@ TabParent::AllocPRenderFrame(ScrollingBehavior* aScrolling,
}
bool
TabParent::DeallocPRenderFrame(PRenderFrameParent* aFrame)
TabParent::DeallocPRenderFrameParent(PRenderFrameParent* aFrame)
{
delete aFrame;
return true;
}
mozilla::docshell::POfflineCacheUpdateParent*
TabParent::AllocPOfflineCacheUpdate(const URIParams& aManifestURI,
const URIParams& aDocumentURI,
const bool& stickDocument)
TabParent::AllocPOfflineCacheUpdateParent(const URIParams& aManifestURI,
const URIParams& aDocumentURI,
const bool& stickDocument)
{
nsRefPtr<mozilla::docshell::OfflineCacheUpdateParent> update =
new mozilla::docshell::OfflineCacheUpdateParent(OwnOrContainingAppId(),
@ -1339,7 +1339,7 @@ TabParent::AllocPOfflineCacheUpdate(const URIParams& aManifestURI,
}
bool
TabParent::DeallocPOfflineCacheUpdate(mozilla::docshell::POfflineCacheUpdateParent* actor)
TabParent::DeallocPOfflineCacheUpdateParent(mozilla::docshell::POfflineCacheUpdateParent* actor)
{
mozilla::docshell::OfflineCacheUpdateParent* update =
static_cast<mozilla::docshell::OfflineCacheUpdateParent*>(actor);

View File

@ -156,12 +156,12 @@ public:
const float& aMinZoom,
const float& aMaxZoom);
virtual bool RecvContentReceivedTouch(const bool& aPreventDefault);
virtual PContentDialogParent* AllocPContentDialog(const uint32_t& aType,
const nsCString& aName,
const nsCString& aFeatures,
const InfallibleTArray<int>& aIntParams,
const InfallibleTArray<nsString>& aStringParams);
virtual bool DeallocPContentDialog(PContentDialogParent* aDialog)
virtual PContentDialogParent* AllocPContentDialogParent(const uint32_t& aType,
const nsCString& aName,
const nsCString& aFeatures,
const InfallibleTArray<int>& aIntParams,
const InfallibleTArray<nsString>& aStringParams);
virtual bool DeallocPContentDialogParent(PContentDialogParent* aDialog)
{
delete aDialog;
return true;
@ -193,21 +193,21 @@ public:
bool SendRealTouchEvent(nsTouchEvent& event);
virtual PDocumentRendererParent*
AllocPDocumentRenderer(const nsRect& documentRect, const gfxMatrix& transform,
const nsString& bgcolor,
const uint32_t& renderFlags, const bool& flushLayout,
const nsIntSize& renderSize);
virtual bool DeallocPDocumentRenderer(PDocumentRendererParent* actor);
AllocPDocumentRendererParent(const nsRect& documentRect, const gfxMatrix& transform,
const nsString& bgcolor,
const uint32_t& renderFlags, const bool& flushLayout,
const nsIntSize& renderSize);
virtual bool DeallocPDocumentRendererParent(PDocumentRendererParent* actor);
virtual PContentPermissionRequestParent*
AllocPContentPermissionRequest(const nsCString& aType, const nsCString& aAccess, const IPC::Principal& aPrincipal);
virtual bool DeallocPContentPermissionRequest(PContentPermissionRequestParent* actor);
AllocPContentPermissionRequestParent(const nsCString& aType, const nsCString& aAccess, const IPC::Principal& aPrincipal);
virtual bool DeallocPContentPermissionRequestParent(PContentPermissionRequestParent* actor);
virtual POfflineCacheUpdateParent* AllocPOfflineCacheUpdate(
virtual POfflineCacheUpdateParent* AllocPOfflineCacheUpdateParent(
const URIParams& aManifestURI,
const URIParams& aDocumentURI,
const bool& stickDocument) MOZ_OVERRIDE;
virtual bool DeallocPOfflineCacheUpdate(POfflineCacheUpdateParent* actor);
virtual bool DeallocPOfflineCacheUpdateParent(POfflineCacheUpdateParent* actor);
JSBool GetGlobalJSObject(JSContext* cx, JSObject** globalp);
@ -236,10 +236,10 @@ protected:
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
virtual PIndexedDBParent* AllocPIndexedDB(const nsCString& aASCIIOrigin,
bool* /* aAllowed */);
virtual PIndexedDBParent* AllocPIndexedDBParent(const nsCString& aASCIIOrigin,
bool* /* aAllowed */);
virtual bool DeallocPIndexedDB(PIndexedDBParent* aActor);
virtual bool DeallocPIndexedDBParent(PIndexedDBParent* aActor);
virtual bool
RecvPIndexedDBConstructor(PIndexedDBParent* aActor,
@ -269,10 +269,10 @@ protected:
bool ShouldDelayDialogs();
bool AllowContentIME();
virtual PRenderFrameParent* AllocPRenderFrame(ScrollingBehavior* aScrolling,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId) MOZ_OVERRIDE;
virtual bool DeallocPRenderFrame(PRenderFrameParent* aFrame) MOZ_OVERRIDE;
virtual PRenderFrameParent* AllocPRenderFrameParent(ScrollingBehavior* aScrolling,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
uint64_t* aLayersId) MOZ_OVERRIDE;
virtual bool DeallocPRenderFrameParent(PRenderFrameParent* aFrame) MOZ_OVERRIDE;
// IME
static TabParent *mIMETabParent;

View File

@ -9,9 +9,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE_NAME = peerconnection
IS_COMPONENT = 1
EXPORT_LIBRARY = 1
LIBXUL_LIBRARY = 1

View File

@ -48,7 +48,6 @@ MOCHITEST_FILES = \
test_peerConnection_setRemoteAnswerInHaveRemoteOffer.html \
test_peerConnection_addCandidateInHaveLocalOffer.html \
test_peerConnection_bug822674.html \
test_peerConnection_bug825703.html \
test_peerConnection_bug827843.html \
test_peerConnection_bug834153.html \
test_peerConnection_bug835370.html \
@ -58,6 +57,9 @@ MOCHITEST_FILES = \
templates.js \
$(NULL)
# Disabled for hitting services outside of build infra (bug 890832)
# test_peerConnection_bug825703.html
# The following tests are leaking and cannot be run by default yet
ifdef MOZ_WEBRTC_LEAKING_TESTS
MOCHITEST_FILES += \

View File

@ -110,26 +110,26 @@ SmsChild::RecvNotifyDeliveryErrorMessage(const MobileMessageData& aData)
}
PSmsRequestChild*
SmsChild::AllocPSmsRequest(const IPCSmsRequest& aRequest)
SmsChild::AllocPSmsRequestChild(const IPCSmsRequest& aRequest)
{
MOZ_CRASH("Caller is supposed to manually construct a request!");
}
bool
SmsChild::DeallocPSmsRequest(PSmsRequestChild* aActor)
SmsChild::DeallocPSmsRequestChild(PSmsRequestChild* aActor)
{
delete aActor;
return true;
}
PMobileMessageCursorChild*
SmsChild::AllocPMobileMessageCursor(const IPCMobileMessageCursor& aCursor)
SmsChild::AllocPMobileMessageCursorChild(const IPCMobileMessageCursor& aCursor)
{
MOZ_CRASH("Caller is supposed to manually construct a cursor!");
}
bool
SmsChild::DeallocPMobileMessageCursor(PMobileMessageCursorChild* aActor)
SmsChild::DeallocPMobileMessageCursorChild(PMobileMessageCursorChild* aActor)
{
// MobileMessageCursorChild is refcounted, must not be freed manually.
// Originally AddRefed in SendCursorRequest() in SmsIPCService.cpp.

View File

@ -56,16 +56,16 @@ protected:
RecvNotifyDeliveryErrorMessage(const MobileMessageData& aMessage) MOZ_OVERRIDE;
virtual PSmsRequestChild*
AllocPSmsRequest(const IPCSmsRequest& aRequest) MOZ_OVERRIDE;
AllocPSmsRequestChild(const IPCSmsRequest& aRequest) MOZ_OVERRIDE;
virtual bool
DeallocPSmsRequest(PSmsRequestChild* aActor) MOZ_OVERRIDE;
DeallocPSmsRequestChild(PSmsRequestChild* aActor) MOZ_OVERRIDE;
virtual PMobileMessageCursorChild*
AllocPMobileMessageCursor(const IPCMobileMessageCursor& aCursor) MOZ_OVERRIDE;
AllocPMobileMessageCursorChild(const IPCMobileMessageCursor& aCursor) MOZ_OVERRIDE;
virtual bool
DeallocPMobileMessageCursor(PMobileMessageCursorChild* aActor) MOZ_OVERRIDE;
DeallocPMobileMessageCursorChild(PMobileMessageCursorChild* aActor) MOZ_OVERRIDE;
};
class SmsRequestChild : public PSmsRequestChild

View File

@ -345,18 +345,18 @@ SmsParent::RecvPSmsRequestConstructor(PSmsRequestParent* aActor,
}
PSmsRequestParent*
SmsParent::AllocPSmsRequest(const IPCSmsRequest& aRequest)
SmsParent::AllocPSmsRequestParent(const IPCSmsRequest& aRequest)
{
SmsRequestParent* actor = new SmsRequestParent();
// Add an extra ref for IPDL. Will be released in
// SmsParent::DeallocPSmsRequest().
// SmsParent::DeallocPSmsRequestParent().
actor->AddRef();
return actor;
}
bool
SmsParent::DeallocPSmsRequest(PSmsRequestParent* aActor)
SmsParent::DeallocPSmsRequestParent(PSmsRequestParent* aActor)
{
// SmsRequestParent is refcounted, must not be freed manually.
static_cast<SmsRequestParent*>(aActor)->Release();
@ -383,18 +383,18 @@ SmsParent::RecvPMobileMessageCursorConstructor(PMobileMessageCursorParent* aActo
}
PMobileMessageCursorParent*
SmsParent::AllocPMobileMessageCursor(const IPCMobileMessageCursor& aRequest)
SmsParent::AllocPMobileMessageCursorParent(const IPCMobileMessageCursor& aRequest)
{
MobileMessageCursorParent* actor = new MobileMessageCursorParent();
// Add an extra ref for IPDL. Will be released in
// SmsParent::DeallocPMobileMessageCursor().
// SmsParent::DeallocPMobileMessageCursorParent().
actor->AddRef();
return actor;
}
bool
SmsParent::DeallocPMobileMessageCursor(PMobileMessageCursorParent* aActor)
SmsParent::DeallocPMobileMessageCursorParent(PMobileMessageCursorParent* aActor)
{
// MobileMessageCursorParent is refcounted, must not be freed manually.
static_cast<MobileMessageCursorParent*>(aActor)->Release();

View File

@ -51,20 +51,20 @@ protected:
const IPCSmsRequest& aRequest) MOZ_OVERRIDE;
virtual PSmsRequestParent*
AllocPSmsRequest(const IPCSmsRequest& aRequest) MOZ_OVERRIDE;
AllocPSmsRequestParent(const IPCSmsRequest& aRequest) MOZ_OVERRIDE;
virtual bool
DeallocPSmsRequest(PSmsRequestParent* aActor) MOZ_OVERRIDE;
DeallocPSmsRequestParent(PSmsRequestParent* aActor) MOZ_OVERRIDE;
virtual bool
RecvPMobileMessageCursorConstructor(PMobileMessageCursorParent* aActor,
const IPCMobileMessageCursor& aCursor) MOZ_OVERRIDE;
virtual PMobileMessageCursorParent*
AllocPMobileMessageCursor(const IPCMobileMessageCursor& aCursor) MOZ_OVERRIDE;
AllocPMobileMessageCursorParent(const IPCMobileMessageCursor& aCursor) MOZ_OVERRIDE;
virtual bool
DeallocPMobileMessageCursor(PMobileMessageCursorParent* aActor) MOZ_OVERRIDE;
DeallocPMobileMessageCursorParent(PMobileMessageCursorParent* aActor) MOZ_OVERRIDE;
bool
GetMobileMessageDataFromMessage(nsISupports* aMsg, MobileMessageData& aData);

View File

@ -12,7 +12,7 @@ interface nsIDOMMozMobileNetworkInfo;
interface nsIDOMMozMobileCellInfo;
interface nsIDOMMozMobileCFInfo;
[scriptable, builtinclass, uuid(c7fdf0f0-a740-11e2-9e96-0800200c9a66)]
[scriptable, builtinclass, uuid(dc010230-c2bc-11e2-8b8b-0800200c9a66)]
interface nsIDOMMozMobileConnection : nsIDOMEventTarget
{
const long ICC_SERVICE_CLASS_VOICE = (1 << 0);
@ -47,14 +47,6 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget
readonly attribute DOMString lastKnownNetwork;
readonly attribute DOMString lastKnownHomeNetwork;
/**
* Indicates the state of the device's ICC card.
*
* Possible values: null, 'unknown', 'absent', 'pinRequired', 'pukRequired',
* 'networkLocked', 'corporateLocked', 'serviceProviderLocked', 'ready'.
*/
readonly attribute DOMString cardState;
/**
* Indicates the number of retries remaining when cardState equals 'pinRequired'
* or 'pukRequired'. 0 denotes the retry count is unavailable.
@ -240,12 +232,6 @@ interface nsIDOMMozMobileConnection : nsIDOMEventTarget
*/
nsIDOMDOMRequest getCallWaitingOption();
/**
* The 'cardstatechange' event is notified when the 'cardState' attribute
* changes value.
*/
[implicit_jscontext] attribute jsval oncardstatechange;
/**
* The 'iccinfochange' event is notified whenever the icc info object
* changes.

View File

@ -11,12 +11,11 @@ interface nsIDOMMozMobileCFInfo;
interface nsIDOMDOMRequest;
interface nsIDOMWindow;
[scriptable, uuid(d09099b0-a25a-11e2-9e96-0800200c9a66)]
[scriptable, uuid(529864f0-c2be-11e2-8b8b-0800200c9a66)]
interface nsIMobileConnectionListener : nsISupports
{
void notifyVoiceChanged();
void notifyDataChanged();
void notifyCardStateChanged();
void notifyIccInfoChanged();
void notifyUssdReceived(in DOMString message,
in boolean sessionEnded);
@ -33,7 +32,7 @@ interface nsIMobileConnectionListener : nsISupports
* XPCOM component (in the content process) that provides the mobile
* network information.
*/
[scriptable, uuid(b9605230-a25a-11e2-9e96-0800200c9a66)]
[scriptable, uuid(66e7ac90-c2be-11e2-8b8b-0800200c9a66)]
interface nsIMobileConnectionProvider : nsISupports
{
/**
@ -44,7 +43,6 @@ interface nsIMobileConnectionProvider : nsISupports
void registerMobileConnectionMsg(in nsIMobileConnectionListener listener);
void unregisterMobileConnectionMsg(in nsIMobileConnectionListener listener);
readonly attribute DOMString cardState;
readonly attribute long retryCount;
readonly attribute nsIDOMMozMobileICCInfo iccInfo;
readonly attribute nsIDOMMozMobileConnectionInfo voiceConnectionInfo;

View File

@ -67,7 +67,6 @@ NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
NS_IMPL_ADDREF_INHERITED(MobileConnection, nsDOMEventTargetHelper)
NS_IMPL_RELEASE_INHERITED(MobileConnection, nsDOMEventTargetHelper)
NS_IMPL_EVENT_HANDLER(MobileConnection, cardstatechange)
NS_IMPL_EVENT_HANDLER(MobileConnection, iccinfochange)
NS_IMPL_EVENT_HANDLER(MobileConnection, voicechange)
NS_IMPL_EVENT_HANDLER(MobileConnection, datachange)
@ -162,17 +161,6 @@ MobileConnection::CheckPermission(const char* type)
return permission == nsIPermissionManager::ALLOW_ACTION;
}
NS_IMETHODIMP
MobileConnection::GetCardState(nsAString& cardState)
{
cardState.SetIsVoid(true);
if (!mProvider || !CheckPermission("mobileconnection")) {
return NS_OK;
}
return mProvider->GetCardState(cardState);
}
NS_IMETHODIMP
MobileConnection::GetRetryCount(int32_t* retryCount)
{
@ -428,16 +416,6 @@ MobileConnection::NotifyDataChanged()
return DispatchTrustedEvent(NS_LITERAL_STRING("datachange"));
}
NS_IMETHODIMP
MobileConnection::NotifyCardStateChanged()
{
if (!CheckPermission("mobileconnection")) {
return NS_OK;
}
return DispatchTrustedEvent(NS_LITERAL_STRING("cardstatechange"));
}
NS_IMETHODIMP
MobileConnection::NotifyIccInfoChanged()
{

View File

@ -13,8 +13,6 @@ include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = gkplugin
MSVC_ENABLE_PGO := 1
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsPluginModule
LIBXUL_LIBRARY = 1
ifeq ($(MOZ_WIDGET_TOOLKIT),android)

View File

@ -22,13 +22,6 @@ DEFINES += \
$(NULL)
endif
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
DISABLED_CMMSRCS += \
PluginUtilsOSX.mm \
PluginInterposeOSX.mm \
$(NULL)
endif
LOCAL_INCLUDES = \
-I$(srcdir)/../base \
-I$(topsrcdir)/xpcom/base/ \

View File

@ -2233,14 +2233,14 @@ PluginInstanceChild::RecvNPP_DidComposite()
}
PPluginScriptableObjectChild*
PluginInstanceChild::AllocPPluginScriptableObject()
PluginInstanceChild::AllocPPluginScriptableObjectChild()
{
AssertPluginThread();
return new PluginScriptableObjectChild(Proxy);
}
bool
PluginInstanceChild::DeallocPPluginScriptableObject(
PluginInstanceChild::DeallocPPluginScriptableObjectChild(
PPluginScriptableObjectChild* aObject)
{
AssertPluginThread();
@ -2287,15 +2287,15 @@ PluginInstanceChild::AnswerPBrowserStreamConstructor(
}
PBrowserStreamChild*
PluginInstanceChild::AllocPBrowserStream(const nsCString& url,
const uint32_t& length,
const uint32_t& lastmodified,
PStreamNotifyChild* notifyData,
const nsCString& headers,
const nsCString& mimeType,
const bool& seekable,
NPError* rv,
uint16_t *stype)
PluginInstanceChild::AllocPBrowserStreamChild(const nsCString& url,
const uint32_t& length,
const uint32_t& lastmodified,
PStreamNotifyChild* notifyData,
const nsCString& headers,
const nsCString& mimeType,
const bool& seekable,
NPError* rv,
uint16_t *stype)
{
AssertPluginThread();
return new BrowserStreamChild(this, url, length, lastmodified,
@ -2304,7 +2304,7 @@ PluginInstanceChild::AllocPBrowserStream(const nsCString& url,
}
bool
PluginInstanceChild::DeallocPBrowserStream(PBrowserStreamChild* stream)
PluginInstanceChild::DeallocPBrowserStreamChild(PBrowserStreamChild* stream)
{
AssertPluginThread();
delete stream;
@ -2312,16 +2312,16 @@ PluginInstanceChild::DeallocPBrowserStream(PBrowserStreamChild* stream)
}
PPluginStreamChild*
PluginInstanceChild::AllocPPluginStream(const nsCString& mimeType,
const nsCString& target,
NPError* result)
PluginInstanceChild::AllocPPluginStreamChild(const nsCString& mimeType,
const nsCString& target,
NPError* result)
{
NS_RUNTIMEABORT("not callable");
return NULL;
}
bool
PluginInstanceChild::DeallocPPluginStream(PPluginStreamChild* stream)
PluginInstanceChild::DeallocPPluginStreamChild(PPluginStreamChild* stream)
{
AssertPluginThread();
delete stream;
@ -2329,12 +2329,12 @@ PluginInstanceChild::DeallocPPluginStream(PPluginStreamChild* stream)
}
PStreamNotifyChild*
PluginInstanceChild::AllocPStreamNotify(const nsCString& url,
const nsCString& target,
const bool& post,
const nsCString& buffer,
const bool& file,
NPError* result)
PluginInstanceChild::AllocPStreamNotifyChild(const nsCString& url,
const nsCString& target,
const bool& post,
const nsCString& buffer,
const bool& file,
NPError* result)
{
AssertPluginThread();
NS_RUNTIMEABORT("not reached");
@ -2405,7 +2405,7 @@ StreamNotifyChild::NPP_URLNotify(NPReason reason)
}
bool
PluginInstanceChild::DeallocPStreamNotify(PStreamNotifyChild* notifyData)
PluginInstanceChild::DeallocPStreamNotifyChild(PStreamNotifyChild* notifyData)
{
AssertPluginThread();
@ -3843,7 +3843,7 @@ PluginInstanceChild::RecvUpdateBackground(const SurfaceDescriptor& aBackground,
}
PPluginBackgroundDestroyerChild*
PluginInstanceChild::AllocPPluginBackgroundDestroyer()
PluginInstanceChild::AllocPPluginBackgroundDestroyerChild()
{
return new PluginBackgroundDestroyerChild();
}
@ -3876,7 +3876,7 @@ PluginInstanceChild::RecvPPluginBackgroundDestroyerConstructor(
}
bool
PluginInstanceChild::DeallocPPluginBackgroundDestroyer(
PluginInstanceChild::DeallocPPluginBackgroundDestroyerChild(
PPluginBackgroundDestroyerChild* aActor)
{
delete aActor;

View File

@ -105,12 +105,12 @@ protected:
virtual bool
AnswerHandleTextEvent(const nsTextEvent& aEvent, bool* handled);
virtual PPluginSurfaceChild* AllocPPluginSurface(const WindowsSharedMemoryHandle&,
const gfxIntSize&, const bool&) {
virtual PPluginSurfaceChild* AllocPPluginSurfaceChild(const WindowsSharedMemoryHandle&,
const gfxIntSize&, const bool&) {
return new PPluginSurfaceChild();
}
virtual bool DeallocPPluginSurface(PPluginSurfaceChild* s) {
virtual bool DeallocPPluginSurfaceChild(PPluginSurfaceChild* s) {
delete s;
return true;
}
@ -132,24 +132,24 @@ protected:
AnswerNPP_Destroy(NPError* result);
virtual PPluginScriptableObjectChild*
AllocPPluginScriptableObject();
AllocPPluginScriptableObjectChild();
virtual bool
DeallocPPluginScriptableObject(PPluginScriptableObjectChild* aObject);
DeallocPPluginScriptableObjectChild(PPluginScriptableObjectChild* aObject);
virtual bool
RecvPPluginScriptableObjectConstructor(PPluginScriptableObjectChild* aActor) MOZ_OVERRIDE;
virtual PBrowserStreamChild*
AllocPBrowserStream(const nsCString& url,
const uint32_t& length,
const uint32_t& lastmodified,
PStreamNotifyChild* notifyData,
const nsCString& headers,
const nsCString& mimeType,
const bool& seekable,
NPError* rv,
uint16_t *stype);
AllocPBrowserStreamChild(const nsCString& url,
const uint32_t& length,
const uint32_t& lastmodified,
PStreamNotifyChild* notifyData,
const nsCString& headers,
const nsCString& mimeType,
const bool& seekable,
NPError* rv,
uint16_t *stype);
virtual bool
AnswerPBrowserStreamConstructor(
@ -165,24 +165,24 @@ protected:
uint16_t* stype);
virtual bool
DeallocPBrowserStream(PBrowserStreamChild* stream);
DeallocPBrowserStreamChild(PBrowserStreamChild* stream);
virtual PPluginStreamChild*
AllocPPluginStream(const nsCString& mimeType,
const nsCString& target,
NPError* result);
AllocPPluginStreamChild(const nsCString& mimeType,
const nsCString& target,
NPError* result);
virtual bool
DeallocPPluginStream(PPluginStreamChild* stream);
DeallocPPluginStreamChild(PPluginStreamChild* stream);
virtual PStreamNotifyChild*
AllocPStreamNotify(const nsCString& url, const nsCString& target,
const bool& post, const nsCString& buffer,
const bool& file,
NPError* result);
AllocPStreamNotifyChild(const nsCString& url, const nsCString& target,
const bool& post, const nsCString& buffer,
const bool& file,
NPError* result);
virtual bool
DeallocPStreamNotify(PStreamNotifyChild* notifyData) MOZ_OVERRIDE;
DeallocPStreamNotifyChild(PStreamNotifyChild* notifyData) MOZ_OVERRIDE;
virtual bool
AnswerSetPluginFocus();
@ -260,13 +260,13 @@ private:
const nsIntRect& aRect) MOZ_OVERRIDE;
virtual PPluginBackgroundDestroyerChild*
AllocPPluginBackgroundDestroyer() MOZ_OVERRIDE;
AllocPPluginBackgroundDestroyerChild() MOZ_OVERRIDE;
virtual bool
RecvPPluginBackgroundDestroyerConstructor(PPluginBackgroundDestroyerChild* aActor) MOZ_OVERRIDE;
virtual bool
DeallocPPluginBackgroundDestroyer(PPluginBackgroundDestroyerChild* aActor) MOZ_OVERRIDE;
DeallocPPluginBackgroundDestroyerChild(PPluginBackgroundDestroyerChild* aActor) MOZ_OVERRIDE;
#if defined(OS_WIN)
static bool RegisterWindowClass();

View File

@ -158,37 +158,37 @@ PluginInstanceParent::Destroy()
}
PBrowserStreamParent*
PluginInstanceParent::AllocPBrowserStream(const nsCString& url,
const uint32_t& length,
const uint32_t& lastmodified,
PStreamNotifyParent* notifyData,
const nsCString& headers,
const nsCString& mimeType,
const bool& seekable,
NPError* rv,
uint16_t *stype)
PluginInstanceParent::AllocPBrowserStreamParent(const nsCString& url,
const uint32_t& length,
const uint32_t& lastmodified,
PStreamNotifyParent* notifyData,
const nsCString& headers,
const nsCString& mimeType,
const bool& seekable,
NPError* rv,
uint16_t *stype)
{
NS_RUNTIMEABORT("Not reachable");
return NULL;
}
bool
PluginInstanceParent::DeallocPBrowserStream(PBrowserStreamParent* stream)
PluginInstanceParent::DeallocPBrowserStreamParent(PBrowserStreamParent* stream)
{
delete stream;
return true;
}
PPluginStreamParent*
PluginInstanceParent::AllocPPluginStream(const nsCString& mimeType,
const nsCString& target,
NPError* result)
PluginInstanceParent::AllocPPluginStreamParent(const nsCString& mimeType,
const nsCString& target,
NPError* result)
{
return new PluginStreamParent(this, mimeType, target, result);
}
bool
PluginInstanceParent::DeallocPPluginStream(PPluginStreamParent* stream)
PluginInstanceParent::DeallocPPluginStreamParent(PPluginStreamParent* stream)
{
delete stream;
return true;
@ -478,12 +478,12 @@ PluginInstanceParent::AnswerNPN_PostURL(const nsCString& url,
}
PStreamNotifyParent*
PluginInstanceParent::AllocPStreamNotify(const nsCString& url,
const nsCString& target,
const bool& post,
const nsCString& buffer,
const bool& file,
NPError* result)
PluginInstanceParent::AllocPStreamNotifyParent(const nsCString& url,
const nsCString& target,
const bool& post,
const nsCString& buffer,
const bool& file,
NPError* result)
{
return new StreamNotifyParent();
}
@ -532,7 +532,7 @@ PluginInstanceParent::AnswerPStreamNotifyConstructor(PStreamNotifyParent* actor,
}
bool
PluginInstanceParent::DeallocPStreamNotify(PStreamNotifyParent* notifyData)
PluginInstanceParent::DeallocPStreamNotifyParent(PStreamNotifyParent* notifyData)
{
delete notifyData;
return true;
@ -970,14 +970,14 @@ PluginInstanceParent::GetImageContainer()
}
PPluginBackgroundDestroyerParent*
PluginInstanceParent::AllocPPluginBackgroundDestroyer()
PluginInstanceParent::AllocPPluginBackgroundDestroyerParent()
{
NS_RUNTIMEABORT("'Power-user' ctor is used exclusively");
return nullptr;
}
bool
PluginInstanceParent::DeallocPPluginBackgroundDestroyer(
PluginInstanceParent::DeallocPPluginBackgroundDestroyerParent(
PPluginBackgroundDestroyerParent* aActor)
{
delete aActor;
@ -1472,7 +1472,7 @@ PluginInstanceParent::NPP_Print(NPPrint* platformPrint)
}
PPluginScriptableObjectParent*
PluginInstanceParent::AllocPPluginScriptableObject()
PluginInstanceParent::AllocPPluginScriptableObjectParent()
{
return new PluginScriptableObjectParent(Proxy);
}
@ -1503,7 +1503,7 @@ ActorSearch(NPObject* aKey,
#endif // DEBUG
bool
PluginInstanceParent::DeallocPPluginScriptableObject(
PluginInstanceParent::DeallocPPluginScriptableObjectParent(
PPluginScriptableObjectParent* aObject)
{
PluginScriptableObjectParent* actor =
@ -1610,9 +1610,9 @@ PluginInstanceParent::GetActorForNPObject(NPObject* aObject)
}
PPluginSurfaceParent*
PluginInstanceParent::AllocPPluginSurface(const WindowsSharedMemoryHandle& handle,
const gfxIntSize& size,
const bool& transparent)
PluginInstanceParent::AllocPPluginSurfaceParent(const WindowsSharedMemoryHandle& handle,
const gfxIntSize& size,
const bool& transparent)
{
#ifdef XP_WIN
return new PluginSurfaceParent(handle, size, transparent);
@ -1623,7 +1623,7 @@ PluginInstanceParent::AllocPPluginSurface(const WindowsSharedMemoryHandle& handl
}
bool
PluginInstanceParent::DeallocPPluginSurface(PPluginSurfaceParent* s)
PluginInstanceParent::DeallocPPluginSurfaceParent(PPluginSurfaceParent* s)
{
#ifdef XP_WIN
delete s;

View File

@ -61,32 +61,32 @@ public:
virtual void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
virtual PPluginScriptableObjectParent*
AllocPPluginScriptableObject();
AllocPPluginScriptableObjectParent();
virtual bool
RecvPPluginScriptableObjectConstructor(PPluginScriptableObjectParent* aActor) MOZ_OVERRIDE;
virtual bool
DeallocPPluginScriptableObject(PPluginScriptableObjectParent* aObject);
DeallocPPluginScriptableObjectParent(PPluginScriptableObjectParent* aObject);
virtual PBrowserStreamParent*
AllocPBrowserStream(const nsCString& url,
const uint32_t& length,
const uint32_t& lastmodified,
PStreamNotifyParent* notifyData,
const nsCString& headers,
const nsCString& mimeType,
const bool& seekable,
NPError* rv,
uint16_t *stype);
AllocPBrowserStreamParent(const nsCString& url,
const uint32_t& length,
const uint32_t& lastmodified,
PStreamNotifyParent* notifyData,
const nsCString& headers,
const nsCString& mimeType,
const bool& seekable,
NPError* rv,
uint16_t *stype);
virtual bool
DeallocPBrowserStream(PBrowserStreamParent* stream);
DeallocPBrowserStreamParent(PBrowserStreamParent* stream);
virtual PPluginStreamParent*
AllocPPluginStream(const nsCString& mimeType,
const nsCString& target,
NPError* result);
AllocPPluginStreamParent(const nsCString& mimeType,
const nsCString& target,
NPError* result);
virtual bool
DeallocPPluginStream(PPluginStreamParent* stream);
DeallocPPluginStreamParent(PPluginStreamParent* stream);
virtual bool
AnswerNPN_GetValue_NPNVnetscapeWindow(NativeWindowHandle* value,
@ -135,10 +135,10 @@ public:
NPError* result);
virtual PStreamNotifyParent*
AllocPStreamNotify(const nsCString& url, const nsCString& target,
const bool& post, const nsCString& buffer,
const bool& file,
NPError* result);
AllocPStreamNotifyParent(const nsCString& url, const nsCString& target,
const bool& post, const nsCString& buffer,
const bool& file,
NPError* result);
virtual bool
AnswerPStreamNotifyConstructor(PStreamNotifyParent* actor,
@ -149,7 +149,7 @@ public:
NPError* result) MOZ_OVERRIDE;
virtual bool
DeallocPStreamNotify(PStreamNotifyParent* notifyData);
DeallocPStreamNotifyParent(PStreamNotifyParent* notifyData);
virtual bool
RecvNPN_InvalidateRect(const NPRect& rect);
@ -161,12 +161,12 @@ public:
SurfaceDescriptor* prevSurface);
virtual PPluginSurfaceParent*
AllocPPluginSurface(const WindowsSharedMemoryHandle& handle,
const gfxIntSize& size,
const bool& transparent);
AllocPPluginSurfaceParent(const WindowsSharedMemoryHandle& handle,
const gfxIntSize& size,
const bool& transparent);
virtual bool
DeallocPPluginSurface(PPluginSurfaceParent* s);
DeallocPPluginSurfaceParent(PPluginSurfaceParent* s);
virtual bool
AnswerNPN_PushPopupsEnabledState(const bool& aState);
@ -295,10 +295,10 @@ private:
ImageContainer *GetImageContainer();
virtual PPluginBackgroundDestroyerParent*
AllocPPluginBackgroundDestroyer() MOZ_OVERRIDE;
AllocPPluginBackgroundDestroyerParent() MOZ_OVERRIDE;
virtual bool
DeallocPPluginBackgroundDestroyer(PPluginBackgroundDestroyerParent* aActor) MOZ_OVERRIDE;
DeallocPPluginBackgroundDestroyerParent(PPluginBackgroundDestroyerParent* aActor) MOZ_OVERRIDE;
bool InternalGetValueForNPObject(NPNVariable aVariable,
PPluginScriptableObjectParent** aValue,

View File

@ -670,14 +670,14 @@ PluginModuleChild::QuickExit()
}
PCrashReporterChild*
PluginModuleChild::AllocPCrashReporter(mozilla::dom::NativeThreadId* id,
uint32_t* processType)
PluginModuleChild::AllocPCrashReporterChild(mozilla::dom::NativeThreadId* id,
uint32_t* processType)
{
return new CrashReporterChild();
}
bool
PluginModuleChild::DeallocPCrashReporter(PCrashReporterChild* actor)
PluginModuleChild::DeallocPCrashReporterChild(PCrashReporterChild* actor)
{
delete actor;
return true;
@ -1875,9 +1875,9 @@ PluginModuleChild::AnswerNP_Initialize(const uint32_t& aFlags, NPError* _retval)
}
PPluginIdentifierChild*
PluginModuleChild::AllocPPluginIdentifier(const nsCString& aString,
const int32_t& aInt,
const bool& aTemporary)
PluginModuleChild::AllocPPluginIdentifierChild(const nsCString& aString,
const int32_t& aInt,
const bool& aTemporary)
{
// We cannot call SetPermanent within this function because Manager() isn't
// set up yet.
@ -1900,7 +1900,7 @@ PluginModuleChild::RecvPPluginIdentifierConstructor(PPluginIdentifierChild* acto
}
bool
PluginModuleChild::DeallocPPluginIdentifier(PPluginIdentifierChild* aActor)
PluginModuleChild::DeallocPPluginIdentifierChild(PPluginIdentifierChild* aActor)
{
delete aActor;
return true;
@ -1937,11 +1937,11 @@ PMCGetWindowInfoHook(HWND hWnd, PWINDOWINFO pwi)
#endif
PPluginInstanceChild*
PluginModuleChild::AllocPPluginInstance(const nsCString& aMimeType,
const uint16_t& aMode,
const InfallibleTArray<nsCString>& aNames,
const InfallibleTArray<nsCString>& aValues,
NPError* rv)
PluginModuleChild::AllocPPluginInstanceChild(const nsCString& aMimeType,
const uint16_t& aMode,
const InfallibleTArray<nsCString>& aNames,
const InfallibleTArray<nsCString>& aValues,
NPError* rv)
{
PLUGIN_LOG_DEBUG_METHOD;
AssertPluginThread();
@ -2076,7 +2076,7 @@ PluginModuleChild::AnswerPPluginInstanceConstructor(PPluginInstanceChild* aActor
}
bool
PluginModuleChild::DeallocPPluginInstance(PPluginInstanceChild* aActor)
PluginModuleChild::DeallocPPluginInstanceChild(PPluginInstanceChild* aActor)
{
PLUGIN_LOG_DEBUG_METHOD;
AssertPluginThread();

View File

@ -87,9 +87,9 @@ protected:
virtual bool AnswerNP_Initialize(const uint32_t& aFlags, NPError* rv);
virtual PPluginIdentifierChild*
AllocPPluginIdentifier(const nsCString& aString,
const int32_t& aInt,
const bool& aTemporary);
AllocPPluginIdentifierChild(const nsCString& aString,
const int32_t& aInt,
const bool& aTemporary);
virtual bool
RecvPPluginIdentifierConstructor(PPluginIdentifierChild* actor,
@ -98,17 +98,17 @@ protected:
const bool& aTemporary);
virtual bool
DeallocPPluginIdentifier(PPluginIdentifierChild* aActor);
DeallocPPluginIdentifierChild(PPluginIdentifierChild* aActor);
virtual PPluginInstanceChild*
AllocPPluginInstance(const nsCString& aMimeType,
const uint16_t& aMode,
const InfallibleTArray<nsCString>& aNames,
const InfallibleTArray<nsCString>& aValues,
NPError* rv);
AllocPPluginInstanceChild(const nsCString& aMimeType,
const uint16_t& aMode,
const InfallibleTArray<nsCString>& aNames,
const InfallibleTArray<nsCString>& aValues,
NPError* rv);
virtual bool
DeallocPPluginInstance(PPluginInstanceChild* aActor);
DeallocPPluginInstanceChild(PPluginInstanceChild* aActor);
virtual bool
AnswerPPluginInstanceConstructor(PPluginInstanceChild* aActor,
@ -143,10 +143,10 @@ protected:
RecvSetParentHangTimeout(const uint32_t& aSeconds);
virtual PCrashReporterChild*
AllocPCrashReporter(mozilla::dom::NativeThreadId* id,
uint32_t* processType);
AllocPCrashReporterChild(mozilla::dom::NativeThreadId* id,
uint32_t* processType);
virtual bool
DeallocPCrashReporter(PCrashReporterChild* actor);
DeallocPCrashReporterChild(PCrashReporterChild* actor);
virtual bool
AnswerPCrashReporterConstructor(PCrashReporterChild* actor,
mozilla::dom::NativeThreadId* id,

View File

@ -756,9 +756,9 @@ PluginModuleParent::NotifyPluginCrashed()
}
PPluginIdentifierParent*
PluginModuleParent::AllocPPluginIdentifier(const nsCString& aString,
const int32_t& aInt,
const bool& aTemporary)
PluginModuleParent::AllocPPluginIdentifierParent(const nsCString& aString,
const int32_t& aInt,
const bool& aTemporary)
{
if (aTemporary) {
NS_ERROR("Plugins don't create temporary identifiers.");
@ -780,25 +780,25 @@ PluginModuleParent::AllocPPluginIdentifier(const nsCString& aString,
}
bool
PluginModuleParent::DeallocPPluginIdentifier(PPluginIdentifierParent* aActor)
PluginModuleParent::DeallocPPluginIdentifierParent(PPluginIdentifierParent* aActor)
{
delete aActor;
return true;
}
PPluginInstanceParent*
PluginModuleParent::AllocPPluginInstance(const nsCString& aMimeType,
const uint16_t& aMode,
const InfallibleTArray<nsCString>& aNames,
const InfallibleTArray<nsCString>& aValues,
NPError* rv)
PluginModuleParent::AllocPPluginInstanceParent(const nsCString& aMimeType,
const uint16_t& aMode,
const InfallibleTArray<nsCString>& aNames,
const InfallibleTArray<nsCString>& aValues,
NPError* rv)
{
NS_ERROR("Not reachable!");
return NULL;
}
bool
PluginModuleParent::DeallocPPluginInstance(PPluginInstanceParent* aActor)
PluginModuleParent::DeallocPPluginInstanceParent(PPluginInstanceParent* aActor)
{
PLUGIN_LOG_DEBUG_METHOD;
delete aActor;
@ -1536,8 +1536,8 @@ PluginModuleParent::RecvPluginHideWindow(const uint32_t& aWindowId)
}
PCrashReporterParent*
PluginModuleParent::AllocPCrashReporter(mozilla::dom::NativeThreadId* id,
uint32_t* processType)
PluginModuleParent::AllocPCrashReporterParent(mozilla::dom::NativeThreadId* id,
uint32_t* processType)
{
#ifdef MOZ_CRASHREPORTER
return new CrashReporterParent();
@ -1547,7 +1547,7 @@ PluginModuleParent::AllocPCrashReporter(mozilla::dom::NativeThreadId* id,
}
bool
PluginModuleParent::DeallocPCrashReporter(PCrashReporterParent* actor)
PluginModuleParent::DeallocPCrashReporterParent(PCrashReporterParent* actor)
{
delete actor;
return true;

View File

@ -75,22 +75,22 @@ private:
protected:
virtual PPluginIdentifierParent*
AllocPPluginIdentifier(const nsCString& aString,
const int32_t& aInt,
const bool& aTemporary);
AllocPPluginIdentifierParent(const nsCString& aString,
const int32_t& aInt,
const bool& aTemporary);
virtual bool
DeallocPPluginIdentifier(PPluginIdentifierParent* aActor);
DeallocPPluginIdentifierParent(PPluginIdentifierParent* aActor);
PPluginInstanceParent*
AllocPPluginInstance(const nsCString& aMimeType,
const uint16_t& aMode,
const InfallibleTArray<nsCString>& aNames,
const InfallibleTArray<nsCString>& aValues,
NPError* rv);
AllocPPluginInstanceParent(const nsCString& aMimeType,
const uint16_t& aMode,
const InfallibleTArray<nsCString>& aNames,
const InfallibleTArray<nsCString>& aValues,
NPError* rv);
virtual bool
DeallocPPluginInstance(PPluginInstanceParent* aActor);
DeallocPPluginInstanceParent(PPluginInstanceParent* aActor);
public:
// aFilePath is UTF8, not native!
@ -177,10 +177,10 @@ protected:
RecvPluginHideWindow(const uint32_t& aWindowId) MOZ_OVERRIDE;
virtual PCrashReporterParent*
AllocPCrashReporter(mozilla::dom::NativeThreadId* id,
uint32_t* processType) MOZ_OVERRIDE;
AllocPCrashReporterParent(mozilla::dom::NativeThreadId* id,
uint32_t* processType) MOZ_OVERRIDE;
virtual bool
DeallocPCrashReporter(PCrashReporterParent* actor) MOZ_OVERRIDE;
DeallocPCrashReporterParent(PCrashReporterParent* actor) MOZ_OVERRIDE;
virtual bool
RecvSetCursor(const NSCursorInfo& aCursorInfo) MOZ_OVERRIDE;

View File

@ -12,7 +12,6 @@ include $(DEPTH)/config/autoconf.mk
FORCE_SHARED_LIB = 1
DIST_INSTALL = 1
DISABLED_CMMSRCS = $(LIBRARY_NAME).mm plugin_child_quirks.mm
EXTRA_DSO_LDOPTS += \
-framework Carbon \

View File

@ -26,6 +26,18 @@ function runTests() {
SpecialPowers.pushPrefEnv({"set": [["network.cookie.cookieBehavior", 0]]}, runTestsCallback);
}
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
function whenDelayedStartupFinished(aWindow, aCallback) {
Services.obs.addObserver(function observer(aSubject, aTopic) {
if (aWindow == aSubject) {
Services.obs.removeObserver(observer, aTopic);
SimpleTest.executeSoon(aCallback);
}
}, "browser-delayed-startup-finished", false);
}
function runTestsCallback() {
var pluginElement1 = document.getElementById("plugin1");
var pluginElement2 = document.getElementById("plugin2");
@ -58,8 +70,7 @@ function runTestsCallback() {
function testOnWindow(aIsPrivate, aCallback) {
var win = mainWindow.OpenBrowserWindow({private: aIsPrivate});
win.addEventListener("load", function onLoad() {
win.removeEventListener("load", onLoad, false);
whenDelayedStartupFinished(win, function () {
win.addEventListener("DOMContentLoaded", function onInnerLoad() {
if (win.content.location.href == "about:privatebrowsing") {
win.gBrowser.loadURI(contentPage);
@ -70,7 +81,7 @@ function runTestsCallback() {
SimpleTest.executeSoon(function() { aCallback(win); });
}, true);
SimpleTest.executeSoon(function() { win.gBrowser.loadURI(contentPage); });
}, true);
});
}
testOnWindow(true, function(aWin) {

View File

@ -12,7 +12,6 @@ FAIL_ON_WARNINGS := 1
include $(DEPTH)/config/autoconf.mk
FORCE_STATIC_LIB = 1
MODULE_NAME = javascript__protocol
LIBXUL_LIBRARY = 1
LOCAL_INCLUDES += \

View File

@ -85,6 +85,10 @@ const SETTINGS_USB_DHCPSERVER_ENDIP = "tethering.usb.dhcpserver.endip";
const SETTINGS_USB_DNS1 = "tethering.usb.dns1";
const SETTINGS_USB_DNS2 = "tethering.usb.dns2";
// Settings DB path for WIFI tethering.
const SETTINGS_WIFI_DHCPSERVER_STARTIP = "tethering.wifi.dhcpserver.startip";
const SETTINGS_WIFI_DHCPSERVER_ENDIP = "tethering.wifi.dhcpserver.endip";
// Default value for USB tethering.
const DEFAULT_USB_IP = "192.168.0.1";
const DEFAULT_USB_PREFIX = "24";
@ -94,6 +98,9 @@ const DEFAULT_USB_DHCPSERVER_ENDIP = "192.168.0.30";
const DEFAULT_DNS1 = "8.8.8.8";
const DEFAULT_DNS2 = "8.8.4.4";
const DEFAULT_WIFI_DHCPSERVER_STARTIP = "192.168.1.10";
const DEFAULT_WIFI_DHCPSERVER_ENDIP = "192.168.1.30";
const MANUAL_PROXY_CONFIGURATION = 1;
const DEBUG = false;
@ -174,13 +181,19 @@ function NetworkManager() {
settingsLock.get(SETTINGS_USB_DNS2, this);
settingsLock.get(SETTINGS_USB_ENABLED, this);
// Read wifi tethering data from settings DB.
settingsLock.get(SETTINGS_WIFI_DHCPSERVER_STARTIP, this);
settingsLock.get(SETTINGS_WIFI_DHCPSERVER_ENDIP, this);
this._usbTetheringSettingsToRead = [SETTINGS_USB_IP,
SETTINGS_USB_PREFIX,
SETTINGS_USB_DHCPSERVER_STARTIP,
SETTINGS_USB_DHCPSERVER_ENDIP,
SETTINGS_USB_DNS1,
SETTINGS_USB_DNS2,
SETTINGS_USB_ENABLED];
SETTINGS_USB_ENABLED,
SETTINGS_WIFI_DHCPSERVER_STARTIP,
SETTINGS_WIFI_DHCPSERVER_ENDIP];
this.wantConnectionEvent = null;
this.setAndConfigureActive();
@ -664,6 +677,9 @@ NetworkManager.prototype = {
this.tetheringSettings[SETTINGS_USB_DHCPSERVER_ENDIP] = DEFAULT_USB_DHCPSERVER_ENDIP;
this.tetheringSettings[SETTINGS_USB_DNS1] = DEFAULT_DNS1;
this.tetheringSettings[SETTINGS_USB_DNS2] = DEFAULT_DNS2;
this.tetheringSettings[SETTINGS_WIFI_DHCPSERVER_STARTIP] = DEFAULT_WIFI_DHCPSERVER_STARTIP;
this.tetheringSettings[SETTINGS_WIFI_DHCPSERVER_ENDIP] = DEFAULT_WIFI_DHCPSERVER_ENDIP;
},
_requestCount: 0,
@ -678,6 +694,8 @@ NetworkManager.prototype = {
case SETTINGS_USB_DHCPSERVER_ENDIP:
case SETTINGS_USB_DNS1:
case SETTINGS_USB_DNS2:
case SETTINGS_WIFI_DHCPSERVER_STARTIP:
case SETTINGS_WIFI_DHCPSERVER_ENDIP:
if (aResult !== null) {
this.tetheringSettings[aName] = aResult;
}
@ -772,8 +790,10 @@ NetworkManager.prototype = {
getUSBTetheringParameters: function getUSBTetheringParameters(enable, tetheringinterface) {
let interfaceIp;
let prefix;
let dhcpStartIp;
let dhcpEndIp;
let wifiDhcpStartIp;
let wifiDhcpEndIp;
let usbDhcpStartIp;
let usbDhcpEndIp;
let dns1;
let dns2;
let internalInterface = tetheringinterface.internalInterface;
@ -781,14 +801,17 @@ NetworkManager.prototype = {
interfaceIp = this.tetheringSettings[SETTINGS_USB_IP];
prefix = this.tetheringSettings[SETTINGS_USB_PREFIX];
dhcpStartIp = this.tetheringSettings[SETTINGS_USB_DHCPSERVER_STARTIP];
dhcpEndIp = this.tetheringSettings[SETTINGS_USB_DHCPSERVER_ENDIP];
wifiDhcpStartIp = this.tetheringSettings[SETTINGS_WIFI_DHCPSERVER_STARTIP];
wifiDhcpEndIp = this.tetheringSettings[SETTINGS_WIFI_DHCPSERVER_ENDIP];
usbDhcpStartIp = this.tetheringSettings[SETTINGS_USB_DHCPSERVER_STARTIP];
usbDhcpEndIp = this.tetheringSettings[SETTINGS_USB_DHCPSERVER_ENDIP];
dns1 = this.tetheringSettings[SETTINGS_USB_DNS1];
dns2 = this.tetheringSettings[SETTINGS_USB_DNS2];
// Using the default values here until application support these settings.
if (interfaceIp == "" || prefix == "" ||
dhcpStartIp == "" || dhcpEndIp == "") {
wifiDhcpStartIp == "" || wifiDhcpEndIp == "" ||
usbDhcpStartIp == "" || usbDhcpEndIp == "") {
debug("Invalid subnet information.");
return null;
}
@ -797,8 +820,10 @@ NetworkManager.prototype = {
ifname: internalInterface,
ip: interfaceIp,
prefix: prefix,
startIp: dhcpStartIp,
endIp: dhcpEndIp,
wifiStartIp: wifiDhcpStartIp,
wifiEndIp: wifiDhcpEndIp,
usbStartIp: usbDhcpStartIp,
usbEndIp: usbDhcpEndIp,
dns1: dns1,
dns2: dns2,
internalIfname: internalInterface,

View File

@ -1300,7 +1300,7 @@ RILContentHelper.prototype = {
this.rilContext.retryCount = data.retryCount;
if (this.rilContext.cardState != data.cardState) {
this.rilContext.cardState = data.cardState;
this._deliverEvent("_mobileConnectionListeners",
this._deliverEvent("_iccListeners",
"notifyCardStateChanged",
null);
}

View File

@ -979,8 +979,8 @@ RadioInterface.prototype = {
break;
case "cardstatechange":
this.rilContext.cardState = message.cardState;
gMessageManager.sendMobileConnectionMessage("RIL:CardStateChanged",
this.clientId, message);
gMessageManager.sendIccMessage("RIL:CardStateChanged",
this.clientId, message);
break;
case "sms-received":
let ackOk = this.handleSmsReceived(message);

View File

@ -27,6 +27,9 @@ const USB_FUNCTION_ADB = "adb";
const kNetdInterfaceChangedTopic = "netd-interface-change";
const kNetdBandwidthControlTopic = "netd-bandwidth-control";
// Use this command to continue the function chain.
const DUMMY_COMMAND = "tether status";
// Retry 20 times (2 seconds) for usb state transition.
const USB_FUNCTION_RETRY_TIMES = 20;
// Check "sys.usb.state" every 100ms.
@ -69,6 +72,11 @@ function isComplete(code) {
return (type != NETD_COMMAND_PROCEEDING);
}
function isProceeding(code) {
let type = netdResponseType(code);
return (type === NETD_COMMAND_PROCEEDING);
}
function sendBroadcastMessage(code, reason) {
let topic = null;
switch (code) {
@ -268,6 +276,7 @@ let gCommandQueue = [];
let gCurrentCommand = null;
let gCurrentCallback = null;
let gPending = false;
let gReason = [];
/**
* Handle received data from netd.
@ -294,23 +303,33 @@ function onNetdMessage(data) {
reason += String.fromCharCode(octet);
}
if (isBroadcastMessage(code)) {
debug("Receiving broadcast message from netd.");
debug(" ==> Code: " + code + " Reason: " + reason);
sendBroadcastMessage(code, reason);
nextNetdCommand();
return;
}
// Set pending to false before we handle next command.
debug("Receiving '" + gCurrentCommand + "' command response from netd.");
debug(" ==> Code: " + code + " Reason: " + reason);
gReason.push(reason);
// 1xx response code regards as command is proceeding, we need to wait for
// final response code such as 2xx, 4xx and 5xx before sending next command.
if (isBroadcastMessage(code)) {
sendBroadcastMessage(code, reason);
nextNetdCommand();
if (isProceeding(code)) {
return;
}
if (isComplete(code)) {
gPending = false;
}
if (gCurrentCallback) {
gCurrentCallback(isError(code), {code: code, reason: reason});
gCurrentCallback(isError(code), {code: code, reason: gReason.join(" ")});
gReason = [];
}
// Handling pending commands if any.
@ -356,18 +375,45 @@ function setIpForwardingEnabled(params, callback) {
if (params.enable) {
command = "ipfwd enable";
} else {
command = "ipfwd disable";
// Don't disable ip forwarding because others interface still need it.
// Send the dummy command to continue the function chain.
if (params.interfaceList.length > 1) {
command = DUMMY_COMMAND;
} else {
command = "ipfwd disable";
}
}
return doCommand(command, callback);
}
function startTethering(params, callback) {
let command = "tether start " + params.startIp + " " + params.endIp;
let command;
// We don't need to start tethering again.
// Send the dummy command to continue the function chain.
if (params.resultReason.indexOf("started") !== -1) {
command = DUMMY_COMMAND;
} else {
command = "tether start " + params.wifiStartIp + " " + params.wifiEndIp +
" " + params.usbStartIp + " " + params.usbEndIp;
}
return doCommand(command, callback);
}
function tetheringStatus(params, callback) {
let command = "tether status";
return doCommand(command, callback);
}
function stopTethering(params, callback) {
let command = "tether stop";
let command;
// Don't stop tethering because others interface still need it.
// Send the dummy to continue the function chain.
if (params.interfaceList.length > 1) {
command = DUMMY_COMMAND;
} else {
command = "tether stop";
}
return doCommand(command, callback);
}
@ -376,6 +422,19 @@ function tetherInterface(params, callback) {
return doCommand(command, callback);
}
function preTetherInterfaceList(params, callback) {
let command = "tether interface list 0";
return doCommand(command, callback);
}
function postTetherInterfaceList(params, callback) {
params.interfaceList = params.resultReason.split(" ");
// Send the dummy command to continue the function chain.
let command = DUMMY_COMMAND;
return doCommand(command, callback);
}
function untetherInterface(params, callback) {
let command = "tether interface remove " + params.ifname;
return doCommand(command, callback);
@ -393,8 +452,16 @@ function enableNat(params, callback) {
}
function disableNat(params, callback) {
let command = "nat disable " + params.internalIfname + " " +
params.externalIfname + " " + "0";
let command;
// Don't disable nat because others interface still need it.
// Send the dummy command to continue the function chain.
if (params.interfaceList.length > 1) {
command = DUMMY_COMMAND;
} else {
command = "nat disable " + params.internalIfname + " " +
params.externalIfname + " " + "0";
}
return doCommand(command, callback);
}
@ -594,6 +661,7 @@ let gWifiEnableChain = [wifiFirmwareReload,
setInterfaceUp,
tetherInterface,
setIpForwardingEnabled,
tetheringStatus,
startTethering,
setDnsForwarders,
enableNat,
@ -602,8 +670,10 @@ let gWifiEnableChain = [wifiFirmwareReload,
let gWifiDisableChain = [stopSoftAP,
stopAccessPointDriver,
wifiFirmwareReload,
disableNat,
untetherInterface,
preTetherInterfaceList,
postTetherInterfaceList,
disableNat,
setIpForwardingEnabled,
stopTethering,
wifiTetheringSuccess];
@ -651,14 +721,17 @@ let gUSBEnableChain = [setInterfaceUp,
enableNat,
setIpForwardingEnabled,
tetherInterface,
tetheringStatus,
startTethering,
setDnsForwarders,
usbTetheringSuccess];
let gUSBDisableChain = [disableNat,
let gUSBDisableChain = [untetherInterface,
preTetherInterfaceList,
postTetherInterfaceList,
disableNat,
setIpForwardingEnabled,
stopTethering,
untetherInterface,
usbTetheringSuccess];
/**

View File

@ -5,7 +5,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsCOMPtr.h"
#include "NSThreadUtils.h"
#include "nsGeoPosition.h"
#include "nsIConsoleService.h"
#include "nsServiceManagerUtils.h"

View File

@ -139,7 +139,8 @@ nsSystemTimeChangeObserver::RemoveWindowListenerImpl(nsPIDOMWindow* aWindow)
}
}
mWindowListeners.RemoveElement(NS_GetWeakReference(aWindow));
nsWeakPtr windowWeakRef = do_GetWeakReference(aWindow);
mWindowListeners.RemoveElement(windowWeakRef);
if (mWindowListeners.IsEmpty()) {
UnregisterSystemClockChangeObserver(sObserver);

View File

@ -2,6 +2,12 @@
/* 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/.
*
* The origin of this IDL file is
* https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBObjectStoreParameters
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
dictionary IDBObjectStoreParameters {

View File

@ -2,6 +2,12 @@
/* 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/.
*
* The origin of this IDL file is
* https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBFactory
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
interface IDBOpenDBRequest;

View File

@ -26,6 +26,7 @@ function exposeCurrentNetwork(currentNetwork) {
exposeCurrentNetwork.currentNetworkApi = {
ssid: "r",
security: "r",
capabilities: "r",
known: "r"
};

View File

@ -39,6 +39,10 @@ const SETTINGS_WIFI_DHCPSERVER_ENDIP = "tethering.wifi.dhcpserver.endip";
const SETTINGS_WIFI_DNS1 = "tethering.wifi.dns1";
const SETTINGS_WIFI_DNS2 = "tethering.wifi.dns2";
// Settings DB path for USB tethering.
const SETTINGS_USB_DHCPSERVER_STARTIP = "tethering.usb.dhcpserver.startip";
const SETTINGS_USB_DHCPSERVER_ENDIP = "tethering.usb.dhcpserver.endip";
// Default value for WIFI tethering.
const DEFAULT_WIFI_IP = "192.168.1.1";
const DEFAULT_WIFI_PREFIX = "24";
@ -50,6 +54,10 @@ const DEFAULT_WIFI_SECURITY_PASSWORD = "1234567890";
const DEFAULT_DNS1 = "8.8.8.8";
const DEFAULT_DNS2 = "8.8.4.4";
// Default value for USB tethering.
const DEFAULT_USB_DHCPSERVER_STARTIP = "192.168.0.10";
const DEFAULT_USB_DHCPSERVER_ENDIP = "192.168.0.30";
const WIFI_FIRMWARE_AP = "AP";
const WIFI_FIRMWARE_STATION = "STA";
const WIFI_SECURITY_TYPE_NONE = "open";
@ -380,8 +388,10 @@ var WifiManager = (function() {
doBooleanCommand("WPS_PBC", "OK", callback);
}
function wpsPinCommand(pin, callback) {
doStringCommand("WPS_PIN any" + (pin === undefined ? "" : (" " + pin)),
function wpsPinCommand(detail, callback) {
doStringCommand("WPS_PIN " +
(detail.bssid === undefined ? "any" : detail.bssid) +
(detail.pin === undefined ? "" : (" " + detail.pin)),
callback);
}
@ -1566,29 +1576,29 @@ function getNetworkKey(network)
var ssid = "",
encryption = "OPEN";
if ("capabilities" in network) {
if ("security" in network) {
// manager network object, represents an AP
// object structure
// {
// .ssid : SSID of AP
// .capabilities[] : "WPA-PSK" for WPA-PSK
// .security[] : "WPA-PSK" for WPA-PSK
// "WPA-EAP" for WPA-EAP
// "WEP" for WEP
// "" for OPEN
// other keys
// }
var capabilities = network.capabilities;
var security = network.security;
ssid = network.ssid;
for (let j = 0; j < capabilities.length; j++) {
if (capabilities[j] === "WPA-PSK") {
for (let j = 0; j < security.length; j++) {
if (security[j] === "WPA-PSK") {
encryption = "WPA-PSK";
break;
} else if (capabilities[j] === "WPA-EAP") {
} else if (security[j] === "WPA-EAP") {
encryption = "WPA-EAP";
break;
} else if (capabilities[j] === "WEP") {
} else if (security[j] === "WEP") {
encryption = "WEP";
break;
}
@ -1640,6 +1650,16 @@ function getKeyManagement(flags) {
return types;
}
function getCapabilities(flags) {
var types = [];
if (!flags)
return types;
if (/\[WPS/.test(flags))
types.push("WPS");
return types;
}
// These constants shamelessly ripped from WifiManager.java
// strength is the value returned by scan_results. It is nominally in dB. We
// transform it into a percentage for clients looking to simply show a
@ -1662,12 +1682,14 @@ function calculateSignal(strength) {
return Math.floor(((strength - MIN_RSSI) / (MAX_RSSI - MIN_RSSI)) * 100);
}
function Network(ssid, capabilities, password) {
function Network(ssid, security, password, capabilities) {
this.ssid = ssid;
this.capabilities = capabilities;
this.security = security;
if (typeof password !== "undefined")
this.password = password;
if (capabilities !== undefined)
this.capabilities = capabilities;
// TODO connected here as well?
this.__exposedProps__ = Network.api;
@ -1675,6 +1697,7 @@ function Network(ssid, capabilities, password) {
Network.api = {
ssid: "r",
security: "r",
capabilities: "r",
known: "r",
@ -1692,7 +1715,8 @@ Network.api = {
// Note: We never use ScanResult.prototype, so the fact that it's unrelated to
// Network.prototype is OK.
function ScanResult(ssid, bssid, flags, signal) {
Network.call(this, ssid, getKeyManagement(flags));
Network.call(this, ssid, getKeyManagement(flags), undefined,
getCapabilities(flags));
this.bssid = bssid;
this.signalStrength = signal;
this.relSignalStrength = calculateSignal(Number(signal));
@ -1868,11 +1892,9 @@ function WifiWorker() {
// self.configuredNetworks and prepares it for the DOM.
netToDOM = function(net) {
var ssid = dequote(net.ssid);
var capabilities = (net.key_mgmt === "NONE" && net.wep_key0)
? ["WEP"]
: (net.key_mgmt && net.key_mgmt !== "NONE")
? [net.key_mgmt]
: [];
var security = (net.key_mgmt === "NONE" && net.wep_key0) ? ["WEP"] :
(net.key_mgmt && net.key_mgmt !== "NONE") ? [net.key_mgmt] :
[];
var password;
if (("psk" in net && net.psk) ||
("password" in net && net.password) ||
@ -1880,7 +1902,7 @@ function WifiWorker() {
password = "*";
}
var pub = new Network(ssid, capabilities, password);
var pub = new Network(ssid, security, password);
if (net.identity)
pub.identity = dequote(net.identity);
if (net.netId)
@ -1901,6 +1923,7 @@ function WifiWorker() {
delete net.bssid;
delete net.signalStrength;
delete net.relSignalStrength;
delete net.security;
delete net.capabilities;
if (!configured)
@ -2252,17 +2275,17 @@ function WifiWorker() {
network.password = "*";
}
} else if (!self._allowWpaEap &&
(eapIndex = network.capabilities.indexOf("WPA-EAP")) >= 0) {
(eapIndex = network.security.indexOf("WPA-EAP")) >= 0) {
// Don't offer to connect to WPA-EAP networks unless one has been
// configured through other means (e.g. it was added directly to
// wpa_supplicant.conf). Here, we have an unknown WPA-EAP network,
// so we ignore it entirely if it only supports WPA-EAP, otherwise
// we take EAP out of the list and offer the rest of the
// capabilities.
if (network.capabilities.length === 1)
// security.
if (network.security.length === 1)
continue;
network.capabilities.splice(eapIndex, 1);
network.security.splice(eapIndex, 1);
}
self.networksArray.push(network);
@ -2333,6 +2356,9 @@ function WifiWorker() {
lock.get(SETTINGS_WIFI_DNS2, this);
lock.get(SETTINGS_WIFI_TETHERING_ENABLED, this);
lock.get(SETTINGS_USB_DHCPSERVER_STARTIP, this);
lock.get(SETTINGS_USB_DHCPSERVER_ENDIP, this);
this._wifiTetheringSettingsToRead = [SETTINGS_WIFI_SSID,
SETTINGS_WIFI_SECURITY_TYPE,
SETTINGS_WIFI_SECURITY_PASSWORD,
@ -2342,8 +2368,9 @@ function WifiWorker() {
SETTINGS_WIFI_DHCPSERVER_ENDIP,
SETTINGS_WIFI_DNS1,
SETTINGS_WIFI_DNS2,
SETTINGS_WIFI_TETHERING_ENABLED];
SETTINGS_WIFI_TETHERING_ENABLED,
SETTINGS_USB_DHCPSERVER_STARTIP,
SETTINGS_USB_DHCPSERVER_ENDIP];
}
function translateState(state) {
@ -2401,6 +2428,9 @@ WifiWorker.prototype = {
this.tetheringSettings[SETTINGS_WIFI_DHCPSERVER_ENDIP] = DEFAULT_WIFI_DHCPSERVER_ENDIP;
this.tetheringSettings[SETTINGS_WIFI_DNS1] = DEFAULT_DNS1;
this.tetheringSettings[SETTINGS_WIFI_DNS2] = DEFAULT_DNS2;
this.tetheringSettings[SETTINGS_USB_DHCPSERVER_STARTIP] = DEFAULT_USB_DHCPSERVER_STARTIP;
this.tetheringSettings[SETTINGS_USB_DHCPSERVER_ENDIP] = DEFAULT_USB_DHCPSERVER_ENDIP;
},
// Internal methods.
@ -2736,15 +2766,15 @@ WifiWorker.prototype = {
if (id === "__exposedProps__") {
continue;
}
if (id === "capabilities") {
if (id === "security") {
result[id] = 0;
var capabilities = element[id];
for (let j = 0; j < capabilities.length; j++) {
if (capabilities[j] === "WPA-PSK") {
var security = element[id];
for (let j = 0; j < security.length; j++) {
if (security[j] === "WPA-PSK") {
result[id] |= Ci.nsIWifiScanResult.WPA_PSK;
} else if (capabilities[j] === "WPA-EAP") {
} else if (security[j] === "WPA-EAP") {
result[id] |= Ci.nsIWifiScanResult.WPA_EAP;
} else if (capabilities[j] === "WEP") {
} else if (security[j] === "WEP") {
result[id] |= Ci.nsIWifiScanResult.WEP;
} else {
result[id] = 0;
@ -2870,8 +2900,10 @@ WifiWorker.prototype = {
let securityId;
let interfaceIp;
let prefix;
let dhcpStartIp;
let dhcpEndIp;
let wifiDhcpStartIp;
let wifiDhcpEndIp;
let usbDhcpStartIp;
let usbDhcpEndIp;
let dns1;
let dns2;
@ -2880,8 +2912,10 @@ WifiWorker.prototype = {
securityId = this.tetheringSettings[SETTINGS_WIFI_SECURITY_PASSWORD];
interfaceIp = this.tetheringSettings[SETTINGS_WIFI_IP];
prefix = this.tetheringSettings[SETTINGS_WIFI_PREFIX];
dhcpStartIp = this.tetheringSettings[SETTINGS_WIFI_DHCPSERVER_STARTIP];
dhcpEndIp = this.tetheringSettings[SETTINGS_WIFI_DHCPSERVER_ENDIP];
wifiDhcpStartIp = this.tetheringSettings[SETTINGS_WIFI_DHCPSERVER_STARTIP];
wifiDhcpEndIp = this.tetheringSettings[SETTINGS_WIFI_DHCPSERVER_ENDIP];
usbDhcpStartIp = this.tetheringSettings[SETTINGS_USB_DHCPSERVER_STARTIP];
usbDhcpEndIp = this.tetheringSettings[SETTINGS_USB_DHCPSERVER_ENDIP];
dns1 = this.tetheringSettings[SETTINGS_WIFI_DNS1];
dns2 = this.tetheringSettings[SETTINGS_WIFI_DNS2];
@ -2903,7 +2937,8 @@ WifiWorker.prototype = {
}
// Using the default values here until application supports these settings.
if (interfaceIp == "" || prefix == "" ||
dhcpStartIp == "" || dhcpEndIp == "") {
wifiDhcpStartIp == "" || wifiDhcpEndIp == "" ||
usbDhcpStartIp == "" || usbDhcpEndIp == "") {
debug("Invalid subnet information.");
return null;
}
@ -2914,8 +2949,10 @@ WifiWorker.prototype = {
key: securityId,
ip: interfaceIp,
prefix: prefix,
startIp: dhcpStartIp,
endIp: dhcpEndIp,
wifiStartIp: wifiDhcpStartIp,
wifiEndIp: wifiDhcpEndIp,
usbStartIp: usbDhcpStartIp,
usbEndIp: usbDhcpEndIp,
dns1: dns1,
dns2: dns2,
enable: enable,
@ -3068,7 +3105,7 @@ WifiWorker.prototype = {
self._sendMessage(message, false, "WPS PBC failed", msg);
});
} else if (detail.method === "pin") {
WifiManager.wpsPin(detail.pin, function(pin) {
WifiManager.wpsPin(detail, function(pin) {
if (pin)
self._sendMessage(message, true, pin, msg);
else
@ -3262,6 +3299,8 @@ WifiWorker.prototype = {
case SETTINGS_WIFI_DHCPSERVER_ENDIP:
case SETTINGS_WIFI_DNS1:
case SETTINGS_WIFI_DNS2:
case SETTINGS_USB_DHCPSERVER_STARTIP:
case SETTINGS_USB_DHCPSERVER_ENDIP:
if (aResult !== null) {
this.tetheringSettings[aName] = aResult;
}

View File

@ -113,6 +113,8 @@ interface nsIDOMWifiManager : nsISupports
* - cancel: Request to cancel WPS in progress.
* If method field is 'pin', 'pin' field can exist and has
* a PIN number.
* If method field is 'pin', 'bssid' field can exist and has
* a opposite BSSID.
* onsuccess: We have successfully started/canceled wps.
* onerror: We have failed to start/cancel wps.
*/

View File

@ -337,7 +337,7 @@ private:
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Finalize \
};
DECL_EVENT_CLASS(Event::sClass, "Event")
DECL_EVENT_CLASS(Event::sClass, "WorkerEvent")
DECL_EVENT_CLASS(Event::sMainRuntimeClass, "WorkerEvent")
#undef DECL_EVENT_CLASS
@ -583,7 +583,7 @@ private:
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Finalize \
};
DECL_MESSAGEEVENT_CLASS(MessageEvent::sClass, "MessageEvent")
DECL_MESSAGEEVENT_CLASS(MessageEvent::sClass, "WorkerMessageEvent")
DECL_MESSAGEEVENT_CLASS(MessageEvent::sMainRuntimeClass, "WorkerMessageEvent")
#undef DECL_MESSAGEEVENT_CLASS
@ -770,7 +770,7 @@ private:
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Finalize \
};
DECL_ERROREVENT_CLASS(ErrorEvent::sClass, "ErrorEvent")
DECL_ERROREVENT_CLASS(ErrorEvent::sClass, "WorkerErrorEvent")
DECL_ERROREVENT_CLASS(ErrorEvent::sMainRuntimeClass, "WorkerErrorEvent")
#undef DECL_ERROREVENT_CLASS
@ -916,7 +916,7 @@ private:
};
JSClass ProgressEvent::sClass = {
"ProgressEvent",
"WorkerProgressEvent",
JSCLASS_HAS_PRIVATE | JSCLASS_HAS_RESERVED_SLOTS(SLOT_COUNT),
JS_PropertyStub, JS_DeletePropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, Finalize

View File

@ -299,9 +299,6 @@ LoadJSContextOptions(const char* aPrefName, void* /* aClosure */)
// Content options.
uint32_t contentOptions = commonOptions;
if (GetWorkerPref<bool>(NS_LITERAL_CSTRING("pccounts.content"))) {
contentOptions |= JSOPTION_PCCOUNT;
}
if (GetWorkerPref<bool>(NS_LITERAL_CSTRING("baselinejit.content"))) {
contentOptions |= JSOPTION_BASELINE;
}
@ -311,9 +308,6 @@ LoadJSContextOptions(const char* aPrefName, void* /* aClosure */)
// Chrome options.
uint32_t chromeOptions = commonOptions;
if (GetWorkerPref<bool>(NS_LITERAL_CSTRING("pccounts.chrome"))) {
chromeOptions |= JSOPTION_PCCOUNT;
}
if (GetWorkerPref<bool>(NS_LITERAL_CSTRING("baselinejit.chrome"))) {
chromeOptions |= JSOPTION_BASELINE;
}

View File

@ -39,7 +39,8 @@ function runTest() {
var str = event.type + "(" + readyState + ", '" + responseText + "', " +
status + ", '" + statusText + "'";
if (event instanceof ProgressEvent) {
if ((("ProgressEvent" in this) && event instanceof ProgressEvent) ||
(("WorkerProgressEvent" in this) && event instanceof WorkerProgressEvent)) {
str += ", progressEvent";
}
str += ")";

View File

@ -11,8 +11,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsComposerModule
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1

View File

@ -12,8 +12,6 @@ FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsTransactionManagerModule
LIBXUL_LIBRARY = 1

View File

@ -12,7 +12,6 @@ FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk
FORCE_STATIC_LIB = 1
MODULE_NAME = nsTextServicesModule
LIBXUL_LIBRARY = 1

View File

@ -10,8 +10,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
IS_COMPONENT = 1
MODULE_NAME = Browser_Embedding_Module
EXPORT_LIBRARY = 1
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1

View File

@ -10,8 +10,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = embedcomponents
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1

View File

@ -15,7 +15,6 @@ LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1
DISABLED_CMMSRCS = nsPrintingPromptServiceX.mm
LOCAL_INCLUDES = \
$(NULL)

View File

@ -10,9 +10,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
IS_COMPONENT = 1
EXPORT_LIBRARY = 1
MODULE_NAME = nsAuthModule
LIBXUL_LIBRARY = 1

View File

@ -13,8 +13,6 @@ include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = cookie
MSVC_ENABLE_PGO := 1
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsCookieModule
LIBXUL_LIBRARY = 1

View File

@ -10,9 +10,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
IS_COMPONENT = 1
EXPORT_LIBRARY = 1
MODULE_NAME = nsGIOModule
LIBXUL_LIBRARY = 1
FAIL_ON_WARNINGS = 1

View File

@ -10,8 +10,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsPermissionsModule
LIBXUL_LIBRARY = 1

View File

@ -11,8 +11,6 @@ include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = autoconfig
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsAutoConfigModule
LIBXUL_LIBRARY = 1

View File

@ -9,9 +9,7 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE_NAME = mozSpellCheckerModule
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
LIBXUL_LIBRARY = 1

View File

@ -11,8 +11,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsUniversalCharDetModule
LIBXUL_LIBRARY = 1
LOCAL_INCLUDES = -I$(srcdir)/../base

Some files were not shown because too many files have changed in this diff Show More