import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1140131 - When XPConnect loads scripts (JS components or Cu.import), set the MIME type so that we don't load the exthandler service to guess it, r=bholley (0ab34e729)
- Bug 1164982 - Record telemetry for GC max pause during animations; r=sfink (aab107db0)
- Bug 1171305 - Remove lots of now-unnecessary null-checks involving XPCMaps. r=mrbkap. (7e64f2a60)
- Bug 1170934 (part 1) - Remove PLDHashTable::{Init,Fini}(). r=froydnj. (554061e2e)
- Bug 1170934 (part 2) - Fix the comment for PL_DHashTableRemove(). r=froydnj. (34ddb176b)
- Bug 1171323 - Remove PL_DHashFreeStringKey(), because it's dead. r=froydnj. (4fd00ebe1)
- Bug 1138848 - Modify OneCRL blocklist for subject / public key blocking (r=keeler, unfocused) (54b7f3d9d)
- Bug 1173212 (part 1) - Remove some can't-fail tests in PLDHashTable. r=froydnj. (4b4642c4a)
- Bug 1173212 (part 2) - Make PLDHashTable::Iterator work in chaos mode. r=froydnj. (17b6777fa)
- Bug 1173600 (part 1) - Tweak PLDHashTable post-enumeration shrinking. r=froydnj. (a21ba3a63)
- Bug 1173600 (part 2) - Move post-enumeration shrinking code into its own function. r=froydnj. (87f64a10f)
- Bug 1174046 - Fix PLDHashTable::Iterator in chaos mode again. r=froydnj, a=philor (69ed3b9b1)
- Bug 1158366: Remove nsIDOMHTML[BR|Div|Heading|TableCaption|Table|Title]Element.idl. r=ehsan (ccc80f0b1)
- Bug 1167189: Add an infallible version of nsContentUtils::GetNodeTextContent. r=jst (5c464322a)
- Bug 1169800 - nsContentUtils::ParseLegacyFontSize should check when the input string is just '+' or '-', r=dveditz (c5d5e870e)
- Bug 1170328 - Mark nsIDocument::WarnOnceAbout() with const. r=smaug (41b39009c)
- Bug 1139640: Change DOM property for -moz-osx-font-smoothing to match standard camel-casing algorithm. r=jdaggett (5f2eb6c59)
- Bug 1140148 - Update mochitest manifests for Android 4.3 emulator; r=dminor (04a28ac92)
- partial of Bug 1116187 - Disable failing mochitest-chrome tests for B2G (0ca9f0e25)
- Bug 1157097 - Don't share a style context that will have its cached style data cleared. r=dbaron (d5adcb047)
- Bug 1160724 - Part 1: Resolve a properly parented style context when looking up -moz-binding of a display:none XUL/plugin element. r=dbaron (599665d4d)
- Bug 1160724 - Part 2: Test that we resolve a properly parented style context when looking up -moz-binding of a display:none XUL/plugin element. r=heycam (87fe13c8d)
This commit is contained in:
2021-01-15 14:07:12 +08:00
parent 6fcd6870bb
commit d8dded16af
166 changed files with 865 additions and 753 deletions
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
file_disableScript.html
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
662200a.html
662200b.html
+1 -1
View File
@@ -45,7 +45,7 @@ skip-if = (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop spec
[test_popup-navigates-children.html]
skip-if = buildapp == 'b2g' # b2g(Needs multiple window.open support, also uses docshelltreenode) b2g-debug(Needs multiple window.open support, also uses docshelltreenode) b2g-desktop(Needs multiple window.open support, also uses docshelltreenode)
[test_reserved.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || android_version == '10' #too slow on Android 2.3 aws only; bug 1030403
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || android_version == '10' || android_version == '18' #too slow on Android 2.3 and 4.3 aws only; bug 1030403
[test_sessionhistory.html]
skip-if = (buildapp == 'b2g' && (toolkit != 'gonk' || debug)) || toolkit == 'android' #RANDOM # b2g-debug(Perma-orange on debug emulator builds) b2g-desktop(Bug 931116, b2g desktop specific, initial triage)
[test_sibling-matching-parent.html]
+1
View File
@@ -1,2 +1,3 @@
[chrome/test_animation_observers.html]
[chrome/test_running_on_compositor.html]
skip-if = buildapp == 'b2g'
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
asmjs/*
file_bug_945152.html
+4 -6
View File
@@ -139,6 +139,7 @@
#include "mozilla/dom/WindowBinding.h"
#include "mozilla/dom/ElementBinding.h"
#include "mozilla/dom/VRDevice.h"
#include "nsComputedDOMStyle.h"
using namespace mozilla;
using namespace mozilla::dom;
@@ -391,7 +392,7 @@ Element::GetBindingURL(nsIDocument *aDocument, css::URLValue **aResult)
IsHTMLElement(nsGkAtoms::object) ||
IsHTMLElement(nsGkAtoms::embed) ||
IsHTMLElement(nsGkAtoms::applet));
nsIPresShell *shell = aDocument->GetShell();
nsCOMPtr<nsIPresShell> shell = aDocument->GetShell();
if (!shell || GetPrimaryFrame() || !isXULorPluginElement) {
*aResult = nullptr;
@@ -399,11 +400,8 @@ Element::GetBindingURL(nsIDocument *aDocument, css::URLValue **aResult)
}
// Get the computed -moz-binding directly from the style context
nsPresContext *pctx = shell->GetPresContext();
NS_ENSURE_TRUE(pctx, false);
nsRefPtr<nsStyleContext> sc = pctx->StyleSet()->ResolveStyleFor(this,
nullptr);
nsRefPtr<nsStyleContext> sc =
nsComputedDOMStyle::GetStyleContextForElementNoFlush(this, nullptr, shell);
NS_ENSURE_TRUE(sc, false);
*aResult = sc->StyleDisplay()->mBinding;
+1 -1
View File
@@ -1156,7 +1156,7 @@ void
FragmentOrElement::GetTextContentInternal(nsAString& aTextContent,
ErrorResult& aError)
{
if(!nsContentUtils::GetNodeTextContent(this, true, aTextContent)) {
if(!nsContentUtils::GetNodeTextContent(this, true, aTextContent, fallible)) {
aError.Throw(NS_ERROR_OUT_OF_MEMORY);
}
}
+14 -5
View File
@@ -1685,7 +1685,7 @@ nsContentUtils::ParseLegacyFontSize(const nsAString& aValue)
++iter;
}
if (*iter < char16_t('0') || *iter > char16_t('9')) {
if (iter == end || *iter < char16_t('0') || *iter > char16_t('9')) {
return 0;
}
@@ -3364,7 +3364,7 @@ nsContentUtils::LogSimpleConsoleError(const nsAString& aErrorText,
/* static */ nsresult
nsContentUtils::ReportToConsole(uint32_t aErrorFlags,
const nsACString& aCategory,
nsIDocument* aDocument,
const nsIDocument* aDocument,
PropertiesFile aFile,
const char *aMessageName,
const char16_t **aParams,
@@ -3399,7 +3399,7 @@ nsContentUtils::ReportToConsole(uint32_t aErrorFlags,
nsContentUtils::ReportToConsoleNonLocalized(const nsAString& aErrorText,
uint32_t aErrorFlags,
const nsACString& aCategory,
nsIDocument* aDocument,
const nsIDocument* aDocument,
nsIURI* aURI,
const nsAFlatString& aSourceLine,
uint32_t aLineNumber,
@@ -7125,10 +7125,19 @@ nsContentUtils::DOMWindowDumpEnabled()
}
bool
nsContentUtils::GetNodeTextContent(nsINode* aNode, bool aDeep, nsAString& aResult)
nsContentUtils::GetNodeTextContent(nsINode* aNode, bool aDeep, nsAString& aResult,
const fallible_t& aFallible)
{
aResult.Truncate();
return AppendNodeTextContent(aNode, aDeep, aResult, fallible);
return AppendNodeTextContent(aNode, aDeep, aResult, aFallible);
}
void
nsContentUtils::GetNodeTextContent(nsINode* aNode, bool aDeep, nsAString& aResult)
{
if (!GetNodeTextContent(aNode, aDeep, aResult, fallible)) {
NS_ABORT_OOM(0); // Unfortunately we don't know the allocation size
}
}
void
+5 -2
View File
@@ -775,7 +775,7 @@ public:
static nsresult ReportToConsoleNonLocalized(const nsAString& aErrorText,
uint32_t aErrorFlags,
const nsACString& aCategory,
nsIDocument* aDocument,
const nsIDocument* aDocument,
nsIURI* aURI = nullptr,
const nsAFlatString& aSourceLine
= EmptyString(),
@@ -820,7 +820,7 @@ public:
};
static nsresult ReportToConsole(uint32_t aErrorFlags,
const nsACString& aCategory,
nsIDocument* aDocument,
const nsIDocument* aDocument,
PropertiesFile aFile,
const char *aMessageName,
const char16_t **aParams = nullptr,
@@ -1339,6 +1339,9 @@ public:
*/
MOZ_WARN_UNUSED_RESULT
static bool GetNodeTextContent(nsINode* aNode, bool aDeep,
nsAString& aResult, const mozilla::fallible_t&);
static void GetNodeTextContent(nsINode* aNode, bool aDeep,
nsAString& aResult);
/**
+8 -8
View File
@@ -7084,8 +7084,7 @@ nsDocument::GetTitleFromElement(uint32_t aNamespace, nsAString& aTitle)
nsIContent* title = GetTitleContent(aNamespace);
if (!title)
return;
if(!nsContentUtils::GetNodeTextContent(title, false, aTitle))
NS_RUNTIMEABORT("OOM");
nsContentUtils::GetNodeTextContent(title, false, aTitle);
}
NS_IMETHODIMP
@@ -7542,9 +7541,8 @@ nsDocument::GetInputEncoding(nsAString& aInputEncoding)
}
void
nsIDocument::GetInputEncoding(nsAString& aInputEncoding)
nsIDocument::GetInputEncoding(nsAString& aInputEncoding) const
{
// Not const function, because WarnOnceAbout is not a const method
WarnOnceAbout(eInputEncoding);
if (mHaveInputEncoding) {
return GetCharacterSet(aInputEncoding);
@@ -10403,7 +10401,7 @@ static const char* kDocumentWarnings[] = {
#undef DOCUMENT_WARNING
bool
nsIDocument::HasWarnedAbout(DeprecatedOperations aOperation)
nsIDocument::HasWarnedAbout(DeprecatedOperations aOperation) const
{
static_assert(eDeprecatedOperationCount <= 64,
"Too many deprecated operations");
@@ -10412,8 +10410,9 @@ nsIDocument::HasWarnedAbout(DeprecatedOperations aOperation)
void
nsIDocument::WarnOnceAbout(DeprecatedOperations aOperation,
bool asError /* = false */)
bool asError /* = false */) const
{
MOZ_ASSERT(NS_IsMainThread());
if (HasWarnedAbout(aOperation)) {
return;
}
@@ -10427,7 +10426,7 @@ nsIDocument::WarnOnceAbout(DeprecatedOperations aOperation,
}
bool
nsIDocument::HasWarnedAbout(DocumentWarnings aWarning)
nsIDocument::HasWarnedAbout(DocumentWarnings aWarning) const
{
static_assert(eDocumentWarningCount <= 64,
"Too many document warnings");
@@ -10438,8 +10437,9 @@ void
nsIDocument::WarnOnceAbout(DocumentWarnings aWarning,
bool asError /* = false */,
const char16_t **aParams /* = nullptr */,
uint32_t aParamsLength /* = 0 */)
uint32_t aParamsLength /* = 0 */) const
{
MOZ_ASSERT(NS_IsMainThread());
if (HasWarnedAbout(aWarning)) {
return;
}
+12 -11
View File
@@ -1065,7 +1065,7 @@ public:
/**
* Return the inner window ID.
*/
uint64_t InnerWindowID()
uint64_t InnerWindowID() const
{
nsPIDOMWindow *window = GetInnerWindow();
return window ? window->WindowID() : 0;
@@ -2216,8 +2216,9 @@ public:
eDeprecatedOperationCount
};
#undef DEPRECATED_OPERATION
bool HasWarnedAbout(DeprecatedOperations aOperation);
void WarnOnceAbout(DeprecatedOperations aOperation, bool asError = false);
bool HasWarnedAbout(DeprecatedOperations aOperation) const;
void WarnOnceAbout(DeprecatedOperations aOperation,
bool asError = false) const;
#define DOCUMENT_WARNING(_op) e##_op,
enum DocumentWarnings {
@@ -2225,11 +2226,11 @@ public:
eDocumentWarningCount
};
#undef DOCUMENT_WARNING
bool HasWarnedAbout(DocumentWarnings aWarning);
bool HasWarnedAbout(DocumentWarnings aWarning) const;
void WarnOnceAbout(DocumentWarnings aWarning,
bool asError = false,
const char16_t **aParams = nullptr,
uint32_t aParamsLength = 0);
uint32_t aParamsLength = 0) const;
virtual void PostVisibilityUpdateEvent() = 0;
@@ -2429,7 +2430,7 @@ public:
CreateAttributeNS(const nsAString& aNamespaceURI,
const nsAString& aQualifiedName,
mozilla::ErrorResult& rv);
void GetInputEncoding(nsAString& aInputEncoding);
void GetInputEncoding(nsAString& aInputEncoding) const;
already_AddRefed<nsLocation> GetLocation() const;
void GetReferrer(nsAString& aReferrer) const;
void GetLastModified(nsAString& aLastModified) const;
@@ -2474,16 +2475,16 @@ public:
{
return mVisibilityState != mozilla::dom::VisibilityState::Visible;
}
bool MozHidden() // Not const because of WarnOnceAbout
bool MozHidden() const
{
WarnOnceAbout(ePrefixedVisibilityAPI);
return Hidden();
}
mozilla::dom::VisibilityState VisibilityState()
mozilla::dom::VisibilityState VisibilityState() const
{
return mVisibilityState;
}
mozilla::dom::VisibilityState MozVisibilityState()
mozilla::dom::VisibilityState MozVisibilityState() const
{
WarnOnceAbout(ePrefixedVisibilityAPI);
return VisibilityState();
@@ -2615,8 +2616,8 @@ public:
bool InlineScriptAllowedByCSP();
private:
uint64_t mDeprecationWarnedAbout;
uint64_t mDocWarningWarnedAbout;
mutable uint64_t mDeprecationWarnedAbout;
mutable uint64_t mDocWarningWarnedAbout;
SelectorCache mSelectorCache;
protected:
+1 -1
View File
@@ -404,7 +404,7 @@ nsStyleLinkElement::DoUpdateStyleSheet(nsIDocument* aOldDocument,
nsresult rv = NS_OK;
if (isInline) {
nsAutoString text;
if (!nsContentUtils::GetNodeTextContent(thisContent, false, text)) {
if (!nsContentUtils::GetNodeTextContent(thisContent, false, text, fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
+2 -3
View File
@@ -1396,9 +1396,8 @@ nsTreeSanitizer::SanitizeChildren(nsINode* aRoot)
NS_ASSERTION(ns == kNameSpaceID_XHTML || ns == kNameSpaceID_SVG,
"Should have only HTML or SVG here!");
nsAutoString styleText;
if (!nsContentUtils::GetNodeTextContent(node, false, styleText)) {
NS_RUNTIMEABORT("OOM");
}
nsContentUtils::GetNodeTextContent(node, false, styleText);
nsAutoString sanitizedStyle;
nsCOMPtr<nsIURI> baseURI = node->GetBaseURI();
if (SanitizeStyleSheet(styleText,
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
file_url.jsm
file_empty.html
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
blockNoPlugins.xml
blockPluginHard.xml
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
[test_csp_bug768029.html]
[test_csp_bug773891.html]
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
[test_bug707564-chrome.html]
[test_bug775543.html]
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files = nonchrome_webgl_debug_renderer_info.html
[test_webgl_debug_renderer_info.html]
+1 -1
View File
@@ -19,7 +19,7 @@ skip-if = (os == 'b2g') || buildapp == 'mulet' # Mulet - bug 1093639 (crashes in
[webgl-mochitest/test_implicit_color_buffer_float.html]
[webgl-mochitest/test_highp_fs.html]
[webgl-mochitest/test_no_arr_points.html]
skip-if = android_version == '10' #Android 2.3 aws only; bug 1030942
skip-if = android_version == '10' || android_version == '18' #Android 2.3 and 4.3 aws only; bug 1030942
[webgl-mochitest/test_noprog_draw.html]
[webgl-mochitest/test_privileged_exts.html]
[webgl-mochitest/test_texsubimage_float.html]
+1
View File
@@ -1,5 +1,6 @@
[DEFAULT]
skip-if = os == "android"
skip-if = buildapp == 'b2g'
[test_contacts_shutdown.xul]
[test_contacts_upgrade.xul]
+1 -1
View File
@@ -1,5 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'mulet'
skip-if = (buildapp == 'b2g' || buildapp == 'mulet')
[test_app_permissions.html]
[test_fs_app_permissions.html]
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files = file_stringencoding.jsm
[test_stringencoding.xul]
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
bug415498-doc1.html
bug415498-doc2.html
+1 -1
View File
@@ -351,7 +351,7 @@ IMPL_URI_PART(Hash)
NS_IMETHODIMP
HTMLAnchorElement::GetText(nsAString& aText)
{
if(!nsContentUtils::GetNodeTextContent(this, true, aText)) {
if(!nsContentUtils::GetNodeTextContent(this, true, aText, fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
return NS_OK;
-6
View File
@@ -27,14 +27,8 @@ HTMLBRElement::~HTMLBRElement()
{
}
NS_IMPL_ISUPPORTS_INHERITED(HTMLBRElement, nsGenericHTMLElement,
nsIDOMHTMLBRElement)
NS_IMPL_ELEMENT_CLONE(HTMLBRElement)
NS_IMPL_STRING_ATTR(HTMLBRElement, Clear, clear)
static const nsAttrValue::EnumTable kClearTable[] = {
{ "left", NS_STYLE_CLEAR_LEFT },
{ "right", NS_STYLE_CLEAR_RIGHT },
+5 -9
View File
@@ -8,25 +8,17 @@
#define mozilla_dom_HTMLBRElement_h
#include "mozilla/Attributes.h"
#include "nsIDOMHTMLBRElement.h"
#include "nsGenericHTMLElement.h"
#include "nsGkAtoms.h"
namespace mozilla {
namespace dom {
class HTMLBRElement final : public nsGenericHTMLElement,
public nsIDOMHTMLBRElement
class HTMLBRElement final : public nsGenericHTMLElement
{
public:
explicit HTMLBRElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMHTMLBRElement
NS_DECL_NSIDOMHTMLBRELEMENT
virtual bool ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
@@ -43,6 +35,10 @@ public:
{
return SetHTMLAttr(nsGkAtoms::clear, aClear, aError);
}
void GetClear(DOMString& aClear) const
{
return GetHTMLAttr(nsGkAtoms::clear, aClear);
}
virtual JSObject* WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto) override;
-3
View File
@@ -19,9 +19,6 @@ HTMLDivElement::~HTMLDivElement()
{
}
NS_IMPL_ISUPPORTS_INHERITED(HTMLDivElement, nsGenericHTMLElement,
nsIDOMHTMLDivElement)
NS_IMPL_ELEMENT_CLONE(HTMLDivElement)
JSObject*
+1 -21
View File
@@ -8,13 +8,11 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLDivElement.h"
namespace mozilla {
namespace dom {
class HTMLDivElement final : public nsGenericHTMLElement,
public nsIDOMHTMLDivElement
class HTMLDivElement final : public nsGenericHTMLElement
{
public:
explicit HTMLDivElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
@@ -22,24 +20,6 @@ public:
{
}
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMHTMLDivElement
NS_IMETHOD GetAlign(nsAString& aAlign) override
{
DOMString align;
GetAlign(align);
align.ToString(aAlign);
return NS_OK;
}
NS_IMETHOD SetAlign(const nsAString& aAlign) override
{
mozilla::ErrorResult rv;
SetAlign(aAlign, rv);
return rv.StealNSResult();
}
void GetAlign(DOMString& aAlign)
{
GetHTMLAttr(nsGkAtoms::align, aAlign);
+1 -1
View File
@@ -49,7 +49,7 @@ HTMLElement::GetInnerHTML(nsAString& aInnerHTML)
*/
if (mNodeInfo->Equals(nsGkAtoms::xmp) ||
mNodeInfo->Equals(nsGkAtoms::plaintext)) {
if (!nsContentUtils::GetNodeTextContent(this, false, aInnerHTML)) {
if (!nsContentUtils::GetNodeTextContent(this, false, aInnerHTML, fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
return NS_OK;
-6
View File
@@ -22,9 +22,6 @@ HTMLHeadingElement::~HTMLHeadingElement()
{
}
NS_IMPL_ISUPPORTS_INHERITED(HTMLHeadingElement, nsGenericHTMLElement,
nsIDOMHTMLHeadingElement)
NS_IMPL_ELEMENT_CLONE(HTMLHeadingElement)
JSObject*
@@ -33,9 +30,6 @@ HTMLHeadingElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
return HTMLHeadingElementBinding::Wrap(aCx, this, aGivenProto);
}
NS_IMPL_STRING_ATTR(HTMLHeadingElement, Align, align)
bool
HTMLHeadingElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
+9 -11
View File
@@ -8,14 +8,12 @@
#define mozilla_dom_HTMLHeadingElement_h
#include "mozilla/Attributes.h"
#include "nsIDOMHTMLHeadingElement.h"
#include "nsGenericHTMLElement.h"
namespace mozilla {
namespace dom {
class HTMLHeadingElement final : public nsGenericHTMLElement,
public nsIDOMHTMLHeadingElement
class HTMLHeadingElement final : public nsGenericHTMLElement
{
public:
explicit HTMLHeadingElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
@@ -23,12 +21,6 @@ public:
{
}
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMHTMLHeadingElement
NS_DECL_NSIDOMHTMLHEADINGELEMENT
virtual bool ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
@@ -37,8 +29,14 @@ public:
nsMapRuleToAttributesFunc GetAttributeMappingFunction() const override;
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
// The XPCOM versions of GetAlign and SetAlign are fine for us for
// use from WebIDL.
void SetAlign(const nsAString& aAlign, ErrorResult& aError)
{
return SetHTMLAttr(nsGkAtoms::align, aAlign, aError);
}
void GetAlign(DOMString& aAlign) const
{
return GetHTMLAttr(nsGkAtoms::align, aAlign);
}
protected:
virtual ~HTMLHeadingElement();
+1 -3
View File
@@ -372,9 +372,7 @@ void
HTMLMenuItemElement::GetText(nsAString& aText)
{
nsAutoString text;
if (!nsContentUtils::GetNodeTextContent(this, false, text)) {
NS_RUNTIMEABORT("OOM");
}
nsContentUtils::GetNodeTextContent(this, false, text);
text.CompressWhitespace(true, true);
aText = text;
+2 -6
View File
@@ -147,9 +147,7 @@ HTMLOutputElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent,
void
HTMLOutputElement::GetValue(nsAString& aValue)
{
if (!nsContentUtils::GetNodeTextContent(this, true, aValue)) {
NS_RUNTIMEABORT("OOM");
}
nsContentUtils::GetNodeTextContent(this, true, aValue);
}
void
@@ -180,9 +178,7 @@ HTMLOutputElement::HtmlFor()
void HTMLOutputElement::DescendantsChanged()
{
if (mIsDoneAddingChildren && mValueModeFlag == eModeDefault) {
if (!nsContentUtils::GetNodeTextContent(this, true, mDefaultValue)) {
NS_RUNTIMEABORT("OOM");
}
nsContentUtils::GetNodeTextContent(this, true, mDefaultValue);
}
}
+2 -2
View File
@@ -110,7 +110,7 @@ HTMLScriptElement::Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) c
NS_IMETHODIMP
HTMLScriptElement::GetText(nsAString& aValue)
{
if (!nsContentUtils::GetNodeTextContent(this, false, aValue)) {
if (!nsContentUtils::GetNodeTextContent(this, false, aValue, fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
return NS_OK;
@@ -222,7 +222,7 @@ HTMLScriptElement::AfterSetAttr(int32_t aNamespaceID, nsIAtom* aName,
NS_IMETHODIMP
HTMLScriptElement::GetInnerHTML(nsAString& aInnerHTML)
{
if (!nsContentUtils::GetNodeTextContent(this, false, aInnerHTML)) {
if (!nsContentUtils::GetNodeTextContent(this, false, aInnerHTML, fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
return NS_OK;
+1 -1
View File
@@ -194,7 +194,7 @@ HTMLStyleElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
NS_IMETHODIMP
HTMLStyleElement::GetInnerHTML(nsAString& aInnerHTML)
{
if (!nsContentUtils::GetNodeTextContent(this, false, aInnerHTML)) {
if (!nsContentUtils::GetNodeTextContent(this, false, aInnerHTML, fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
return NS_OK;
-5
View File
@@ -25,13 +25,8 @@ HTMLTableCaptionElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenPr
return HTMLTableCaptionElementBinding::Wrap(aCx, this, aGivenProto);
}
NS_IMPL_ISUPPORTS_INHERITED(HTMLTableCaptionElement, nsGenericHTMLElement,
nsIDOMHTMLTableCaptionElement)
NS_IMPL_ELEMENT_CLONE(HTMLTableCaptionElement)
NS_IMPL_STRING_ATTR(HTMLTableCaptionElement, Align, align)
static const nsAttrValue::EnumTable kCaptionAlignTable[] = {
{ "left", NS_STYLE_CAPTION_SIDE_LEFT },
{ "right", NS_STYLE_CAPTION_SIDE_RIGHT },
+1 -9
View File
@@ -8,13 +8,11 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLTableCaptionElem.h"
namespace mozilla {
namespace dom {
class HTMLTableCaptionElement final : public nsGenericHTMLElement,
public nsIDOMHTMLTableCaptionElement
class HTMLTableCaptionElement final : public nsGenericHTMLElement
{
public:
explicit HTMLTableCaptionElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
@@ -23,12 +21,6 @@ public:
SetHasWeirdParserInsertionMode();
}
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMHTMLTableCaptionElement
NS_DECL_NSIDOMHTMLTABLECAPTIONELEMENT
void GetAlign(DOMString& aAlign)
{
GetHTMLAttr(nsGkAtoms::align, aAlign);
+2 -3
View File
@@ -327,9 +327,8 @@ NS_IMPL_ADDREF_INHERITED(HTMLTableElement, Element)
NS_IMPL_RELEASE_INHERITED(HTMLTableElement, Element)
// QueryInterface implementation for HTMLTableElement
NS_INTERFACE_TABLE_HEAD_CYCLE_COLLECTION_INHERITED(HTMLTableElement)
NS_INTERFACE_TABLE_INHERITED(HTMLTableElement, nsIDOMHTMLTableElement)
NS_INTERFACE_TABLE_TAIL_INHERITING(nsGenericHTMLElement)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(HTMLTableElement)
NS_INTERFACE_MAP_END_INHERITING(nsGenericHTMLElement)
NS_IMPL_ELEMENT_CLONE(HTMLTableElement)
+1 -3
View File
@@ -8,7 +8,6 @@
#include "mozilla/Attributes.h"
#include "nsGenericHTMLElement.h"
#include "nsIDOMHTMLTableElement.h"
#include "mozilla/dom/HTMLTableCaptionElement.h"
#include "mozilla/dom/HTMLTableSectionElement.h"
@@ -19,8 +18,7 @@ namespace dom {
class TableRowsCollection;
class HTMLTableElement final : public nsGenericHTMLElement,
public nsIDOMHTMLTableElement
class HTMLTableElement final : public nsGenericHTMLElement
{
public:
explicit HTMLTableElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
+1 -1
View File
@@ -362,7 +362,7 @@ HTMLTextAreaElement::SetValueChanged(bool aValueChanged)
NS_IMETHODIMP
HTMLTextAreaElement::GetDefaultValue(nsAString& aDefaultValue)
{
if (!nsContentUtils::GetNodeTextContent(this, false, aDefaultValue)) {
if (!nsContentUtils::GetNodeTextContent(this, false, aDefaultValue, fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
return NS_OK;
+8 -10
View File
@@ -29,7 +29,7 @@ HTMLTitleElement::~HTMLTitleElement()
}
NS_IMPL_ISUPPORTS_INHERITED(HTMLTitleElement, nsGenericHTMLElement,
nsIDOMHTMLTitleElement, nsIMutationObserver)
nsIMutationObserver)
NS_IMPL_ELEMENT_CLONE(HTMLTitleElement)
@@ -39,20 +39,18 @@ HTMLTitleElement::WrapNode(JSContext* cx, JS::Handle<JSObject*> aGivenProto)
return HTMLTitleElementBinding::Wrap(cx, this, aGivenProto);
}
NS_IMETHODIMP
HTMLTitleElement::GetText(nsAString& aTitle)
void
HTMLTitleElement::GetText(DOMString& aText, ErrorResult& aError)
{
if (!nsContentUtils::GetNodeTextContent(this, false, aTitle)) {
return NS_ERROR_OUT_OF_MEMORY;
if (!nsContentUtils::GetNodeTextContent(this, false, aText, fallible)) {
aError = NS_ERROR_OUT_OF_MEMORY;
}
return NS_OK;
}
NS_IMETHODIMP
HTMLTitleElement::SetText(const nsAString& aTitle)
void
HTMLTitleElement::SetText(const nsAString& aText, ErrorResult& aError)
{
return nsContentUtils::SetNodeTextContent(this, aTitle, true);
aError = nsContentUtils::SetNodeTextContent(this, aText, true);
}
void
+2 -10
View File
@@ -8,7 +8,6 @@
#define mozilla_dom_HTMLTITLEElement_h_
#include "mozilla/Attributes.h"
#include "nsIDOMHTMLTitleElement.h"
#include "nsGenericHTMLElement.h"
#include "nsStubMutationObserver.h"
@@ -18,7 +17,6 @@ class ErrorResult;
namespace dom {
class HTMLTitleElement final : public nsGenericHTMLElement,
public nsIDOMHTMLTitleElement,
public nsStubMutationObserver
{
public:
@@ -30,15 +28,9 @@ public:
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMHTMLTitleElement
NS_DECL_NSIDOMHTMLTITLEELEMENT
//HTMLTitleElement
//The xpcom GetTextContent() never fails so we just use that.
void SetText(const nsAString& aText, ErrorResult& aError)
{
aError = SetText(aText);
}
void GetText(DOMString& aText, ErrorResult& aError);
void SetText(const nsAString& aText, ErrorResult& aError);
// nsIMutationObserver
NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATACHANGED
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
file_anchor_ping.html
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
submit_invalid_file.sjs
[test_autocompleteinfo.html]
+3 -3
View File
@@ -28,13 +28,13 @@ skip-if = buildapp == 'mulet'
[test_input_color_picker_initial.html]
skip-if = buildapp == 'mulet'
[test_input_color_picker_popup.html]
skip-if = buildapp == 'mulet'
skip-if = buildapp == 'mulet' || android_version == '18' # Android, bug 1147974
[test_input_color_picker_update.html]
skip-if = buildapp == 'mulet'
skip-if = buildapp == 'mulet' || android_version == '18' # Android, bug 1147974
[test_input_defaultValue.html]
[test_input_email.html]
[test_input_event.html]
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && toolkit != 'gonk') #Bug 931116, b2g desktop and mulet specific, initial triage
skip-if = buildapp == 'mulet' || (buildapp == 'b2g' && toolkit != 'gonk') || android_version == '18' #Bug 931116, b2g desktop and mulet specific, initial triage; on Android, bug 1147974
[test_input_file_picker.html]
skip-if = buildapp == 'b2g' # b2g(5 failures out of 139 and timing out, bug 901581) b2g-debug(5 failures out of 139 and timing out, bug 901581) b2g-desktop(5 failures out of 139 and timing out, bug 901581)
[test_input_list_attribute.html]
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files=
file_browserid_rp_ok.html
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files = chromeHelpers.js
[test_globalObjects_chrome.xul]
-1
View File
@@ -69,7 +69,6 @@ interface nsIDOMCounter;
interface nsIDOMRect;
interface nsIDOMCSSStyleRule;
interface nsIDOMCSSStyleRuleCollection;
interface nsIDOMHTMLTableCaptionElement;
// Range
interface nsIDOMRange;
-6
View File
@@ -10,12 +10,10 @@ XPIDL_SOURCES += [
'nsIDOMHTMLAreaElement.idl',
'nsIDOMHTMLBaseElement.idl',
'nsIDOMHTMLBodyElement.idl',
'nsIDOMHTMLBRElement.idl',
'nsIDOMHTMLButtonElement.idl',
'nsIDOMHTMLCanvasElement.idl',
'nsIDOMHTMLCollection.idl',
'nsIDOMHTMLDirectoryElement.idl',
'nsIDOMHTMLDivElement.idl',
'nsIDOMHTMLDocument.idl',
'nsIDOMHTMLElement.idl',
'nsIDOMHTMLEmbedElement.idl',
@@ -24,7 +22,6 @@ XPIDL_SOURCES += [
'nsIDOMHTMLFrameElement.idl',
'nsIDOMHTMLFrameSetElement.idl',
'nsIDOMHTMLHeadElement.idl',
'nsIDOMHTMLHeadingElement.idl',
'nsIDOMHTMLHRElement.idl',
'nsIDOMHTMLHtmlElement.idl',
'nsIDOMHTMLIFrameElement.idl',
@@ -51,11 +48,8 @@ XPIDL_SOURCES += [
'nsIDOMHTMLSelectElement.idl',
'nsIDOMHTMLSourceElement.idl',
'nsIDOMHTMLStyleElement.idl',
'nsIDOMHTMLTableCaptionElem.idl',
'nsIDOMHTMLTableCellElement.idl',
'nsIDOMHTMLTableElement.idl',
'nsIDOMHTMLTextAreaElement.idl',
'nsIDOMHTMLTitleElement.idl',
'nsIDOMHTMLUListElement.idl',
'nsIDOMMediaError.idl',
'nsIDOMMozBrowserFrame.idl',
@@ -1,23 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 "nsIDOMHTMLElement.idl"
/**
* The nsIDOMHTMLBRElement interface is the interface to a [X]HTML br
* element.
*
* This interface is trying to follow the DOM Level 2 HTML specification:
* http://www.w3.org/TR/DOM-Level-2-HTML/
*
* with changes from the work-in-progress WHATWG HTML specification:
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[uuid(ba8fb51a-e552-4272-b3df-5e63a60b86ee)]
interface nsIDOMHTMLBRElement : nsISupports
{
attribute DOMString clear;
};
@@ -1,23 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 "nsIDOMHTMLElement.idl"
/**
* The nsIDOMHTMLDivElement interface is the interface to a [X]HTML
* div element.
*
* This interface is trying to follow the DOM Level 2 HTML specification:
* http://www.w3.org/TR/DOM-Level-2-HTML/
*
* with changes from the work-in-progress WHATWG HTML specification:
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[uuid(d1b51f44-38e0-4496-8236-b795e36df0e2)]
interface nsIDOMHTMLDivElement : nsISupports
{
attribute DOMString align;
};
@@ -1,23 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 "nsIDOMHTMLElement.idl"
/**
* The nsIDOMHTMLHeadingElement interface is the interface to a
* [X]HTML h1, h2, h3, ... element.
*
* This interface is trying to follow the DOM Level 2 HTML specification:
* http://www.w3.org/TR/DOM-Level-2-HTML/
*
* with changes from the work-in-progress WHATWG HTML specification:
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[uuid(a40b92f7-9da7-4c9f-8a0c-cf5b9e28bb30)]
interface nsIDOMHTMLHeadingElement : nsISupports
{
attribute DOMString align;
};
@@ -1,23 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 "nsIDOMHTMLElement.idl"
/**
* The nsIDOMHTMLTableCaptionElement interface is the interface to a
* [X]HTML caption element.
*
* This interface is trying to follow the DOM Level 2 HTML specification:
* http://www.w3.org/TR/DOM-Level-2-HTML/
*
* with changes from the work-in-progress WHATWG HTML specification:
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[builtinclass, uuid(78f0635b-44d2-4d5c-87de-29d54df6aed6)]
interface nsIDOMHTMLTableCaptionElement : nsISupports
{
attribute DOMString align;
};
@@ -1,22 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 "nsIDOMHTMLElement.idl"
/**
* The nsIDOMHTMLTableElement interface is the interface to a [X]HTML
* table element.
*
* This interface is trying to follow the DOM Level 2 HTML specification:
* http://www.w3.org/TR/DOM-Level-2-HTML/
*
* with changes from the work-in-progress WHATWG HTML specification:
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[uuid(135a30ee-0374-4ee7-9d36-91736bff5fb1)]
interface nsIDOMHTMLTableElement : nsISupports
{
};
@@ -1,23 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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 "nsIDOMHTMLElement.idl"
/**
* The nsIDOMHTMLTitleElement interface is the interface to a [X]HTML
* title element.
*
* This interface is trying to follow the DOM Level 2 HTML specification:
* http://www.w3.org/TR/DOM-Level-2-HTML/
*
* with changes from the work-in-progress WHATWG HTML specification:
* http://www.whatwg.org/specs/web-apps/current-work/
*/
[uuid(e8e5168a-e12e-4946-9fa7-5fe0d6932198)]
interface nsIDOMHTMLTitleElement : nsISupports
{
attribute DOMString text;
};
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
process_error.xul
process_error_contentscript.js
+1
View File
@@ -1,6 +1,7 @@
#Media chrome tests
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
basic.vtt
seek.webm
+1 -1
View File
@@ -22,7 +22,7 @@
# do ok(true, "Type not supported") and stop the test.
[DEFAULT]
skip-if = buildapp == 'mulet' || (os == 'win' && strictContentSandbox) # strictContentSandbox (Bug 1042735)
skip-if = buildapp == 'mulet' || (os == 'win' && strictContentSandbox) || android_version == '18' # strictContentSandbox (Bug 1042735)
support-files =
320x240.ogv
320x240.ogv^headers^
@@ -2,7 +2,7 @@
# strictContentSandbox - bug 1042735, Android 2.3 - bug 981881
# won't run on b2g desktop tests - bug 1119993
# broken HTTPS on b2g emulator - bug 1135339
skip-if = (os == 'win' && strictContentSandbox) || android_version == '10' || (buildapp == 'b2g' && toolkit != 'gonk') || (buildapp == 'b2g' && toolkit == 'gonk')
skip-if = (os == 'win' && strictContentSandbox) || android_version == '10' || android_version == '18' || (buildapp == 'b2g' && toolkit != 'gonk') || (buildapp == 'b2g' && toolkit == 'gonk')
support-files =
/.well-known/idp-proxy/idp.js
+1 -1
View File
@@ -1,6 +1,6 @@
[DEFAULT]
# strictContentSandbox - bug 1042735, Android 2.3 - bug 981881
skip-if = (os == 'win' && strictContentSandbox) || android_version == '10'
skip-if = (os == 'win' && strictContentSandbox) || android_version == '10' || android_version == '18'
support-files =
head.js
dataChannel.js
+1
View File
@@ -1,3 +1,4 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
[test_AudioNodeDevtoolsAPI.html]
+1 -1
View File
@@ -119,7 +119,7 @@ skip-if = toolkit == 'android' # bug 1056706
[test_mediaStreamAudioSourceNodePassThrough.html]
[test_mediaStreamAudioSourceNodeResampling.html]
[test_mixingRules.html]
skip-if = android_version == '10' # bug 1091965
skip-if = android_version == '10' || android_version == '18' # bug 1091965
[test_mozaudiochannel.html]
# Android: bug 1061675; OSX 10.6: bug 1097721
skip-if = (toolkit == 'gonk' && !debug) || android_version == '10' || android_version == '18' || (os == 'mac' && os_version == '10.6')
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
[test_phonenumber.xul]
[test_phonenumberservice.xul]
+1 -1
View File
@@ -1,5 +1,5 @@
[DEFAULT]
skip-if = buildapp == "mulet"
skip-if = (buildapp == 'b2g' || buildapp == 'mulet')
support-files =
hang_test.js
privatemode_perwindowpb.xul
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
[test_dependentPromises.html]
[test_on_new_promise.html]
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
[test_settings_service.js]
[test_settings_service.xul]
+1 -3
View File
@@ -124,9 +124,7 @@ SVGScriptElement::GetScriptType(nsAString& type)
void
SVGScriptElement::GetScriptText(nsAString& text)
{
if (!nsContentUtils::GetNodeTextContent(this, false, text)) {
NS_RUNTIMEABORT("OOM");
}
nsContentUtils::GetNodeTextContent(this, false, text);
}
void
+1
View File
@@ -61,6 +61,7 @@ skip-if = true
[test_pointer-events-1b.xhtml]
[test_pointer-events-2.xhtml]
[test_pointer-events-3.xhtml]
skip-if = android_version == '18' # bug 1147994
[test_pointer-events-4.xhtml]
[test_pointer-events-5.xhtml]
[test_pointer-events-6.xhtml]
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files = worker_constants.js
[test_constants.xul]
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
489127.html
DOMWindowCreated_chrome.xul
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
[test_innerScreen.xul]
[test_offsets.css]
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
frame_clear_browser_data.html
page_blank.html
@@ -1,3 +1,4 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
[test_sessionStorageFromChrome.xhtml]
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
cross_origin.html
head.js
+1
View File
@@ -1,3 +1,4 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
[test_postMessage_chrome.html]
+1
View File
@@ -17,5 +17,6 @@ interface HTMLHeadingElement : HTMLElement {
// http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis
partial interface HTMLHeadingElement {
[SetterThrows]
attribute DOMString align;
};
+1 -1
View File
@@ -8,6 +8,6 @@
*/
interface HTMLTitleElement : HTMLElement {
[SetterThrows]
[Throws]
attribute DOMString text;
};
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
WorkerDebugger.initialize_childWorker.js
WorkerDebugger.initialize_debugger.js
+3 -7
View File
@@ -361,9 +361,7 @@ nsXBLPrototypeBinding::AttributeChanged(nsIAtom* aAttribute,
// Check to see if the src attribute is xbl:text. If so, then we need to obtain the
// children of the real element and get the text nodes' values.
if (aAttribute == nsGkAtoms::text && aNameSpaceID == kNameSpaceID_XBL) {
if (!nsContentUtils::GetNodeTextContent(aChangedElement, false, value)) {
NS_RUNTIMEABORT("OOM");
}
nsContentUtils::GetNodeTextContent(aChangedElement, false, value);
value.StripChar(char16_t('\n'));
value.StripChar(char16_t('\r'));
nsAutoString stripVal(value);
@@ -514,10 +512,8 @@ SetAttrs(nsISupports* aKey, nsXBLAttributeEntry* aEntry, void* aClosure)
bool attrPresent = true;
if (src == nsGkAtoms::text && srcNs == kNameSpaceID_XBL) {
if (!nsContentUtils::GetNodeTextContent(changeData->mBoundElement, false,
value)) {
NS_RUNTIMEABORT("OOM");
}
nsContentUtils::GetNodeTextContent(changeData->mBoundElement, false,
value);
value.StripChar(char16_t('\n'));
value.StripChar(char16_t('\r'));
nsAutoString stripVal(value);
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
file_bug944407.xml
file_bug950909.xml
@@ -290,7 +290,7 @@ nsXULTemplateQueryProcessorStorage::CompileQuery(nsIXULTemplateBuilder* aBuilder
nsAutoString sqlQuery;
// Let's get all text nodes (which should be the query)
if (!nsContentUtils::GetNodeTextContent(queryContent, false, sqlQuery)) {
if (!nsContentUtils::GetNodeTextContent(queryContent, false, sqlQuery, fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
@@ -308,7 +308,7 @@ nsXULTemplateQueryProcessorStorage::CompileQuery(nsIXULTemplateBuilder* aBuilder
if (child->NodeInfo()->Equals(nsGkAtoms::param, kNameSpaceID_XUL)) {
nsAutoString value;
if (!nsContentUtils::GetNodeTextContent(child, false, value)) {
if (!nsContentUtils::GetNodeTextContent(child, false, value, fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
}
+1 -1
View File
@@ -1,5 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'mulet'
skip-if = (buildapp == 'b2g' || buildapp == 'mulet')
support-files =
animals.rdf
animals.sqlite
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
398289-resource.xul
bug497875-iframe.xul
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
[test_async_UpdateCurrentDictionary.html]
[test_bug338427.html]
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files = green.png
[test_bug46555.html]
+4 -1
View File
@@ -30,6 +30,7 @@ skip-if = toolkit == 'android'
skip-if = toolkit == 'android' || e10s
[test_bug414526.html]
[test_bug417418.html]
skip-if = android_version == '18' # bug 1147989
[test_bug432225.html]
skip-if = toolkit == 'android' || e10s
[test_bug439808.html]
@@ -60,11 +61,13 @@ skip-if = toolkit == 'android' || e10s
[test_bug549262.html]
skip-if = toolkit == 'android' || e10s
[test_bug550434.html]
skip-if = android_version == '18' # bug 1147989
[test_bug551704.html]
[test_bug552782.html]
[test_bug567213.html]
[test_bug570144.html]
[test_bug578771.html]
skip-if = android_version == '18' # bug 1147989
[test_bug586662.html]
skip-if = toolkit == 'android' || e10s
[test_bug587461.html]
@@ -101,7 +104,7 @@ skip-if = toolkit == 'android' || e10s
[test_bug629845.html]
[test_bug638596.html]
[test_bug640321.html]
skip-if = e10s
skip-if = android_version == '18' || e10s # bug 1147989
[test_bug641466.html]
[test_bug645914.html]
[test_bug668599.html]
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files = channel_utils.js
[test_app_uninstall_cookies.html]
@@ -12,7 +12,6 @@
#include "nsIDOMRange.h"
#include "nsIEditor.h"
#include "nsIDOMNode.h"
#include "nsIDOMHTMLBRElement.h"
#include "nsUnicharUtilCIID.h"
#include "nsUnicodeProperties.h"
#include "nsServiceManagerUtils.h"
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
[test_add_remove_dictionaries.xul]
support-files =
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
CharsetDetectionTests.js
bug306272_text.html
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
animated-gif-finalframe.gif
animated-gif.gif
+3 -3
View File
@@ -70,9 +70,9 @@ struct JS_PUBLIC_API(SliceBudget)
return checkOverBudget();
}
bool isUnlimited() const {
return deadline == unlimitedDeadline;
}
bool isWorkBudget() const { return deadline == 0; }
bool isTimeBudget() const { return deadline > 0 && !isUnlimited(); }
bool isUnlimited() const { return deadline == unlimitedDeadline; }
int describe(char* buffer, size_t maxlen) const;
+10 -8
View File
@@ -771,28 +771,30 @@ class GCRuntime
JS::Zone* getCurrentZoneGroup() { return currentZoneGroup; }
void setFoundBlackGrayEdges() { foundBlackGrayEdges = true; }
uint64_t gcNumber() { return number; }
uint64_t gcNumber() const { return number; }
void incGcNumber() { ++number; }
uint64_t minorGCCount() { return minorGCNumber; }
uint64_t minorGCCount() const { return minorGCNumber; }
void incMinorGcNumber() { ++minorGCNumber; }
uint64_t majorGCCount() { return majorGCNumber; }
uint64_t majorGCCount() const { return majorGCNumber; }
void incMajorGcNumber() { ++majorGCNumber; }
bool isIncrementalGc() { return isIncremental; }
bool isFullGc() { return isFull; }
int64_t defaultSliceBudget() const { return sliceBudget; }
bool isIncrementalGc() const { return isIncremental; }
bool isFullGc() const { return isFull; }
bool shouldCleanUpEverything() { return cleanUpEverything; }
bool areGrayBitsValid() { return grayBitsValid; }
bool areGrayBitsValid() const { return grayBitsValid; }
void setGrayBitsInvalid() { grayBitsValid = false; }
bool minorGCRequested() const { return minorGCTriggerReason != JS::gcreason::NO_REASON; }
bool majorGCRequested() const { return majorGCTriggerReason != JS::gcreason::NO_REASON; }
bool isGcNeeded() { return minorGCRequested() || majorGCRequested(); }
bool fullGCForAtomsRequested() { return fullGCForAtomsRequested_; }
bool fullGCForAtomsRequested() const { return fullGCForAtomsRequested_; }
double computeHeapGrowthFactor(size_t lastBytes);
size_t computeTriggerBytes(double growthFactor, size_t lastBytes);
@@ -1161,7 +1163,7 @@ class GCRuntime
*/
bool interFrameGC;
/* Default budget for incremental GC slice. See SliceBudget in jsgc.h. */
/* Default budget for incremental GC slice. See js/SliceBudget.h. */
int64_t sliceBudget;
/*
-1
View File
@@ -1250,7 +1250,6 @@ Statistics::endSlice()
if (!aborted) {
slices.back().end = PRMJ_Now();
slices.back().endFaults = GetPageFaultCount();
}
bool last = !runtime->gc.isIncrementalGCInProgress();
+1 -1
View File
@@ -2999,7 +2999,7 @@ SliceBudget::describe(char* buffer, size_t maxlen) const
{
if (isUnlimited())
return JS_snprintf(buffer, maxlen, "unlimited");
else if (deadline == 0)
else if (isWorkBudget())
return JS_snprintf(buffer, maxlen, "work(%lld)", workBudget.budget);
else
return JS_snprintf(buffer, maxlen, "%lldms", timeBudget.budget);
+46 -61
View File
@@ -1524,9 +1524,8 @@ void XPCJSRuntime::DestroyJSContextStack()
void XPCJSRuntime::SystemIsBeingShutDown()
{
if (mDetachedWrappedNativeProtoMap)
mDetachedWrappedNativeProtoMap->
Enumerate(DetachedWrappedNativeProtoShutdownMarker, nullptr);
mDetachedWrappedNativeProtoMap->
Enumerate(DetachedWrappedNativeProtoShutdownMarker, nullptr);
}
#define JS_OPTIONS_DOT_STR "javascript.options."
@@ -1608,51 +1607,33 @@ XPCJSRuntime::~XPCJSRuntime()
JS_SetRuntimePrivate(Runtime(), nullptr);
// clean up and destroy maps...
if (mWrappedJSMap) {
mWrappedJSMap->ShutdownMarker();
delete mWrappedJSMap;
mWrappedJSMap = nullptr;
}
mWrappedJSMap->ShutdownMarker();
delete mWrappedJSMap;
mWrappedJSMap = nullptr;
if (mWrappedJSClassMap) {
delete mWrappedJSClassMap;
mWrappedJSClassMap = nullptr;
}
delete mWrappedJSClassMap;
mWrappedJSClassMap = nullptr;
if (mIID2NativeInterfaceMap) {
delete mIID2NativeInterfaceMap;
mIID2NativeInterfaceMap = nullptr;
}
delete mIID2NativeInterfaceMap;
mIID2NativeInterfaceMap = nullptr;
if (mClassInfo2NativeSetMap) {
delete mClassInfo2NativeSetMap;
mClassInfo2NativeSetMap = nullptr;
}
delete mClassInfo2NativeSetMap;
mClassInfo2NativeSetMap = nullptr;
if (mNativeSetMap) {
delete mNativeSetMap;
mNativeSetMap = nullptr;
}
delete mNativeSetMap;
mNativeSetMap = nullptr;
if (mThisTranslatorMap) {
delete mThisTranslatorMap;
mThisTranslatorMap = nullptr;
}
delete mThisTranslatorMap;
mThisTranslatorMap = nullptr;
if (mNativeScriptableSharedMap) {
delete mNativeScriptableSharedMap;
mNativeScriptableSharedMap = nullptr;
}
delete mNativeScriptableSharedMap;
mNativeScriptableSharedMap = nullptr;
if (mDyingWrappedNativeProtoMap) {
delete mDyingWrappedNativeProtoMap;
mDyingWrappedNativeProtoMap = nullptr;
}
delete mDyingWrappedNativeProtoMap;
mDyingWrappedNativeProtoMap = nullptr;
if (mDetachedWrappedNativeProtoMap) {
delete mDetachedWrappedNativeProtoMap;
mDetachedWrappedNativeProtoMap = nullptr;
}
delete mDetachedWrappedNativeProtoMap;
mDetachedWrappedNativeProtoMap = nullptr;
Preferences::UnregisterCallback(ReloadPrefsCallback, JS_OPTIONS_DOT_STR, this);
}
@@ -3147,6 +3128,10 @@ ReadSourceFromFilename(JSContext* cx, const char* filename, char16_t** src, size
if (!scheme.EqualsLiteral("file") && !scheme.EqualsLiteral("jar"))
return NS_OK;
// Explicitly set the content type so that we don't load the
// exthandler to guess it.
scriptChannel->SetContentType(NS_LITERAL_CSTRING("text/plain"));
nsCOMPtr<nsIInputStream> scriptStream;
rv = scriptChannel->Open(getter_AddRefs(scriptStream));
NS_ENSURE_SUCCESS(rv, rv);
@@ -3575,6 +3560,10 @@ XPCJSRuntime::DebugDump(int16_t depth)
XPC_LOG_INDENT();
XPC_LOG_ALWAYS(("mJSRuntime @ %x", Runtime()));
XPC_LOG_ALWAYS(("mWrappedJSToReleaseArray @ %x with %d wrappers(s)",
&mWrappedJSToReleaseArray,
mWrappedJSToReleaseArray.Length()));
int cxCount = 0;
JSContext* iter = nullptr;
while (JS_ContextIterator(Runtime(), &iter))
@@ -3589,43 +3578,39 @@ XPCJSRuntime::DebugDump(int16_t depth)
XPC_LOG_OUTDENT();
}
XPC_LOG_ALWAYS(("mWrappedJSClassMap @ %x with %d wrapperclasses(s)", \
mWrappedJSClassMap, mWrappedJSClassMap ? \
mWrappedJSClassMap->Count() : 0));
XPC_LOG_ALWAYS(("mWrappedJSClassMap @ %x with %d wrapperclasses(s)",
mWrappedJSClassMap, mWrappedJSClassMap->Count()));
// iterate wrappersclasses...
if (depth && mWrappedJSClassMap && mWrappedJSClassMap->Count()) {
if (depth && mWrappedJSClassMap->Count()) {
XPC_LOG_INDENT();
mWrappedJSClassMap->Enumerate(WrappedJSClassMapDumpEnumerator, &depth);
XPC_LOG_OUTDENT();
}
XPC_LOG_ALWAYS(("mWrappedJSMap @ %x with %d wrappers(s)", \
mWrappedJSMap, mWrappedJSMap ? \
mWrappedJSMap->Count() : 0));
XPC_LOG_ALWAYS(("mWrappedJSMap @ %x with %d wrappers(s)",
mWrappedJSMap, mWrappedJSMap->Count()));
// iterate wrappers...
if (depth && mWrappedJSMap && mWrappedJSMap->Count()) {
if (depth && mWrappedJSMap->Count()) {
XPC_LOG_INDENT();
mWrappedJSMap->Dump(depth);
XPC_LOG_OUTDENT();
}
XPC_LOG_ALWAYS(("mIID2NativeInterfaceMap @ %x with %d interface(s)", \
mIID2NativeInterfaceMap, mIID2NativeInterfaceMap ? \
mIID2NativeInterfaceMap->Count() : 0));
XPC_LOG_ALWAYS(("mIID2NativeInterfaceMap @ %x with %d interface(s)",
mIID2NativeInterfaceMap,
mIID2NativeInterfaceMap->Count()));
XPC_LOG_ALWAYS(("mClassInfo2NativeSetMap @ %x with %d sets(s)", \
mClassInfo2NativeSetMap, mClassInfo2NativeSetMap ? \
mClassInfo2NativeSetMap->Count() : 0));
XPC_LOG_ALWAYS(("mClassInfo2NativeSetMap @ %x with %d sets(s)",
mClassInfo2NativeSetMap,
mClassInfo2NativeSetMap->Count()));
XPC_LOG_ALWAYS(("mThisTranslatorMap @ %x with %d translator(s)", \
mThisTranslatorMap, mThisTranslatorMap ? \
mThisTranslatorMap->Count() : 0));
XPC_LOG_ALWAYS(("mThisTranslatorMap @ %x with %d translator(s)",
mThisTranslatorMap, mThisTranslatorMap->Count()));
XPC_LOG_ALWAYS(("mNativeSetMap @ %x with %d sets(s)", \
mNativeSetMap, mNativeSetMap ? \
mNativeSetMap->Count() : 0));
XPC_LOG_ALWAYS(("mNativeSetMap @ %x with %d sets(s)",
mNativeSetMap, mNativeSetMap->Count()));
// iterate sets...
if (depth && mNativeSetMap && mNativeSetMap->Count()) {
if (depth && mNativeSetMap->Count()) {
XPC_LOG_INDENT();
mNativeSetMap->Enumerate(NativeSetDumpEnumerator, &depth);
XPC_LOG_OUTDENT();
+22 -52
View File
@@ -176,8 +176,8 @@ Native2WrappedNativeMap::newMap(int length)
}
Native2WrappedNativeMap::Native2WrappedNativeMap(int length)
: mTable(new PLDHashTable(PL_DHashGetStubOps(), sizeof(Entry), length))
{
mTable = new PLDHashTable(PL_DHashGetStubOps(), sizeof(Entry), length);
}
Native2WrappedNativeMap::~Native2WrappedNativeMap()
@@ -190,7 +190,7 @@ Native2WrappedNativeMap::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf)
{
size_t n = 0;
n += mallocSizeOf(this);
n += mTable ? PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
n += PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf);
return n;
}
@@ -216,16 +216,12 @@ const struct PLDHashTableOps IID2WrappedJSClassMap::Entry::sOps =
IID2WrappedJSClassMap*
IID2WrappedJSClassMap::newMap(int length)
{
IID2WrappedJSClassMap* map = new IID2WrappedJSClassMap(length);
if (map && map->mTable)
return map;
delete map;
return nullptr;
return new IID2WrappedJSClassMap(length);
}
IID2WrappedJSClassMap::IID2WrappedJSClassMap(int length)
: mTable(new PLDHashTable(&Entry::sOps, sizeof(Entry), length))
{
mTable = new PLDHashTable(&Entry::sOps, sizeof(Entry), length);
}
IID2WrappedJSClassMap::~IID2WrappedJSClassMap()
@@ -233,7 +229,6 @@ IID2WrappedJSClassMap::~IID2WrappedJSClassMap()
delete mTable;
}
/***************************************************************************/
// implement IID2NativeInterfaceMap...
@@ -249,16 +244,12 @@ const struct PLDHashTableOps IID2NativeInterfaceMap::Entry::sOps =
IID2NativeInterfaceMap*
IID2NativeInterfaceMap::newMap(int length)
{
IID2NativeInterfaceMap* map = new IID2NativeInterfaceMap(length);
if (map && map->mTable)
return map;
delete map;
return nullptr;
return new IID2NativeInterfaceMap(length);
}
IID2NativeInterfaceMap::IID2NativeInterfaceMap(int length)
: mTable(new PLDHashTable(&Entry::sOps, sizeof(Entry), length))
{
mTable = new PLDHashTable(&Entry::sOps, sizeof(Entry), length);
}
IID2NativeInterfaceMap::~IID2NativeInterfaceMap()
@@ -271,7 +262,7 @@ IID2NativeInterfaceMap::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf)
{
size_t n = 0;
n += mallocSizeOf(this);
n += mTable ? PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
n += PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf);
return n;
}
@@ -290,16 +281,12 @@ IID2NativeInterfaceMap::SizeOfEntryExcludingThis(PLDHashEntryHdr* hdr,
ClassInfo2NativeSetMap*
ClassInfo2NativeSetMap::newMap(int length)
{
ClassInfo2NativeSetMap* map = new ClassInfo2NativeSetMap(length);
if (map && map->mTable)
return map;
delete map;
return nullptr;
return new ClassInfo2NativeSetMap(length);
}
ClassInfo2NativeSetMap::ClassInfo2NativeSetMap(int length)
: mTable(new PLDHashTable(PL_DHashGetStubOps(), sizeof(Entry), length))
{
mTable = new PLDHashTable(PL_DHashGetStubOps(), sizeof(Entry), length);
}
ClassInfo2NativeSetMap::~ClassInfo2NativeSetMap()
@@ -313,7 +300,7 @@ ClassInfo2NativeSetMap::ShallowSizeOfIncludingThis(mozilla::MallocSizeOf mallocS
size_t n = 0;
n += mallocSizeOf(this);
// The second arg is nullptr because this is a "shallow" measurement of the map.
n += mTable ? PL_DHashTableSizeOfIncludingThis(mTable, nullptr, mallocSizeOf) : 0;
n += PL_DHashTableSizeOfIncludingThis(mTable, nullptr, mallocSizeOf);
return n;
}
@@ -336,8 +323,8 @@ ClassInfo2WrappedNativeProtoMap::newMap(int length)
}
ClassInfo2WrappedNativeProtoMap::ClassInfo2WrappedNativeProtoMap(int length)
: mTable(new PLDHashTable(PL_DHashGetStubOps(), sizeof(Entry), length))
{
mTable = new PLDHashTable(PL_DHashGetStubOps(), sizeof(Entry), length);
}
ClassInfo2WrappedNativeProtoMap::~ClassInfo2WrappedNativeProtoMap()
@@ -350,7 +337,7 @@ ClassInfo2WrappedNativeProtoMap::SizeOfIncludingThis(mozilla::MallocSizeOf mallo
{
size_t n = 0;
n += mallocSizeOf(this);
n += mTable ? PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
n += PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf);
return n;
}
@@ -448,16 +435,12 @@ const struct PLDHashTableOps NativeSetMap::Entry::sOps =
NativeSetMap*
NativeSetMap::newMap(int length)
{
NativeSetMap* map = new NativeSetMap(length);
if (map && map->mTable)
return map;
delete map;
return nullptr;
return new NativeSetMap(length);
}
NativeSetMap::NativeSetMap(int length)
: mTable(new PLDHashTable(&Entry::sOps, sizeof(Entry), length))
{
mTable = new PLDHashTable(&Entry::sOps, sizeof(Entry), length);
}
NativeSetMap::~NativeSetMap()
@@ -470,7 +453,7 @@ NativeSetMap::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf)
{
size_t n = 0;
n += mallocSizeOf(this);
n += mTable ? PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf) : 0;
n += PL_DHashTableSizeOfIncludingThis(mTable, SizeOfEntryExcludingThis, mallocSizeOf);
return n;
}
@@ -511,16 +494,12 @@ const struct PLDHashTableOps IID2ThisTranslatorMap::Entry::sOps =
IID2ThisTranslatorMap*
IID2ThisTranslatorMap::newMap(int length)
{
IID2ThisTranslatorMap* map = new IID2ThisTranslatorMap(length);
if (map && map->mTable)
return map;
delete map;
return nullptr;
return new IID2ThisTranslatorMap(length);
}
IID2ThisTranslatorMap::IID2ThisTranslatorMap(int length)
: mTable(new PLDHashTable(&Entry::sOps, sizeof(Entry), length))
{
mTable = new PLDHashTable(&Entry::sOps, sizeof(Entry), length);
}
IID2ThisTranslatorMap::~IID2ThisTranslatorMap()
@@ -586,17 +565,12 @@ const struct PLDHashTableOps XPCNativeScriptableSharedMap::Entry::sOps =
XPCNativeScriptableSharedMap*
XPCNativeScriptableSharedMap::newMap(int length)
{
XPCNativeScriptableSharedMap* map =
new XPCNativeScriptableSharedMap(length);
if (map && map->mTable)
return map;
delete map;
return nullptr;
return new XPCNativeScriptableSharedMap(length);
}
XPCNativeScriptableSharedMap::XPCNativeScriptableSharedMap(int length)
: mTable(new PLDHashTable(&Entry::sOps, sizeof(Entry), length))
{
mTable = new PLDHashTable(&Entry::sOps, sizeof(Entry), length);
}
XPCNativeScriptableSharedMap::~XPCNativeScriptableSharedMap()
@@ -638,17 +612,13 @@ XPCNativeScriptableSharedMap::GetNewOrUsed(uint32_t flags,
XPCWrappedNativeProtoMap*
XPCWrappedNativeProtoMap::newMap(int length)
{
XPCWrappedNativeProtoMap* map = new XPCWrappedNativeProtoMap(length);
if (map && map->mTable)
return map;
delete map;
return nullptr;
return new XPCWrappedNativeProtoMap(length);
}
XPCWrappedNativeProtoMap::XPCWrappedNativeProtoMap(int length)
: mTable(new PLDHashTable(PL_DHashGetStubOps(), sizeof(PLDHashEntryStub),
length))
{
mTable = new PLDHashTable(PL_DHashGetStubOps(),
sizeof(PLDHashEntryStub), length);
}
XPCWrappedNativeProtoMap::~XPCWrappedNativeProtoMap()
+14 -8
View File
@@ -32,10 +32,13 @@ class JSObject2WrappedJSMap
public:
static JSObject2WrappedJSMap* newMap(int length) {
JSObject2WrappedJSMap* map = new JSObject2WrappedJSMap();
if (map && map->mTable.init(length))
return map;
delete map;
return nullptr;
if (!map->mTable.init(length)) {
// This is a decent estimate of the size of the hash table's
// entry storage. The |2| is because on average the capacity is
// twice the requested length.
NS_ABORT_OOM(length * 2 * sizeof(Map::Entry));
}
return map;
}
inline nsXPCWrappedJS* Find(JSObject* Obj) {
@@ -599,10 +602,13 @@ class JSObject2JSObjectMap
public:
static JSObject2JSObjectMap* newMap(int length) {
JSObject2JSObjectMap* map = new JSObject2JSObjectMap();
if (map && map->mTable.init(length))
return map;
delete map;
return nullptr;
if (!map->mTable.init(length)) {
// This is a decent estimate of the size of the hash table's
// entry storage. The |2| is because on average the capacity is
// twice the requested length.
NS_ABORT_OOM(length * 2 * sizeof(Map::Entry));
}
return map;
}
inline JSObject* Find(JSObject* key) {
+11 -16
View File
@@ -434,15 +434,11 @@ XPCWrappedNativeScope::~XPCWrappedNativeScope()
// We can do additional cleanup assertions here...
if (mWrappedNativeMap) {
MOZ_ASSERT(0 == mWrappedNativeMap->Count(), "scope has non-empty map");
delete mWrappedNativeMap;
}
MOZ_ASSERT(0 == mWrappedNativeMap->Count(), "scope has non-empty map");
delete mWrappedNativeMap;
if (mWrappedNativeProtoMap) {
MOZ_ASSERT(0 == mWrappedNativeProtoMap->Count(), "scope has non-empty map");
delete mWrappedNativeProtoMap;
}
MOZ_ASSERT(0 == mWrappedNativeProtoMap->Count(), "scope has non-empty map");
delete mWrappedNativeProtoMap;
// This should not be necessary, since the Components object should die
// with the scope but just in case.
@@ -839,21 +835,20 @@ XPCWrappedNativeScope::DebugDump(int16_t depth)
XPC_LOG_ALWAYS(("mComponents @ %x", mComponents.get()));
XPC_LOG_ALWAYS(("mGlobalJSObject @ %x", mGlobalJSObject.get()));
XPC_LOG_ALWAYS(("mWrappedNativeMap @ %x with %d wrappers(s)", \
mWrappedNativeMap, \
mWrappedNativeMap ? mWrappedNativeMap->Count() : 0));
XPC_LOG_ALWAYS(("mWrappedNativeMap @ %x with %d wrappers(s)",
mWrappedNativeMap, mWrappedNativeMap->Count()));
// iterate contexts...
if (depth && mWrappedNativeMap && mWrappedNativeMap->Count()) {
if (depth && mWrappedNativeMap->Count()) {
XPC_LOG_INDENT();
mWrappedNativeMap->Enumerate(WrappedNativeMapDumpEnumerator, &depth);
XPC_LOG_OUTDENT();
}
XPC_LOG_ALWAYS(("mWrappedNativeProtoMap @ %x with %d protos(s)", \
mWrappedNativeProtoMap, \
mWrappedNativeProtoMap ? mWrappedNativeProtoMap->Count() : 0));
XPC_LOG_ALWAYS(("mWrappedNativeProtoMap @ %x with %d protos(s)",
mWrappedNativeProtoMap,
mWrappedNativeProtoMap->Count()));
// iterate contexts...
if (depth && mWrappedNativeProtoMap && mWrappedNativeProtoMap->Count()) {
if (depth && mWrappedNativeProtoMap->Count()) {
XPC_LOG_INDENT();
mWrappedNativeProtoMap->Enumerate(WrappedNativeProtoMapDumpEnumerator, &depth);
XPC_LOG_OUTDENT();
+1
View File
@@ -1,4 +1,5 @@
[DEFAULT]
skip-if = buildapp == 'b2g'
support-files =
bug503926.xul
file_bug618176.xul

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