зеркало из https://github.com/mozilla/gecko-dev.git
Merge the last PGO-green inbound changeset to m-c.
This commit is contained in:
Коммит
233a8f74c2
|
@ -1542,6 +1542,10 @@ class Makefile(object):
|
|||
if len(np.rules):
|
||||
self.context = process.getcontext(1)
|
||||
|
||||
flavor, source, value = self.variables.get('.DEFAULT_GOAL')
|
||||
if value is not None:
|
||||
self.defaulttarget = value.resolvestr(self, self.variables, ['.DEFAULT_GOAL']).strip()
|
||||
|
||||
self.error = False
|
||||
|
||||
def include(self, path, required=True, weak=False, loc=None):
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
not-default:
|
||||
@echo TEST-FAIL
|
||||
|
||||
default:
|
||||
@echo TEST-PASS
|
||||
|
||||
.DEFAULT_GOAL := default
|
|
@ -32,7 +32,7 @@ ifdef SDK_HEADERS
|
|||
EXPORTS += $(SDK_HEADERS)
|
||||
endif
|
||||
|
||||
REPORT_BUILD = @echo $(notdir $<)
|
||||
REPORT_BUILD = $(info $(notdir $<))
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
EXEC =
|
||||
|
@ -45,12 +45,18 @@ ifdef SYSTEM_LIBXUL
|
|||
SKIP_COPY_XULRUNNER=1
|
||||
endif
|
||||
|
||||
# ELOG prints out failed command when building silently (gmake -s).
|
||||
# ELOG prints out failed command when building silently (gmake -s). Pymake
|
||||
# prints out failed commands anyway, so ELOG just makes things worse by
|
||||
# forcing shell invocations.
|
||||
ifndef .PYMAKE
|
||||
ifneq (,$(findstring s, $(filter-out --%, $(MAKEFLAGS))))
|
||||
ELOG := $(EXEC) sh $(BUILD_TOOLS)/print-failed-commands.sh
|
||||
else
|
||||
ELOG :=
|
||||
endif
|
||||
endif # -s
|
||||
else
|
||||
ELOG :=
|
||||
endif # ifndef .PYMAKE
|
||||
|
||||
_VPATH_SRCS = $(abspath $<)
|
||||
|
||||
|
|
|
@ -7,13 +7,15 @@
|
|||
#ifndef mozilla_dom_Element_h__
|
||||
#define mozilla_dom_Element_h__
|
||||
|
||||
#include "mozilla/dom/FragmentOrElement.h"
|
||||
#include "nsEventStates.h"
|
||||
#include "mozilla/dom/FragmentOrElement.h" // for base class
|
||||
#include "nsChangeHint.h" // for enum
|
||||
#include "nsEventStates.h" // for member
|
||||
|
||||
class nsEventStateManager;
|
||||
class nsGlobalWindow;
|
||||
class nsFocusManager;
|
||||
class nsGlobalWindow;
|
||||
class nsICSSDeclaration;
|
||||
class nsISMILAttr;
|
||||
|
||||
// Element-specific flags
|
||||
enum {
|
||||
|
|
|
@ -12,50 +12,29 @@
|
|||
#ifndef FragmentOrElement_h___
|
||||
#define FragmentOrElement_h___
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMDocumentFragment.h"
|
||||
#include "nsILinkHandler.h"
|
||||
#include "nsNodeUtils.h"
|
||||
#include "nsAttrAndChildArray.h"
|
||||
#include "mozFlushType.h"
|
||||
#include "nsDOMAttributeMap.h"
|
||||
#include "nsIWeakReference.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMNodeSelector.h"
|
||||
#include "nsIDOMXPathNSResolver.h"
|
||||
#include "nsPresContext.h"
|
||||
#include "nsIDOMDOMStringMap.h"
|
||||
#include "nsContentList.h"
|
||||
#include "nsDOMClassInfoID.h" // DOMCI_DATA
|
||||
#include "nsIDOMTouchEvent.h"
|
||||
#include "nsIInlineEventHandlers.h"
|
||||
#include "mozilla/CORSMode.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsAttrAndChildArray.h" // member
|
||||
#include "nsCOMPtr.h" // member
|
||||
#include "nsCycleCollectionParticipant.h" // NS_DECL_CYCLE_*
|
||||
#include "nsIContent.h" // base class
|
||||
#include "nsIDOMNodeSelector.h" // base class
|
||||
#include "nsIDOMTouchEvent.h" // base class (nsITouchEventReceiver)
|
||||
#include "nsIDOMXPathNSResolver.h" // base class
|
||||
#include "nsIInlineEventHandlers.h" // base class
|
||||
#include "nsINodeList.h" // base class
|
||||
#include "nsIWeakReference.h" // base class
|
||||
#include "nsNodeUtils.h" // class member nsNodeUtils::CloneNodeImpl
|
||||
|
||||
#include "nsISMILAttr.h"
|
||||
|
||||
class nsIDOMAttr;
|
||||
class nsIDOMEventListener;
|
||||
class nsIFrame;
|
||||
class nsIDOMNamedNodeMap;
|
||||
class nsICSSDeclaration;
|
||||
class nsIDOMCSSStyleDeclaration;
|
||||
class nsIURI;
|
||||
class nsINodeInfo;
|
||||
class nsIControllers;
|
||||
class nsEventListenerManager;
|
||||
class nsIScrollableFrame;
|
||||
class nsAttrValueOrString;
|
||||
class nsContentList;
|
||||
class nsDOMTokenList;
|
||||
class ContentUnbinder;
|
||||
struct nsRect;
|
||||
|
||||
typedef PRUptrdiff PtrBits;
|
||||
class nsContentList;
|
||||
class nsDOMAttributeMap;
|
||||
class nsDOMTokenList;
|
||||
class nsIControllers;
|
||||
class nsICSSDeclaration;
|
||||
class nsIDocument;
|
||||
class nsIDOMDOMStringMap;
|
||||
class nsIDOMNamedNodeMap;
|
||||
class nsINodeInfo;
|
||||
class nsIURI;
|
||||
|
||||
/**
|
||||
* Class that implements the nsIDOMNodeList interface (a list of children of
|
||||
|
|
|
@ -5,33 +5,22 @@
|
|||
#ifndef nsIContent_h___
|
||||
#define nsIContent_h___
|
||||
|
||||
#include "nsCOMPtr.h" // for already_AddRefed
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsCaseTreatment.h"
|
||||
#include "nsChangeHint.h"
|
||||
#include "nsINode.h"
|
||||
#include "nsIDocument.h" // for IsInHTMLDocument
|
||||
#include "nsCSSProperty.h"
|
||||
#include "nsCaseTreatment.h" // for enum, cannot be forward-declared
|
||||
#include "nsCOMPtr.h" // for already_AddRefed in constructor
|
||||
#include "nsIDocument.h" // for use in inline function (IsInHTMLDocument)
|
||||
#include "nsINode.h" // for base class
|
||||
|
||||
// Forward declarations
|
||||
class nsAString;
|
||||
class nsIAtom;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
class nsEventListenerManager;
|
||||
class nsIURI;
|
||||
class nsRuleWalker;
|
||||
class nsAttrValue;
|
||||
class nsAttrName;
|
||||
class nsTextFragment;
|
||||
class nsIDocShell;
|
||||
class nsIFrame;
|
||||
class nsISMILAttr;
|
||||
class nsIDOMCSSStyleDeclaration;
|
||||
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
class StyleRule;
|
||||
} // namespace css
|
||||
namespace widget {
|
||||
struct IMEState;
|
||||
} // namespace widget
|
||||
|
|
|
@ -5,80 +5,65 @@
|
|||
#ifndef nsIDocument_h___
|
||||
#define nsIDocument_h___
|
||||
|
||||
#include "nsINode.h"
|
||||
#include "nsStringGlue.h"
|
||||
#include "nsIDocumentObserver.h" // for nsUpdateType
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsCRT.h"
|
||||
#include "mozFlushType.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsCompatibility.h"
|
||||
#include "nsTObserverArray.h"
|
||||
#include "nsTHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsIVariant.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsSMILAnimationController.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIDocumentEncoder.h"
|
||||
#include "nsIFrameRequestCallback.h"
|
||||
#include "nsEventStates.h"
|
||||
#include "nsIStructuredCloneContainer.h"
|
||||
#include "nsILoadContext.h"
|
||||
#include "mozFlushType.h" // for enum
|
||||
#include "nsAutoPtr.h" // for member
|
||||
#include "nsCOMArray.h" // for member
|
||||
#include "nsCRT.h" // for NS_DECL_AND_IMPL_ZEROING_OPERATOR_NEW
|
||||
#include "nsCompatibility.h" // for member
|
||||
#include "nsCOMPtr.h" // for member
|
||||
#include "nsGkAtoms.h" // for static class members
|
||||
#include "nsIDocumentEncoder.h" // for member (in nsCOMPtr)
|
||||
#include "nsIDocumentObserver.h" // for typedef (nsUpdateType)
|
||||
#include "nsIFrameRequestCallback.h" // for member (in nsCOMPtr)
|
||||
#include "nsILoadContext.h" // for member (in nsCOMPtr)
|
||||
#include "nsILoadGroup.h" // for member (in nsCOMPtr)
|
||||
#include "nsINode.h" // for base class
|
||||
#include "nsIScriptGlobalObject.h" // for member (in nsCOMPtr)
|
||||
#include "nsIStructuredCloneContainer.h" // for member (in nsCOMPtr)
|
||||
#include "nsPIDOMWindow.h" // for use in inline functions
|
||||
#include "nsPropertyTable.h" // for member
|
||||
#include "nsTHashtable.h" // for member
|
||||
|
||||
class nsIRequest;
|
||||
class nsPIDOMWindow;
|
||||
class nsIStreamListener;
|
||||
class nsIBFCacheEntry;
|
||||
class nsIContent;
|
||||
class nsPresContext;
|
||||
class nsIPresShell;
|
||||
class nsIDocShell;
|
||||
class nsStyleSet;
|
||||
class nsIStyleSheet;
|
||||
class nsIStyleRule;
|
||||
class nsCSSStyleSheet;
|
||||
class nsIViewManager;
|
||||
class nsIDOMEvent;
|
||||
class nsIDOMEventTarget;
|
||||
class nsDeviceContext;
|
||||
class nsIParser;
|
||||
class nsIDOMNode;
|
||||
class nsIDOMElement;
|
||||
class nsIDOMDocumentFragment;
|
||||
class nsILineBreaker;
|
||||
class nsIWordBreaker;
|
||||
class nsISelection;
|
||||
class nsIChannel;
|
||||
class nsIPrincipal;
|
||||
class nsIDOMDocument;
|
||||
class nsIDOMDocumentType;
|
||||
class nsScriptLoader;
|
||||
class nsIContentSink;
|
||||
class nsHTMLStyleSheet;
|
||||
class nsHTMLCSSStyleSheet;
|
||||
class nsILayoutHistoryState;
|
||||
class nsIVariant;
|
||||
class nsIDOMUserDataHandler;
|
||||
template<class E> class nsCOMArray;
|
||||
class nsIDocumentObserver;
|
||||
class nsBindingManager;
|
||||
class nsIDOMNodeList;
|
||||
class mozAutoSubtreeModified;
|
||||
struct JSObject;
|
||||
class nsFrameLoader;
|
||||
class nsIBoxObject;
|
||||
class imgIRequest;
|
||||
class nsISHEntry;
|
||||
class nsAString;
|
||||
class nsBindingManager;
|
||||
class nsCSSStyleSheet;
|
||||
class nsDOMNavigationTiming;
|
||||
class nsWindowSizes;
|
||||
class nsEventStates;
|
||||
class nsFrameLoader;
|
||||
class nsHTMLCSSStyleSheet;
|
||||
class nsHTMLStyleSheet;
|
||||
class nsIAtom;
|
||||
class nsIBFCacheEntry;
|
||||
class nsIBoxObject;
|
||||
class nsIChannel;
|
||||
class nsIContent;
|
||||
class nsIContentSink;
|
||||
class nsIDocShell;
|
||||
class nsIDocumentObserver;
|
||||
class nsIDOMDocument;
|
||||
class nsIDOMDocumentFragment;
|
||||
class nsIDOMDocumentType;
|
||||
class nsIDOMElement;
|
||||
class nsIDOMEventTarget;
|
||||
class nsIDOMNodeList;
|
||||
class nsILayoutHistoryState;
|
||||
class nsIObjectLoadingContent;
|
||||
class nsIObserver;
|
||||
class nsIPresShell;
|
||||
class nsIPrincipal;
|
||||
class nsIRequest;
|
||||
class nsIStreamListener;
|
||||
class nsIStyleRule;
|
||||
class nsIStyleSheet;
|
||||
class nsIURI;
|
||||
class nsIVariant;
|
||||
class nsIViewManager;
|
||||
class nsPresContext;
|
||||
class nsScriptLoader;
|
||||
class nsSMILAnimationController;
|
||||
class nsStyleSet;
|
||||
class nsWindowSizes;
|
||||
|
||||
namespace mozilla {
|
||||
namespace css {
|
||||
|
|
|
@ -6,20 +6,16 @@
|
|||
#ifndef nsINode_h___
|
||||
#define nsINode_h___
|
||||
|
||||
#include "nsIDOMEventTarget.h"
|
||||
#include "nsEvent.h"
|
||||
#include "nsPropertyTable.h"
|
||||
#include "nsTObserverArray.h"
|
||||
#include "nsINodeInfo.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsIProgrammingLanguage.h" // for ::JAVASCRIPT
|
||||
#include "nsDOMError.h"
|
||||
#include "nsDOMString.h"
|
||||
#include "jspubtd.h"
|
||||
#include "nsWindowMemoryReporter.h"
|
||||
#include "nsIVariant.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsCOMPtr.h" // for member, local
|
||||
#include "nsGkAtoms.h" // for nsGkAtoms::baseURIProperty
|
||||
#include "nsIDOMEventTarget.h" // for base class
|
||||
#include "nsINodeInfo.h" // member (in nsCOMPtr)
|
||||
#include "nsIVariant.h" // for use in GetUserData()
|
||||
#include "nsNodeInfoManager.h" // for use in NodePrincipal()
|
||||
#include "nsPropertyTable.h" // for typedefs
|
||||
#include "nsTObserverArray.h" // for member
|
||||
#include "nsWindowMemoryReporter.h" // for NS_DECL_SIZEOF_EXCLUDING_THIS
|
||||
#include "nsWrapperCache.h" // for base class
|
||||
|
||||
// Including 'windows.h' will #define GetClassInfo to something else.
|
||||
#ifdef XP_WIN
|
||||
|
@ -28,26 +24,23 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
class nsAttrAndChildArray;
|
||||
class nsChildContentList;
|
||||
class nsIContent;
|
||||
class nsIDocument;
|
||||
class nsIDOMEvent;
|
||||
class nsIDOMNode;
|
||||
class nsIDOMElement;
|
||||
class nsIDOMNode;
|
||||
class nsIDOMNodeList;
|
||||
class nsIDOMUserDataHandler;
|
||||
class nsIEditor;
|
||||
class nsIFrame;
|
||||
class nsIMutationObserver;
|
||||
class nsINodeList;
|
||||
class nsIPresShell;
|
||||
class nsEventChainVisitor;
|
||||
class nsEventChainPreVisitor;
|
||||
class nsEventChainPostVisitor;
|
||||
class nsEventListenerManager;
|
||||
class nsIPrincipal;
|
||||
class nsIMutationObserver;
|
||||
class nsChildContentList;
|
||||
class nsNodeWeakReference;
|
||||
class nsIURI;
|
||||
class nsNodeSupportsWeakRefTearoff;
|
||||
class nsIEditor;
|
||||
class nsIDOMUserDataHandler;
|
||||
class nsAttrAndChildArray;
|
||||
class nsNodeWeakReference;
|
||||
class nsXPCClassInfo;
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -56,6 +49,12 @@ class Element;
|
|||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
namespace JS {
|
||||
class Value;
|
||||
}
|
||||
|
||||
inline void SetDOMStringToNull(nsAString& aString);
|
||||
|
||||
enum {
|
||||
// This bit will be set if the node has a listener manager.
|
||||
NODE_HAS_LISTENERMANAGER = 0x00000001U,
|
||||
|
@ -150,19 +149,6 @@ enum {
|
|||
NODE_TYPE_SPECIFIC_BITS_OFFSET = 20
|
||||
};
|
||||
|
||||
// Useful inline function for getting a node given an nsIContent and an
|
||||
// nsIDocument. Returns the first argument cast to nsINode if it is non-null,
|
||||
// otherwise returns the second (which may be null). We use type variables
|
||||
// instead of nsIContent* and nsIDocument* because the actual types must be
|
||||
// known for the cast to work.
|
||||
template<class C, class D>
|
||||
inline nsINode* NODE_FROM(C& aContent, D& aDocument)
|
||||
{
|
||||
if (aContent)
|
||||
return static_cast<nsINode*>(aContent);
|
||||
return static_cast<nsINode*>(aDocument);
|
||||
}
|
||||
|
||||
/**
|
||||
* Class used to detect unexpected mutations. To use the class create an
|
||||
* nsMutationGuard on the stack before unexpected mutations could occur.
|
||||
|
@ -1559,6 +1545,19 @@ protected:
|
|||
nsSlots* mSlots;
|
||||
};
|
||||
|
||||
// Useful inline function for getting a node given an nsIContent and an
|
||||
// nsIDocument. Returns the first argument cast to nsINode if it is non-null,
|
||||
// otherwise returns the second (which may be null). We use type variables
|
||||
// instead of nsIContent* and nsIDocument* because the actual types must be
|
||||
// known for the cast to work.
|
||||
template<class C, class D>
|
||||
inline nsINode* NODE_FROM(C& aContent, D& aDocument)
|
||||
{
|
||||
if (aContent)
|
||||
return static_cast<nsINode*>(aContent);
|
||||
return static_cast<nsINode*>(aDocument);
|
||||
}
|
||||
|
||||
|
||||
extern const nsIID kThisPtrOffsetsSID;
|
||||
|
||||
|
|
|
@ -23,20 +23,19 @@
|
|||
#ifndef nsINodeInfo_h___
|
||||
#define nsINodeInfo_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsNodeInfoManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCOMPtr.h" // for member
|
||||
#include "nsIAtom.h" // for member (in nsCOMPtr)
|
||||
#include "nsINameSpaceManager.h" // for kNameSpaceID_*
|
||||
#include "nsISupports.h" // for base class
|
||||
|
||||
#ifdef MOZILLA_INTERNAL_API
|
||||
#include "nsDOMString.h"
|
||||
#endif
|
||||
|
||||
// Forward declarations
|
||||
class nsIDocument;
|
||||
class nsIURI;
|
||||
class nsIPrincipal;
|
||||
class nsNodeInfoManager;
|
||||
|
||||
// IID for the nsINodeInfo interface
|
||||
#define NS_INODEINFO_IID \
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "nsDOMMutationObserver.h"
|
||||
#include "nsDOMClassInfoID.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsIClassInfo.h"
|
||||
#include "nsIXPCScriptable.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "nsDOMEventTargetHelper.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nsDOMClassInfoID.h"
|
||||
#include "nsDOMError.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "ContentChild.h"
|
||||
#include "ContentParent.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsIXPConnect.h"
|
||||
#include "jsapi.h"
|
||||
#include "nsJSUtils.h"
|
||||
|
@ -1205,4 +1206,4 @@ nsFrameMessageManager::MarkForCC()
|
|||
xpc_TryUnmarkWrappedGrayObject(mListeners[i].mListener);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,7 @@ class nsIDOMCSSStyleDeclaration;
|
|||
class nsIURI;
|
||||
class nsINodeInfo;
|
||||
class nsIControllers;
|
||||
class nsEventChainVisitor;
|
||||
class nsEventListenerManager;
|
||||
class nsIScrollableFrame;
|
||||
class nsAttrValueOrString;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#ifndef nsGkAtoms_h___
|
||||
#define nsGkAtoms_h___
|
||||
|
||||
#include "nsIAtom.h"
|
||||
class nsIAtom;
|
||||
|
||||
class nsGkAtoms {
|
||||
public:
|
||||
|
|
|
@ -10,24 +10,22 @@
|
|||
#ifndef nsNodeInfoManager_h___
|
||||
#define nsNodeInfoManager_h___
|
||||
|
||||
#include "nsCOMPtr.h" // for already_AddRefed
|
||||
#include "plhash.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Attributes.h" // for MOZ_FINAL
|
||||
#include "nsCOMPtr.h" // for member
|
||||
#include "nsCycleCollectionParticipant.h" // for NS_DECL_CYCLE_*
|
||||
#include "plhash.h" // for typedef PLHashNumber
|
||||
|
||||
class nsAString;
|
||||
class nsBindingManager;
|
||||
class nsIAtom;
|
||||
class nsIDocument;
|
||||
class nsINodeInfo;
|
||||
class nsNodeInfo;
|
||||
class nsIPrincipal;
|
||||
class nsIURI;
|
||||
class nsDocument;
|
||||
class nsIDOMDocumentType;
|
||||
class nsIDOMDocument;
|
||||
class nsAString;
|
||||
class nsIDOMNamedNodeMap;
|
||||
class nsXULPrototypeDocument;
|
||||
class nsBindingManager;
|
||||
class nsINodeInfo;
|
||||
class nsIPrincipal;
|
||||
class nsNodeInfo;
|
||||
struct PLHashEntry;
|
||||
struct PLHashTable;
|
||||
template<class T> struct already_AddRefed;
|
||||
|
||||
class nsNodeInfoManager MOZ_FINAL : public nsISupports
|
||||
{
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
#ifndef nsNodeUtils_h___
|
||||
#define nsNodeUtils_h___
|
||||
|
||||
#include "nsINode.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIContent.h" // for use in inline function (ParentChainChanged)
|
||||
#include "nsIMutationObserver.h" // for use in inline function (ParentChainChanged)
|
||||
|
||||
struct CharacterDataChangeInfo;
|
||||
struct JSContext;
|
||||
|
|
|
@ -3570,7 +3570,7 @@ JS::Value
|
|||
nsCanvasRenderingContext2DAzure::GetMozDash(JSContext* cx, ErrorResult& error)
|
||||
{
|
||||
JS::Value mozDash;
|
||||
DashArrayToJSVal(CurrentState().dash, cx, &mozDash);
|
||||
error = DashArrayToJSVal(CurrentState().dash, cx, &mozDash);
|
||||
return mozDash;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "IPC/IPCMessageUtils.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsDOMEvent.h"
|
||||
#include "nsEventStateManager.h"
|
||||
#include "nsIFrame.h"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDOMError.h"
|
||||
#include "nsDOMNotifyAudioAvailableEvent.h"
|
||||
#include "nsDOMClassInfoID.h" // DOMCI_DATA, NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO
|
||||
#include "nsContentUtils.h" // NS_DROP_JS_OBJECTS
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDOMError.h"
|
||||
#include "nsDOMStringMap.h"
|
||||
|
||||
#include "nsDOMClassInfoID.h"
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#include "nsDOMError.h"
|
||||
#include "nsIDOMHTMLAudioElement.h"
|
||||
#include "nsHTMLAudioElement.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "nsEventDispatcher.h"
|
||||
#include "nsHTMLMenuItemElement.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDOMError.h"
|
||||
|
||||
enum MenuType
|
||||
{
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#ifndef NS_SMILTIMEDELEMENT_H_
|
||||
#define NS_SMILTIMEDELEMENT_H_
|
||||
|
||||
#include "nsISMILAnimationElement.h"
|
||||
#include "nsSMILInterval.h"
|
||||
#include "nsSMILInstanceTime.h"
|
||||
#include "nsSMILMilestone.h"
|
||||
|
@ -18,7 +19,6 @@
|
|||
#include "nsAutoPtr.h"
|
||||
#include "nsAttrValue.h"
|
||||
|
||||
class nsISMILAnimationElement;
|
||||
class nsSMILAnimationFunction;
|
||||
class nsSMILTimeContainer;
|
||||
class nsSMILTimeValue;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "nsSVGElement.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "dombindings.h"
|
||||
#include "nsDOMError.h"
|
||||
|
||||
// local helper functions
|
||||
namespace {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "SVGAnimatedTransformList.h"
|
||||
#include "DOMSVGAnimatedTransformList.h"
|
||||
|
||||
#include "nsISMILAnimationElement.h"
|
||||
#include "nsSMILValue.h"
|
||||
#include "SVGTransform.h"
|
||||
#include "SVGTransformListSMILType.h"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "SVGMotionSMILAnimationFunction.h"
|
||||
#include "nsISMILAnimationElement.h"
|
||||
#include "nsSMILParserUtils.h"
|
||||
#include "nsSVGAngle.h"
|
||||
#include "SVGMotionSMILType.h"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDOMError.h"
|
||||
#include "SVGTransform.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsTextFormatter.h"
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDOMError.h"
|
||||
#include "nsSVGBoolean.h"
|
||||
#include "nsSMILValue.h"
|
||||
#include "SMILBoolType.h"
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#include "nsSMILMappedAttribute.h"
|
||||
#include "SVGMotionSMILAttr.h"
|
||||
#include "nsAttrValueOrString.h"
|
||||
#include "nsSMILAnimationController.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDOMError.h"
|
||||
#include "nsSVGEnum.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsSVGElement.h"
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDOMError.h"
|
||||
#include "nsSVGInteger.h"
|
||||
#include "nsSMILValue.h"
|
||||
#include "SMILIntegerType.h"
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDOMError.h"
|
||||
#include "nsSVGNumber2.h"
|
||||
#include "nsSVGUtils.h"
|
||||
#include "nsTextFormatter.h"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nscore.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsINodeInfo.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
|
|
@ -652,6 +652,19 @@ Navigator::AddIdleObserver(nsIIdleObserver* aIdleObserver)
|
|||
|
||||
nsCOMPtr<nsPIDOMWindow> win = do_QueryReferent(mWindow);
|
||||
NS_ENSURE_TRUE(win, NS_ERROR_UNEXPECTED);
|
||||
|
||||
nsCOMPtr<nsIDocument> doc = win->GetExtantDoc();
|
||||
NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
|
||||
|
||||
nsIPrincipal* principal = doc->NodePrincipal();
|
||||
if (!nsContentUtils::IsSystemPrincipal(principal)) {
|
||||
PRUint16 appStatus = nsIPrincipal::APP_STATUS_NOT_INSTALLED;
|
||||
principal->GetAppStatus(&appStatus);
|
||||
if (appStatus != nsIPrincipal::APP_STATUS_CERTIFIED) {
|
||||
return NS_ERROR_DOM_SECURITY_ERR;
|
||||
}
|
||||
}
|
||||
|
||||
if (NS_FAILED(win->RegisterIdleObserver(aIdleObserver))) {
|
||||
NS_WARNING("Failed to add idle observer.");
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "nsXPIDLString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsDOMClassInfoID.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsISHistoryInternal.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDOMError.h"
|
||||
#include "nsJSEnvironment.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsIScriptObjectPrincipal.h"
|
||||
|
|
|
@ -88,6 +88,10 @@ MOCHITEST_FILES = \
|
|||
browserElement_OpenWindowDifferentOrigin.js \
|
||||
test_browserElement_inproc_OpenWindowDifferentOrigin.html \
|
||||
file_browserElement_OpenWindowDifferentOrigin.html \
|
||||
browserElement_OpenNamed.js \
|
||||
test_browserElement_inproc_OpenNamed.html \
|
||||
file_browserElement_OpenNamed.html \
|
||||
file_browserElement_OpenNamed2.html \
|
||||
browserElement_SecurityChange.js \
|
||||
test_browserElement_inproc_SecurityChange.html \
|
||||
file_browserElement_SecurityChange.html \
|
||||
|
@ -139,6 +143,7 @@ MOCHITEST_FILES += \
|
|||
test_browserElement_oop_OpenWindowInFrame.html \
|
||||
test_browserElement_oop_OpenWindowRejected.html \
|
||||
test_browserElement_oop_OpenWindowDifferentOrigin.html \
|
||||
test_browserElement_oop_OpenNamed.html \
|
||||
test_browserElement_oop_SecurityChange.html \
|
||||
test_browserElement_oop_BackForward.html \
|
||||
test_browserElement_oop_Reload.html \
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
/* Any copyright is dedicated to the public domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// Bug 742944 - In <iframe mozbrowser>, test that if we call window.open twice
|
||||
// with the same name, we get only one mozbrowseropenwindow event.
|
||||
|
||||
"use strict";
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var iframe;
|
||||
var popupFrame;
|
||||
function runTest() {
|
||||
browserElementTestHelpers.setEnabledPref(true);
|
||||
browserElementTestHelpers.addToWhitelist();
|
||||
|
||||
iframe = document.createElement('iframe');
|
||||
iframe.mozbrowser = true;
|
||||
|
||||
var gotPopup = false;
|
||||
iframe.addEventListener('mozbrowseropenwindow', function(e) {
|
||||
is(gotPopup, false, 'Should get just one popup.');
|
||||
gotPopup = true;
|
||||
popupFrame = e.detail.frameElement;
|
||||
|
||||
// Called when file_browserElement_OpenNamed2.html loads into popupFrame.
|
||||
popupFrame.addEventListener('mozbrowsershowmodalprompt', function promptlistener(e) {
|
||||
popupFrame.removeEventListener('mozbrowsershowmodalprompt', promptlistener);
|
||||
|
||||
ok(gotPopup, 'Got openwindow event before showmodalprompt event.');
|
||||
is(e.detail.message, 'success: loaded');
|
||||
SimpleTest.executeSoon(test2);
|
||||
});
|
||||
|
||||
document.body.appendChild(popupFrame);
|
||||
});
|
||||
|
||||
// OpenNamed.html will call
|
||||
//
|
||||
// window.open('file_browserElement_OpenNamed2.html', 'OpenNamed').
|
||||
//
|
||||
// Once that popup loads, we reload OpenNamed.html. That will call
|
||||
// window.open again, but we shouldn't get another openwindow event, because
|
||||
// we're opening into the same named window.
|
||||
iframe.src = 'file_browserElement_OpenNamed.html';
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
|
||||
function test2() {
|
||||
popupFrame.addEventListener('mozbrowsershowmodalprompt', function(e) {
|
||||
is(e.detail.message, 'success: loaded');
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
||||
iframe.src = 'file_browserElement_OpenNamed.html?test2';
|
||||
}
|
||||
|
||||
runTest();
|
|
@ -0,0 +1,7 @@
|
|||
<html>
|
||||
<body>
|
||||
<script>
|
||||
window.open('file_browserElement_OpenNamed2.html', 'OpenNamed');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,7 @@
|
|||
<html>
|
||||
<body>
|
||||
<script>
|
||||
alert('success: loaded');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test of browser element.</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7" src="browserElement_OpenNamed.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test of browser element.</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="browserElementTestHelpers.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<script type="application/javascript;version=1.7" src="browserElement_OpenNamed.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsEventDispatcher.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsDOMProgressEvent.h"
|
||||
#include "nsDOMClassInfoID.h"
|
||||
#include "FileHelper.h"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsIPrincipal.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsDOMError.h"
|
||||
|
||||
DOMCI_DATA(MozPowerManager, mozilla::dom::power::PowerManager)
|
||||
|
||||
|
|
|
@ -610,6 +610,11 @@ let RIL = {
|
|||
*/
|
||||
iccInfo: {},
|
||||
|
||||
/**
|
||||
* Application identification for apps in ICC.
|
||||
*/
|
||||
aid: null,
|
||||
|
||||
voiceRegistrationState: {},
|
||||
dataRegistrationState: {},
|
||||
|
||||
|
@ -793,11 +798,16 @@ let RIL = {
|
|||
*
|
||||
* @param pin
|
||||
* String containing the PIN.
|
||||
* @param [optional] aid
|
||||
* AID value.
|
||||
*/
|
||||
enterICCPIN: function enterICCPIN(options) {
|
||||
Buf.newParcel(REQUEST_ENTER_SIM_PIN, options);
|
||||
Buf.writeUint32(1);
|
||||
Buf.writeUint32(RILQUIRKS_V5_LEGACY ? 1 : 2);
|
||||
Buf.writeString(options.pin);
|
||||
if (!RILQUIRKS_V5_LEGACY) {
|
||||
Buf.writeString(options.aid ? options.aid : this.aid);
|
||||
}
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
|
@ -806,11 +816,16 @@ let RIL = {
|
|||
*
|
||||
* @param pin
|
||||
* String containing the PIN2.
|
||||
* @param [optional] aid
|
||||
* AID value.
|
||||
*/
|
||||
enterICCPIN2: function enterICCPIN2(options) {
|
||||
Buf.newParcel(REQUEST_ENTER_SIM_PIN2, options);
|
||||
Buf.writeUint32(1);
|
||||
Buf.writeUint32(RILQUIRKS_V5_LEGACY ? 1 : 2);
|
||||
Buf.writeString(options.pin);
|
||||
if (!RILQUIRKS_V5_LEGACY) {
|
||||
Buf.writeString(options.aid ? options.aid : this.aid);
|
||||
}
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
|
@ -821,12 +836,17 @@ let RIL = {
|
|||
* String containing the old PIN value
|
||||
* @param newPin
|
||||
* String containing the new PIN value
|
||||
* @param [optional] aid
|
||||
* AID value.
|
||||
*/
|
||||
changeICCPIN: function changeICCPIN(options) {
|
||||
Buf.newParcel(REQUEST_CHANGE_SIM_PIN, options);
|
||||
Buf.writeUint32(2);
|
||||
Buf.writeUint32(RILQUIRKS_V5_LEGACY ? 2 : 3);
|
||||
Buf.writeString(options.pin);
|
||||
Buf.writeString(options.newPin);
|
||||
if (!RILQUIRKS_V5_LEGACY) {
|
||||
Buf.writeString(options.aid ? options.aid : this.aid);
|
||||
}
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
|
@ -837,12 +857,17 @@ let RIL = {
|
|||
* String containing the old PIN2 value
|
||||
* @param newPin
|
||||
* String containing the new PIN2 value
|
||||
* @param [optional] aid
|
||||
* AID value.
|
||||
*/
|
||||
changeICCPIN2: function changeICCPIN2(options) {
|
||||
Buf.newParcel(REQUEST_CHANGE_SIM_PIN2, options);
|
||||
Buf.writeUint32(2);
|
||||
Buf.writeUint32(RILQUIRKS_V5_LEGACY ? 2 : 3);
|
||||
Buf.writeString(options.pin);
|
||||
Buf.writeString(options.newPin);
|
||||
if (!RILQUIRKS_V5_LEGACY) {
|
||||
Buf.writeString(options.aid ? options.aid : this.aid);
|
||||
}
|
||||
Buf.sendParcel();
|
||||
},
|
||||
/**
|
||||
|
@ -852,13 +877,17 @@ let RIL = {
|
|||
* String containing the PUK value.
|
||||
* @param newPin
|
||||
* String containing the new PIN value.
|
||||
*
|
||||
* @param [optional] aid
|
||||
* AID value.
|
||||
*/
|
||||
enterICCPUK: function enterICCPUK(options) {
|
||||
Buf.newParcel(REQUEST_ENTER_SIM_PUK, options);
|
||||
Buf.writeUint32(2);
|
||||
Buf.writeUint32(RILQUIRKS_V5_LEGACY ? 2 : 3);
|
||||
Buf.writeString(options.puk);
|
||||
Buf.writeString(options.newPin);
|
||||
if (!RILQUIRKS_V5_LEGACY) {
|
||||
Buf.writeString(options.aid ? options.aid : this.aid);
|
||||
}
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
|
@ -869,13 +898,17 @@ let RIL = {
|
|||
* String containing the PUK2 value.
|
||||
* @param newPin
|
||||
* String containing the new PIN2 value.
|
||||
*
|
||||
* @param [optional] aid
|
||||
* AID value.
|
||||
*/
|
||||
enterICCPUK2: function enterICCPUK2(options) {
|
||||
Buf.newParcel(REQUEST_ENTER_SIM_PUK2, options);
|
||||
Buf.writeUint32(2);
|
||||
Buf.writeUint32(RILQUIRKS_V5_LEGACY ? 2 : 3);
|
||||
Buf.writeString(options.puk);
|
||||
Buf.writeString(options.newPin);
|
||||
if (!RILQUIRKS_V5_LEGACY) {
|
||||
Buf.writeString(options.aid ? options.aid : this.aid);
|
||||
}
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
|
@ -895,21 +928,26 @@ let RIL = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Query ICC facility lock.
|
||||
* Query ICC facility lock.
|
||||
*
|
||||
* @param facility
|
||||
* One of ICC_CB_FACILITY_*.
|
||||
* @param password
|
||||
* Password for the facility, or "" if not required.
|
||||
* @param serviceClass
|
||||
* One of ICC_SERVICE_CLASS_*.
|
||||
* @param facility
|
||||
* One of ICC_CB_FACILITY_*.
|
||||
* @param password
|
||||
* Password for the facility, or "" if not required.
|
||||
* @param serviceClass
|
||||
* One of ICC_SERVICE_CLASS_*.
|
||||
* @param [optional] aid
|
||||
* AID value.
|
||||
*/
|
||||
queryICCFacilityLock: function queryICCFacilityLock(options) {
|
||||
Buf.newParcel(REQUEST_QUERY_FACILITY_LOCK, options);
|
||||
Buf.writeUint32(3);
|
||||
Buf.writeUint32(RILQUIRKS_V5_LEGACY ? 3 : 4);
|
||||
Buf.writeString(options.facility);
|
||||
Buf.writeString(options.password);
|
||||
Buf.writeString(options.serviceClass.toString());
|
||||
if (!RILQUIRKS_V5_LEGACY) {
|
||||
Buf.writeString(options.aid ? options.aid : this.aid);
|
||||
}
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
|
@ -944,14 +982,19 @@ let RIL = {
|
|||
* Password for the facility, or "" if not required.
|
||||
* @param serviceClass
|
||||
* One of ICC_SERVICE_CLASS_*.
|
||||
* @param [optional] aid
|
||||
* AID value.
|
||||
*/
|
||||
setICCFacilityLock: function setICCFacilityLock(options) {
|
||||
Buf.newParcel(REQUEST_SET_FACILITY_LOCK, options);
|
||||
Buf.writeUint32(4);
|
||||
Buf.writeUint32(RILQUIRKS_V5_LEGACY ? 3 : 4);
|
||||
Buf.writeString(options.facility);
|
||||
Buf.writeString(options.enabled ? "1" : "0");
|
||||
Buf.writeString(options.password);
|
||||
Buf.writeString(options.serviceClass.toString());
|
||||
if (!RILQUIRKS_V5_LEGACY) {
|
||||
Buf.writeString(options.aid ? options.aid : this.aid);
|
||||
}
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
|
@ -972,10 +1015,10 @@ let RIL = {
|
|||
* Arbitrary integer parameters for the command.
|
||||
* @param data
|
||||
* String parameter for the command.
|
||||
* @param pin2 [optional]
|
||||
* @param pin2
|
||||
* String containing the PIN2.
|
||||
* @param aid
|
||||
* String for the AID.
|
||||
* @param [optional] aid
|
||||
* AID value.
|
||||
*/
|
||||
iccIO: function iccIO(options) {
|
||||
let token = Buf.newParcel(REQUEST_SIM_IO, options);
|
||||
|
@ -987,8 +1030,9 @@ let RIL = {
|
|||
Buf.writeUint32(options.p3);
|
||||
Buf.writeString(options.data);
|
||||
Buf.writeString(options.pin2 ? options.pin2 : null);
|
||||
let appIndex = this.iccStatus.gsmUmtsSubscriptionAppIndex;
|
||||
Buf.writeString(this.iccStatus.apps[appIndex].aid);
|
||||
if (!RILQUIRKS_V5_LEGACY) {
|
||||
Buf.writeString(options.aid ? options.aid : this.aid);
|
||||
}
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
|
@ -1011,15 +1055,20 @@ let RIL = {
|
|||
this.sendDOMMessage(this.iccInfo);
|
||||
},
|
||||
|
||||
getIMSI: function getIMSI() {
|
||||
/**
|
||||
* Get IMSI.
|
||||
*
|
||||
* @param [optional] aid
|
||||
* AID value.
|
||||
*/
|
||||
getIMSI: function getIMSI(aid) {
|
||||
if (RILQUIRKS_V5_LEGACY) {
|
||||
Buf.simpleRequest(REQUEST_GET_IMSI);
|
||||
return;
|
||||
}
|
||||
let token = Buf.newParcel(REQUEST_GET_IMSI);
|
||||
Buf.writeUint32(1);
|
||||
let appIndex = this.iccStatus.gsmUmtsSubscriptionAppIndex;
|
||||
Buf.writeString(this.iccStatus.apps[appIndex].aid);
|
||||
Buf.writeString(aid ? aid : this.aid);
|
||||
Buf.sendParcel();
|
||||
},
|
||||
|
||||
|
@ -1970,6 +2019,11 @@ let RIL = {
|
|||
return;
|
||||
}
|
||||
|
||||
// TODO: Bug 726098, change to use cdmaSubscriptionAppIndex when in CDMA.
|
||||
// fetchICCRecords will need to read aid, so read aid here.
|
||||
let index = iccStatus.gsmUmtsSubscriptionAppIndex;
|
||||
this.aid = iccStatus.apps[index].aid;
|
||||
|
||||
// This was moved down from CARD_APPSTATE_READY
|
||||
this.requestNetworkInfo();
|
||||
this.getSignalStrength();
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include "WorkerFeature.h"
|
||||
#include "WorkerPrivate.h"
|
||||
|
||||
#include "nsDOMError.h"
|
||||
|
||||
#define MAX_CONCURRENT_SCRIPTS 1000
|
||||
|
||||
USING_WORKERS_NAMESPACE
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include "js/MemoryMetrics.h"
|
||||
#include "nsAlgorithm.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsDOMJSUtils.h"
|
||||
#include "nsGUIEvent.h"
|
||||
#include "nsJSEnvironment.h"
|
||||
|
@ -945,9 +946,6 @@ public:
|
|||
JSObject* target = aWorkerPrivate->IsAcceptingEvents() ?
|
||||
aWorkerPrivate->GetJSObject() :
|
||||
nullptr;
|
||||
if (target) {
|
||||
aWorkerPrivate->AssertInnerWindowIsCorrect();
|
||||
}
|
||||
|
||||
PRUint64 innerWindowId;
|
||||
|
||||
|
@ -963,6 +961,8 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
aWorkerPrivate->AssertInnerWindowIsCorrect();
|
||||
|
||||
innerWindowId = aWorkerPrivate->GetInnerWindowId();
|
||||
}
|
||||
|
||||
|
|
|
@ -874,7 +874,7 @@ void WebBrowserChromeUI::Destroyed(nsIWebBrowserChrome* chrome)
|
|||
|
||||
// Clear the window user data
|
||||
HWND hwndBrowser = GetDlgItem(hwndDlg, IDC_BROWSER);
|
||||
SetWindowLongPtr(hwndBrowser, GWLP_USERDATA, nullptr);
|
||||
SetWindowLongPtr(hwndBrowser, GWLP_USERDATA, 0);
|
||||
DestroyWindow(hwndBrowser);
|
||||
DestroyWindow(hwndDlg);
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "nsIXMLContentSink.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsSMILAnimationController.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsSize.h"
|
||||
#include "gfxRect.h"
|
||||
|
|
|
@ -170,7 +170,7 @@ EvalKernel(JSContext *cx, const CallArgs &args, EvalType evalType, StackFrame *c
|
|||
args.rval().set(args[0]);
|
||||
return true;
|
||||
}
|
||||
JSString *str = args[0].toString();
|
||||
RootedString str(cx, args[0].toString());
|
||||
|
||||
// ES5 15.1.2.1 steps 2-8.
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ ifdef SDK_HEADERS
|
|||
EXPORTS += $(SDK_HEADERS)
|
||||
endif
|
||||
|
||||
REPORT_BUILD = @echo $(notdir $<)
|
||||
REPORT_BUILD = $(info $(notdir $<))
|
||||
|
||||
ifeq ($(OS_ARCH),OS2)
|
||||
EXEC =
|
||||
|
@ -45,12 +45,18 @@ ifdef SYSTEM_LIBXUL
|
|||
SKIP_COPY_XULRUNNER=1
|
||||
endif
|
||||
|
||||
# ELOG prints out failed command when building silently (gmake -s).
|
||||
# ELOG prints out failed command when building silently (gmake -s). Pymake
|
||||
# prints out failed commands anyway, so ELOG just makes things worse by
|
||||
# forcing shell invocations.
|
||||
ifndef .PYMAKE
|
||||
ifneq (,$(findstring s, $(filter-out --%, $(MAKEFLAGS))))
|
||||
ELOG := $(EXEC) sh $(BUILD_TOOLS)/print-failed-commands.sh
|
||||
else
|
||||
ELOG :=
|
||||
endif
|
||||
endif # -s
|
||||
else
|
||||
ELOG :=
|
||||
endif # ifndef .PYMAKE
|
||||
|
||||
_VPATH_SRCS = $(abspath $<)
|
||||
|
||||
|
|
|
@ -3965,7 +3965,7 @@ JS_DefineObject(JSContext *cx, JSObject *objArg, const char *name, JSClass *jscl
|
|||
if (!clasp)
|
||||
clasp = &ObjectClass; /* default class is Object */
|
||||
|
||||
JSObject *nobj = NewObjectWithClassProto(cx, clasp, proto, obj);
|
||||
RootedObject nobj(cx, NewObjectWithClassProto(cx, clasp, proto, obj));
|
||||
if (!nobj)
|
||||
return NULL;
|
||||
|
||||
|
@ -4356,15 +4356,17 @@ JS_SetElement(JSContext *cx, JSObject *objArg, uint32_t index, jsval *vp)
|
|||
JS_PUBLIC_API(JSBool)
|
||||
JS_SetProperty(JSContext *cx, JSObject *objArg, const char *name, jsval *vp)
|
||||
{
|
||||
RootedObject obj(cx, objArg);
|
||||
JSAtom *atom = js_Atomize(cx, name, strlen(name));
|
||||
return atom && JS_SetPropertyById(cx, objArg, AtomToId(atom), vp);
|
||||
return atom && JS_SetPropertyById(cx, obj, AtomToId(atom), vp);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
JS_SetUCProperty(JSContext *cx, JSObject *objArg, const jschar *name, size_t namelen, jsval *vp)
|
||||
{
|
||||
RootedObject obj(cx, objArg);
|
||||
JSAtom *atom = js_AtomizeChars(cx, name, AUTO_NAMELEN(name, namelen));
|
||||
return atom && JS_SetPropertyById(cx, objArg, AtomToId(atom), vp);
|
||||
return atom && JS_SetPropertyById(cx, obj, AtomToId(atom), vp);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
|
|
|
@ -3708,7 +3708,7 @@ NewArray(JSContext *cx, uint32_t length, RawObject protoArg)
|
|||
Rooted<GlobalObject*> parent(cx, parent_);
|
||||
RootedObject proto(cx, protoArg);
|
||||
if (protoArg)
|
||||
PoisonPtr(reinterpret_cast<uintptr_t *>(protoArg));
|
||||
PoisonPtr(&protoArg);
|
||||
|
||||
if (!proto && !FindProto(cx, &ArrayClass, parent, &proto))
|
||||
return NULL;
|
||||
|
|
|
@ -2590,7 +2590,7 @@ static JSBool
|
|||
date_toJSON(JSContext *cx, unsigned argc, Value *vp)
|
||||
{
|
||||
/* Step 1. */
|
||||
JSObject *obj = ToObject(cx, &vp[1]);
|
||||
RootedObject obj(cx, ToObject(cx, &vp[1]));
|
||||
if (!obj)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -383,7 +383,7 @@ js::num_parseInt(JSContext *cx, unsigned argc, Value *vp)
|
|||
}
|
||||
|
||||
/* Step 1. */
|
||||
JSString *inputString = ToString(cx, args[0]);
|
||||
RootedString inputString(cx, ToString(cx, args[0]));
|
||||
if (!inputString)
|
||||
return false;
|
||||
args[0].setString(inputString);
|
||||
|
|
|
@ -335,6 +335,7 @@ obj_toSource(JSContext *cx, unsigned argc, Value *vp)
|
|||
size_t vlength;
|
||||
Value *val;
|
||||
JSString *gsop[2];
|
||||
SkipRoot skipGsop(cx, &gsop, 2);
|
||||
|
||||
JS_CHECK_RECURSION(cx, return JS_FALSE);
|
||||
|
||||
|
|
|
@ -261,9 +261,9 @@ class KeyStringifier<uint32_t> {
|
|||
};
|
||||
|
||||
template<>
|
||||
class KeyStringifier<jsid> {
|
||||
class KeyStringifier<HandleId> {
|
||||
public:
|
||||
static JSString *toString(JSContext *cx, jsid id) {
|
||||
static JSString *toString(JSContext *cx, HandleId id) {
|
||||
return IdToString(cx, id);
|
||||
}
|
||||
};
|
||||
|
@ -274,9 +274,9 @@ class KeyStringifier<jsid> {
|
|||
*/
|
||||
template<typename KeyType>
|
||||
static bool
|
||||
PreprocessValue(JSContext *cx, JSObject *holder, KeyType key, MutableHandleValue vp, StringifyContext *scx)
|
||||
PreprocessValue(JSContext *cx, HandleObject holder, KeyType key, MutableHandleValue vp, StringifyContext *scx)
|
||||
{
|
||||
JSString *keyStr = NULL;
|
||||
RootedString keyStr(cx);
|
||||
|
||||
/* Step 2. */
|
||||
if (vp.get().isObject()) {
|
||||
|
@ -417,7 +417,7 @@ JO(JSContext *cx, HandleObject obj, StringifyContext *scx)
|
|||
RootedValue outputValue(cx);
|
||||
if (!obj->getGeneric(cx, id, &outputValue))
|
||||
return false;
|
||||
if (!PreprocessValue(cx, obj, id.get(), &outputValue, scx))
|
||||
if (!PreprocessValue(cx, obj, HandleId(id), &outputValue, scx))
|
||||
return false;
|
||||
if (IsFilteredValue(outputValue))
|
||||
continue;
|
||||
|
@ -737,7 +737,7 @@ js_Stringify(JSContext *cx, MutableHandleValue vp, JSObject *replacer_, Value sp
|
|||
if (!scx.init())
|
||||
return false;
|
||||
|
||||
if (!PreprocessValue(cx, wrapper, emptyId.get(), vp, &scx))
|
||||
if (!PreprocessValue(cx, wrapper, HandleId(emptyId), vp, &scx))
|
||||
return false;
|
||||
if (IsFilteredValue(vp))
|
||||
return true;
|
||||
|
@ -747,7 +747,7 @@ js_Stringify(JSContext *cx, MutableHandleValue vp, JSObject *replacer_, Value sp
|
|||
|
||||
/* ES5 15.12.2 Walk. */
|
||||
static bool
|
||||
Walk(JSContext *cx, HandleObject holder, HandleId name, const Value &reviver, MutableHandleValue vp)
|
||||
Walk(JSContext *cx, HandleObject holder, HandleId name, HandleValue reviver, MutableHandleValue vp)
|
||||
{
|
||||
JS_CHECK_RECURSION(cx, return false);
|
||||
|
||||
|
@ -830,7 +830,7 @@ Walk(JSContext *cx, HandleObject holder, HandleId name, const Value &reviver, Mu
|
|||
}
|
||||
|
||||
/* Step 3. */
|
||||
JSString *key = IdToString(cx, name);
|
||||
RootedString key(cx, IdToString(cx, name));
|
||||
if (!key)
|
||||
return false;
|
||||
|
||||
|
@ -850,7 +850,7 @@ Walk(JSContext *cx, HandleObject holder, HandleId name, const Value &reviver, Mu
|
|||
}
|
||||
|
||||
static bool
|
||||
Revive(JSContext *cx, const Value &reviver, MutableHandleValue vp)
|
||||
Revive(JSContext *cx, HandleValue reviver, MutableHandleValue vp)
|
||||
{
|
||||
RootedObject obj(cx, NewBuiltinClassInstance(cx, &ObjectClass));
|
||||
if (!obj)
|
||||
|
|
|
@ -743,7 +743,7 @@ ArrayToIdVector(JSContext *cx, const Value &array, AutoIdVector &props)
|
|||
if (array.isPrimitive())
|
||||
return true;
|
||||
|
||||
JSObject *obj = &array.toObject();
|
||||
RootedObject obj(cx, &array.toObject());
|
||||
uint32_t length;
|
||||
if (!js_GetLengthProperty(cx, obj, &length))
|
||||
return false;
|
||||
|
|
|
@ -111,8 +111,10 @@ Bindings::lookup(JSContext *cx, PropertyName *name) const
|
|||
if (!lastBinding)
|
||||
return BindingIter::Init(this, NULL);
|
||||
|
||||
const Bindings *self = this;
|
||||
SkipRoot skipSelf(cx, &self);
|
||||
Shape **_;
|
||||
return BindingIter::Init(this, Shape::search(cx, lastBinding, NameToId(name), &_));
|
||||
return BindingIter::Init(self, Shape::search(cx, lastBinding, NameToId(name), &_));
|
||||
}
|
||||
|
||||
unsigned
|
||||
|
|
|
@ -1186,6 +1186,7 @@ str_indexOf(JSContext *cx, unsigned argc, Value *vp)
|
|||
|
||||
uint32_t patlen = patstr->length();
|
||||
const jschar *pat = patstr->chars();
|
||||
SkipRoot skipPat(cx, &pat);
|
||||
|
||||
uint32_t start;
|
||||
if (args.length() > 1) {
|
||||
|
|
|
@ -699,17 +699,6 @@ GetProtoForClass(JSContext *cx, Class *clasp)
|
|||
* the subclasses.
|
||||
*/
|
||||
|
||||
static JSObject *
|
||||
getTypedArray(JSObject *obj)
|
||||
{
|
||||
MOZ_ASSERT(obj);
|
||||
do {
|
||||
if (obj->isTypedArray())
|
||||
return obj;
|
||||
} while ((obj = obj->getProto()));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline bool
|
||||
TypedArray::isArrayIndex(JSContext *cx, JSObject *obj, jsid id, uint32_t *ip)
|
||||
{
|
||||
|
@ -731,19 +720,18 @@ js::IsDataView(JSObject* obj)
|
|||
}
|
||||
|
||||
JSBool
|
||||
TypedArray::obj_lookupGeneric(JSContext *cx, HandleObject obj, HandleId id,
|
||||
TypedArray::obj_lookupGeneric(JSContext *cx, HandleObject tarray, HandleId id,
|
||||
MutableHandleObject objp, MutableHandleShape propp)
|
||||
{
|
||||
JSObject *tarray = getTypedArray(obj);
|
||||
JS_ASSERT(tarray);
|
||||
JS_ASSERT(tarray->isTypedArray());
|
||||
|
||||
if (isArrayIndex(cx, tarray, id)) {
|
||||
MarkNonNativePropertyFound(obj, propp);
|
||||
objp.set(obj);
|
||||
MarkNonNativePropertyFound(tarray, propp);
|
||||
objp.set(tarray);
|
||||
return true;
|
||||
}
|
||||
|
||||
JSObject *proto = obj->getProto();
|
||||
JSObject *proto = tarray->getProto();
|
||||
if (!proto) {
|
||||
objp.set(NULL);
|
||||
propp.set(NULL);
|
||||
|
@ -762,19 +750,18 @@ TypedArray::obj_lookupProperty(JSContext *cx, HandleObject obj, HandlePropertyNa
|
|||
}
|
||||
|
||||
JSBool
|
||||
TypedArray::obj_lookupElement(JSContext *cx, HandleObject obj, uint32_t index,
|
||||
TypedArray::obj_lookupElement(JSContext *cx, HandleObject tarray, uint32_t index,
|
||||
MutableHandleObject objp, MutableHandleShape propp)
|
||||
{
|
||||
JSObject *tarray = getTypedArray(obj);
|
||||
JS_ASSERT(tarray);
|
||||
JS_ASSERT(tarray->isTypedArray());
|
||||
|
||||
if (index < length(tarray)) {
|
||||
MarkNonNativePropertyFound(obj, propp);
|
||||
objp.set(obj);
|
||||
MarkNonNativePropertyFound(tarray, propp);
|
||||
objp.set(tarray);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (JSObject *proto = obj->getProto())
|
||||
if (JSObject *proto = tarray->getProto())
|
||||
return proto->lookupElement(cx, index, objp, propp);
|
||||
|
||||
objp.set(NULL);
|
||||
|
@ -963,17 +950,17 @@ class TypedArrayTemplate
|
|||
}
|
||||
|
||||
static JSBool
|
||||
obj_getElement(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index,
|
||||
obj_getElement(JSContext *cx, HandleObject tarray, HandleObject receiver, uint32_t index,
|
||||
MutableHandleValue vp)
|
||||
{
|
||||
JSObject *tarray = getTypedArray(obj);
|
||||
JS_ASSERT(tarray->isTypedArray());
|
||||
|
||||
if (index < length(tarray)) {
|
||||
copyIndexToValue(cx, tarray, index, vp);
|
||||
return true;
|
||||
}
|
||||
|
||||
JSObject *proto = obj->getProto();
|
||||
JSObject *proto = tarray->getProto();
|
||||
if (!proto) {
|
||||
vp.setUndefined();
|
||||
return true;
|
||||
|
@ -1021,12 +1008,12 @@ class TypedArrayTemplate
|
|||
}
|
||||
|
||||
static JSBool
|
||||
obj_getElementIfPresent(JSContext *cx, HandleObject obj, HandleObject receiver, uint32_t index,
|
||||
obj_getElementIfPresent(JSContext *cx, HandleObject tarray, HandleObject receiver, uint32_t index,
|
||||
MutableHandleValue vp, bool *present)
|
||||
{
|
||||
// Fast-path the common case of index < length
|
||||
JSObject *tarray = getTypedArray(obj);
|
||||
JS_ASSERT(tarray->isTypedArray());
|
||||
|
||||
// Fast-path the common case of index < length
|
||||
if (index < length(tarray)) {
|
||||
// this inline function is specialized for each type
|
||||
copyIndexToValue(cx, tarray, index, vp);
|
||||
|
@ -1034,7 +1021,7 @@ class TypedArrayTemplate
|
|||
return true;
|
||||
}
|
||||
|
||||
JSObject *proto = obj->getProto();
|
||||
JSObject *proto = tarray->getProto();
|
||||
if (!proto) {
|
||||
vp.setUndefined();
|
||||
return true;
|
||||
|
@ -1109,11 +1096,10 @@ class TypedArrayTemplate
|
|||
}
|
||||
|
||||
static JSBool
|
||||
obj_setGeneric(JSContext *cx, HandleObject obj, HandleId id,
|
||||
obj_setGeneric(JSContext *cx, HandleObject tarray, HandleId id,
|
||||
MutableHandleValue vp, JSBool strict)
|
||||
{
|
||||
RootedObject tarray(cx, getTypedArray(obj));
|
||||
JS_ASSERT(tarray);
|
||||
JS_ASSERT(tarray->isTypedArray());
|
||||
|
||||
uint32_t index;
|
||||
// We can't just chain to js_SetPropertyHelper, because we're not a normal object.
|
||||
|
@ -1139,11 +1125,10 @@ class TypedArrayTemplate
|
|||
}
|
||||
|
||||
static JSBool
|
||||
obj_setElement(JSContext *cx, HandleObject obj, uint32_t index,
|
||||
obj_setElement(JSContext *cx, HandleObject tarray, uint32_t index,
|
||||
MutableHandleValue vp, JSBool strict)
|
||||
{
|
||||
RootedObject tarray(cx, getTypedArray(obj));
|
||||
JS_ASSERT(tarray);
|
||||
JS_ASSERT(tarray->isTypedArray());
|
||||
|
||||
if (index >= length(tarray)) {
|
||||
// Silent ignore is better than an exception here, because
|
||||
|
@ -1207,11 +1192,10 @@ class TypedArrayTemplate
|
|||
}
|
||||
|
||||
static JSBool
|
||||
obj_deleteElement(JSContext *cx, HandleObject obj, uint32_t index,
|
||||
obj_deleteElement(JSContext *cx, HandleObject tarray, uint32_t index,
|
||||
MutableHandleValue rval, JSBool strict)
|
||||
{
|
||||
JSObject *tarray = getTypedArray(obj);
|
||||
JS_ASSERT(tarray);
|
||||
JS_ASSERT(tarray->isTypedArray());
|
||||
|
||||
if (index < length(tarray)) {
|
||||
rval.setBoolean(false);
|
||||
|
@ -1223,7 +1207,7 @@ class TypedArrayTemplate
|
|||
}
|
||||
|
||||
static JSBool
|
||||
obj_deleteSpecial(JSContext *cx, HandleObject obj, HandleSpecialId sid,
|
||||
obj_deleteSpecial(JSContext *cx, HandleObject tarray, HandleSpecialId sid,
|
||||
MutableHandleValue rval, JSBool strict)
|
||||
{
|
||||
rval.setBoolean(true);
|
||||
|
@ -1231,11 +1215,10 @@ class TypedArrayTemplate
|
|||
}
|
||||
|
||||
static JSBool
|
||||
obj_enumerate(JSContext *cx, HandleObject obj, JSIterateOp enum_op,
|
||||
obj_enumerate(JSContext *cx, HandleObject tarray, JSIterateOp enum_op,
|
||||
Value *statep, jsid *idp)
|
||||
{
|
||||
JSObject *tarray = getTypedArray(obj);
|
||||
JS_ASSERT(tarray);
|
||||
JS_ASSERT(tarray->isTypedArray());
|
||||
|
||||
uint32_t index;
|
||||
switch (enum_op) {
|
||||
|
@ -1487,10 +1470,7 @@ class TypedArrayTemplate
|
|||
fun_subarray_impl(JSContext *cx, CallArgs args)
|
||||
{
|
||||
JS_ASSERT(IsThisClass(args.thisv()));
|
||||
|
||||
JSObject *tarray = getTypedArray(&args.thisv().toObject());
|
||||
if (!tarray)
|
||||
return true;
|
||||
RootedObject tarray(cx, &args.thisv().toObject());
|
||||
|
||||
// these are the default values
|
||||
uint32_t begin = 0, end = length(tarray);
|
||||
|
@ -1528,6 +1508,7 @@ class TypedArrayTemplate
|
|||
fun_move_impl(JSContext *cx, CallArgs args)
|
||||
{
|
||||
JS_ASSERT(IsThisClass(args.thisv()));
|
||||
RootedObject tarray(cx, &args.thisv().toObject());
|
||||
|
||||
if (args.length() < 3) {
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_TYPED_ARRAY_BAD_ARGS);
|
||||
|
@ -1538,7 +1519,6 @@ class TypedArrayTemplate
|
|||
uint32_t srcEnd;
|
||||
uint32_t dest;
|
||||
|
||||
JSObject *tarray = getTypedArray(&args.thisv().toObject());
|
||||
uint32_t length = TypedArray::length(tarray);
|
||||
if (!ToClampedIndex(cx, args[0], length, &srcBegin) ||
|
||||
!ToClampedIndex(cx, args[1], length, &srcEnd) ||
|
||||
|
@ -1591,11 +1571,7 @@ class TypedArrayTemplate
|
|||
fun_set_impl(JSContext *cx, CallArgs args)
|
||||
{
|
||||
JS_ASSERT(IsThisClass(args.thisv()));
|
||||
|
||||
Rooted<JSObject*> thisObj(cx, &args.thisv().toObject());
|
||||
RootedObject tarray(cx, getTypedArray(thisObj));
|
||||
if (!tarray)
|
||||
return true;
|
||||
RootedObject tarray(cx, &args.thisv().toObject());
|
||||
|
||||
// first arg must be either a typed array or a JS array
|
||||
if (args.length() == 0 || !args[0].isObject()) {
|
||||
|
@ -1621,19 +1597,17 @@ class TypedArrayTemplate
|
|||
}
|
||||
|
||||
RootedObject arg0(cx, args[0].toObjectOrNull());
|
||||
RootedObject src(cx, getTypedArray(arg0));
|
||||
if (src) {
|
||||
if (length(src) > length(tarray) - offset) {
|
||||
if (arg0->isTypedArray()) {
|
||||
if (length(arg0) > length(tarray) - offset) {
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_BAD_ARRAY_LENGTH);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!copyFromTypedArray(cx, thisObj, src, offset))
|
||||
if (!copyFromTypedArray(cx, tarray, arg0, offset))
|
||||
return false;
|
||||
} else {
|
||||
src = arg0;
|
||||
uint32_t len;
|
||||
if (!js_GetLengthProperty(cx, src, &len))
|
||||
if (!js_GetLengthProperty(cx, arg0, &len))
|
||||
return false;
|
||||
|
||||
// avoid overflow; we know that offset <= length
|
||||
|
@ -1642,7 +1616,7 @@ class TypedArrayTemplate
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!copyFromArray(cx, thisObj, src, len, offset))
|
||||
if (!copyFromArray(cx, tarray, arg0, len, offset))
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1799,7 +1773,7 @@ class TypedArrayTemplate
|
|||
MutableHandleValue vp);
|
||||
|
||||
static JSObject *
|
||||
createSubarray(JSContext *cx, JSObject *tarray, uint32_t begin, uint32_t end)
|
||||
createSubarray(JSContext *cx, HandleObject tarray, uint32_t begin, uint32_t end)
|
||||
{
|
||||
JS_ASSERT(tarray);
|
||||
|
||||
|
@ -1847,8 +1821,9 @@ class TypedArrayTemplate
|
|||
* are treated identically.
|
||||
*/
|
||||
if (v.isPrimitive() && !v.isMagic() && !v.isUndefined()) {
|
||||
RootedValue primitive(cx, v);
|
||||
double dval;
|
||||
JS_ALWAYS_TRUE(ToNumber(cx, v, &dval));
|
||||
JS_ALWAYS_TRUE(ToNumber(cx, primitive, &dval));
|
||||
return nativeFromDouble(dval);
|
||||
}
|
||||
|
||||
|
@ -1861,9 +1836,7 @@ class TypedArrayTemplate
|
|||
copyFromArray(JSContext *cx, JSObject *thisTypedArrayObj,
|
||||
HandleObject ar, uint32_t len, uint32_t offset = 0)
|
||||
{
|
||||
thisTypedArrayObj = getTypedArray(thisTypedArrayObj);
|
||||
JS_ASSERT(thisTypedArrayObj);
|
||||
|
||||
JS_ASSERT(thisTypedArrayObj->isTypedArray());
|
||||
JS_ASSERT(offset <= length(thisTypedArrayObj));
|
||||
JS_ASSERT(len <= length(thisTypedArrayObj) - offset);
|
||||
NativeType *dest = static_cast<NativeType*>(viewData(thisTypedArrayObj)) + offset;
|
||||
|
@ -1873,6 +1846,7 @@ class TypedArrayTemplate
|
|||
JS_ASSERT(ar->getArrayLength() == len);
|
||||
|
||||
const Value *src = ar->getDenseArrayElements();
|
||||
SkipRoot skipSrc(cx, &src);
|
||||
|
||||
/*
|
||||
* It is valid to skip the hole check here because nativeFromValue
|
||||
|
@ -1896,9 +1870,7 @@ class TypedArrayTemplate
|
|||
static bool
|
||||
copyFromTypedArray(JSContext *cx, JSObject *thisTypedArrayObj, JSObject *tarray, uint32_t offset)
|
||||
{
|
||||
thisTypedArrayObj = getTypedArray(thisTypedArrayObj);
|
||||
JS_ASSERT(thisTypedArrayObj);
|
||||
|
||||
JS_ASSERT(thisTypedArrayObj->isTypedArray());
|
||||
JS_ASSERT(offset <= length(thisTypedArrayObj));
|
||||
JS_ASSERT(length(tarray) <= length(thisTypedArrayObj) - offset);
|
||||
if (buffer(tarray) == buffer(thisTypedArrayObj))
|
||||
|
@ -2459,6 +2431,7 @@ DataViewObject::write(JSContext *cx, Handle<DataViewObject*> obj,
|
|||
}
|
||||
|
||||
uint8_t *data;
|
||||
SkipRoot skipData(cx, &data);
|
||||
if (!getDataPointer(cx, obj, args, sizeof(NativeType), &data))
|
||||
return false;
|
||||
|
||||
|
|
|
@ -159,11 +159,12 @@ DataViewObject::is(const Value &v)
|
|||
|
||||
inline DataViewObject *
|
||||
DataViewObject::create(JSContext *cx, uint32_t byteOffset, uint32_t byteLength,
|
||||
Handle<ArrayBufferObject*> arrayBuffer, JSObject *proto)
|
||||
Handle<ArrayBufferObject*> arrayBuffer, JSObject *protoArg)
|
||||
{
|
||||
JS_ASSERT(byteOffset <= INT32_MAX);
|
||||
JS_ASSERT(byteLength <= INT32_MAX);
|
||||
|
||||
RootedObject proto(cx, protoArg);
|
||||
RootedObject obj(cx, NewBuiltinClassInstance(cx, &DataViewClass));
|
||||
if (!obj)
|
||||
return NULL;
|
||||
|
|
|
@ -581,10 +581,14 @@ CrossCompartmentWrapper::hasOwn(JSContext *cx, JSObject *wrapper, jsid id, bool
|
|||
}
|
||||
|
||||
bool
|
||||
CrossCompartmentWrapper::get(JSContext *cx, JSObject *wrapper, JSObject *receiver, jsid id, Value *vp)
|
||||
CrossCompartmentWrapper::get(JSContext *cx, JSObject *wrapperArg, JSObject *receiverArg,
|
||||
jsid idArg, Value *vp)
|
||||
{
|
||||
RootedObject wrapper(cx, wrapperArg);
|
||||
RootedObject receiver(cx, receiverArg);
|
||||
RootedId id(cx, idArg);
|
||||
PIERCE(cx, wrapper, GET,
|
||||
call.destination->wrap(cx, &receiver) && call.destination->wrapId(cx, &id),
|
||||
call.destination->wrap(cx, receiver.address()) && call.destination->wrapId(cx, id.address()),
|
||||
DirectWrapper::get(cx, wrapper, receiver, id, vp),
|
||||
cx->compartment->wrap(cx, vp));
|
||||
}
|
||||
|
|
|
@ -110,6 +110,7 @@ def print_header_file(fd, conf):
|
|||
"#define _gen_mozilla_idl_dictionary_helpers_h_\n\n")
|
||||
|
||||
fd.write("#include \"jsapi.h\"\n"
|
||||
"#include \"nsDOMError.h\"\n"
|
||||
"#include \"nsString.h\"\n"
|
||||
"#include \"nsCOMPtr.h\"\n\n")
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
#include "nsSVGOuterSVGFrame.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "ScrollbarActivity.h"
|
||||
#include "nsRefreshDriver.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include "nsFontFaceLoader.h"
|
||||
|
||||
#include "nsDOMError.h"
|
||||
#include "nsError.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIStreamListener.h"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "nsTreeContentView.h"
|
||||
#include "nsChildIterator.h"
|
||||
#include "nsDOMClassInfoID.h"
|
||||
#include "nsDOMError.h"
|
||||
#include "nsEventStates.h"
|
||||
#include "nsINodeInfo.h"
|
||||
#include "nsIXULSortService.h"
|
||||
|
|
|
@ -106,7 +106,7 @@ abstract public class GeckoApp
|
|||
extends GeckoActivity
|
||||
implements GeckoEventListener, SensorEventListener, LocationListener,
|
||||
GeckoApplication.ApplicationLifecycleCallbacks,
|
||||
Tabs.OnTabsChangedListener
|
||||
Tabs.OnTabsChangedListener, GeckoEventResponder
|
||||
{
|
||||
private static final String LOGTAG = "GeckoApp";
|
||||
|
||||
|
@ -141,6 +141,7 @@ abstract public class GeckoApp
|
|||
public static boolean sIsGeckoReady = false;
|
||||
public static int mOrientation;
|
||||
private boolean mIsRestoringActivity;
|
||||
private String mCurrentResponse = "";
|
||||
|
||||
private GeckoConnectivityReceiver mConnectivityReceiver;
|
||||
private GeckoBatteryManager mBatteryReceiver;
|
||||
|
@ -1099,7 +1100,9 @@ abstract public class GeckoApp
|
|||
String launchPath = message.getString("launchPath");
|
||||
String iconURL = message.getString("iconURL");
|
||||
String uniqueURI = message.getString("uniqueURI");
|
||||
GeckoAppShell.createShortcut(name, launchPath, uniqueURI, iconURL, "webapp");
|
||||
|
||||
// installWebapp will return a File object pointing to the profile directory of the webapp
|
||||
mCurrentResponse = GeckoAppShell.installWebApp(name, launchPath, uniqueURI, iconURL).toString();
|
||||
} else if (event.equals("WebApps:Uninstall")) {
|
||||
String uniqueURI = message.getString("uniqueURI");
|
||||
GeckoAppShell.uninstallWebApp(uniqueURI);
|
||||
|
@ -1132,6 +1135,13 @@ abstract public class GeckoApp
|
|||
}
|
||||
}
|
||||
|
||||
public String getResponse() {
|
||||
Log.i(LOGTAG, "Return " + mCurrentResponse);
|
||||
String res = mCurrentResponse;
|
||||
mCurrentResponse = "";
|
||||
return res;
|
||||
}
|
||||
|
||||
void onStatePurged() { }
|
||||
|
||||
/**
|
||||
|
|
|
@ -794,6 +794,13 @@ public class GeckoAppShell
|
|||
gRestartScheduled = true;
|
||||
}
|
||||
|
||||
public static File installWebApp(String aTitle, String aURI, String aUniqueURI, String aIconURL) {
|
||||
int index = WebAppAllocator.getInstance(GeckoApp.mAppContext).findAndAllocateIndex(aUniqueURI);
|
||||
GeckoProfile profile = GeckoProfile.get(GeckoApp.mAppContext, "webapp" + index);
|
||||
createShortcut(aTitle, aURI, aUniqueURI, aIconURL, "webapp");
|
||||
return profile.getDir();
|
||||
}
|
||||
|
||||
public static Intent getWebAppIntent(String aURI, String aUniqueURI, boolean forInstall) {
|
||||
int index;
|
||||
|
||||
|
|
|
@ -5918,7 +5918,7 @@ var WebappsUI = {
|
|||
}).bind(this));
|
||||
break;
|
||||
case "webapps-sync-install":
|
||||
// Wait until we know the app install worked, then make a homescreen shortcut
|
||||
// Create a system notification allowing the user to launch the app
|
||||
DOMApplicationRegistry.getManifestFor(data.origin, (function(aManifest) {
|
||||
if (!aManifest)
|
||||
return;
|
||||
|
@ -5930,21 +5930,6 @@ var WebappsUI = {
|
|||
let name = manifest.name ? converter.ConvertToUnicode(manifest.name) :
|
||||
converter.ConvertToUnicode(manifest.fullLaunchPath());
|
||||
|
||||
// Add a homescreen shortcut -- we can't use createShortcut, since we need to pass
|
||||
// a unique ID for Android webapp allocation
|
||||
this.makeBase64Icon(this.getBiggestIcon(manifest.icons, Services.io.newURI(data.origin, null, null)),
|
||||
function(icon) {
|
||||
sendMessageToJava({
|
||||
gecko: {
|
||||
type: "WebApps:Install",
|
||||
name: name,
|
||||
launchPath: manifest.fullLaunchPath(),
|
||||
iconURL: icon,
|
||||
uniqueURI: data.origin
|
||||
}
|
||||
})});
|
||||
|
||||
// Create a system notification allowing the user to launch the app
|
||||
let observer = {
|
||||
observe: function (aSubject, aTopic) {
|
||||
if (aTopic == "alertclickcallback") {
|
||||
|
@ -6005,10 +5990,32 @@ var WebappsUI = {
|
|||
doInstall: function doInstall(aData) {
|
||||
let manifest = new DOMApplicationManifest(aData.app.manifest, aData.app.origin);
|
||||
let name = manifest.name ? manifest.name : manifest.fullLaunchPath();
|
||||
if (Services.prompt.confirm(null, Strings.browser.GetStringFromName("webapps.installTitle"), name))
|
||||
DOMApplicationRegistry.confirmInstall(aData);
|
||||
else
|
||||
if (Services.prompt.confirm(null, Strings.browser.GetStringFromName("webapps.installTitle"), name)) {
|
||||
// Add a homescreen shortcut -- we can't use createShortcut, since we need to pass
|
||||
// a unique ID for Android webapp allocation
|
||||
this.makeBase64Icon(this.getBiggestIcon(manifest.icons, Services.io.newURI(aData.app.origin, null, null)),
|
||||
function(icon) {
|
||||
var profilePath = sendMessageToJava({
|
||||
gecko: {
|
||||
type: "WebApps:Install",
|
||||
name: manifest.name,
|
||||
launchPath: manifest.fullLaunchPath(),
|
||||
iconURL: icon,
|
||||
uniqueURI: aData.app.origin
|
||||
}
|
||||
});
|
||||
|
||||
// if java returned a profile path to us, try to use it to pre-populate the app cache
|
||||
var file = null;
|
||||
if (profilePath) {
|
||||
var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
|
||||
file.initWithPath(profilePath);
|
||||
}
|
||||
DOMApplicationRegistry.confirmInstall(aData, false, file);
|
||||
});
|
||||
} else {
|
||||
DOMApplicationRegistry.denyInstall(aData);
|
||||
}
|
||||
},
|
||||
|
||||
openURL: function openURL(aURI, aOrigin) {
|
||||
|
|
|
@ -3660,3 +3660,7 @@ pref("memory.low_memory_notification_interval_ms", 10000);
|
|||
pref("memory.ghost_window_timeout_seconds", 60);
|
||||
|
||||
pref("social.enabled", false);
|
||||
|
||||
// Disable idle observer fuzz, because only privileged content can access idle
|
||||
// observers (bug 780507).
|
||||
pref("dom.idle-observers-api.fuzz_time.disabled", true);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsDOMError.h"
|
||||
#include "nsHtml5TreeOpExecutor.h"
|
||||
#include "nsScriptLoader.h"
|
||||
#include "nsIMarkupDocumentViewer.h"
|
||||
|
|
Загрузка…
Ссылка в новой задаче