Merge mozilla-central to fx-team

This commit is contained in:
Carsten "Tomcat" Book 2014-05-09 14:18:10 +02:00
commit dbb2a713da
358 changed files with 2776 additions and 1242 deletions

6
.gitignore vendored
View File

@ -55,3 +55,9 @@ python/psutil/build/
# Ignore chrome.manifest files from the devtools loader
browser/devtools/chrome.manifest
toolkit/devtools/chrome.manifest
# Tag files generated by GNU Global
GTAGS
GRTAGS
GSYMS
GPATH

View File

@ -61,3 +61,9 @@ _OPT\.OBJ/
# Ignore chrome.manifest files from the devtools loader
^browser/devtools/chrome.manifest$
^toolkit/devtools/chrome.manifest$
# Tag files generated by GNU Global
GTAGS
GRTAGS
GSYMS
GPATH

View File

@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Bug 1005321 - Requires a clobber because of bug 1005486
Bug 994964 apparently requires a clobber, unclear why

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="15ac34804eb8b3c9b2582d7cf754c57e23182df6"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="40c86437150c62396f187c0efb05a406dbac0147"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="ca283b9db2b151d465cfd2e19346cf58fe89e413"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15ac34804eb8b3c9b2582d7cf754c57e23182df6"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="40c86437150c62396f187c0efb05a406dbac0147"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="3691614d0045f7968addce45d4140fb360c3ceaf"/>
@ -128,7 +128,7 @@
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="c3ee0c875393607430086f942950d1b3f496ab0e"/>
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="24e0e7016bbc22096b28e8bfdd6362b250ac78b7"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="e16b5c17131d2296101b24c87887c9ccf057649f"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="bc70af75eac79073c4c935bf1f71c0cb10e821b7"/>
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="f620016437dd2f050e044eccef5e70e3f689ccbe"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="65fba428f8d76336b33ddd9e15900357953600ba">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15ac34804eb8b3c9b2582d7cf754c57e23182df6"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="40c86437150c62396f187c0efb05a406dbac0147"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
@ -125,7 +125,7 @@
<!-- Emulator specific things -->
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="72ffdf71c68a96309212eb13d63560d66db14c9e"/>
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="cf3f83a8ef13597b62fb6de7aa0cfaf5dc5de2b5"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="606dd627fad312cb79284fa38e44f0ed4bd42bfa"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="265db49431fed74e1887f8dcf083a3b3f3550031"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="694cecf256122d0cb3b6a1a4efb4b5c7401db223"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="aa430bd055bf7e1003d78e9bf0c0abbe32f33e45"/>
<project name="platform/development" path="development" revision="5968ff4e13e0d696ad8d972281fc27ae5a12829b"/>

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="15ac34804eb8b3c9b2582d7cf754c57e23182df6"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="40c86437150c62396f187c0efb05a406dbac0147"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="ca283b9db2b151d465cfd2e19346cf58fe89e413"/>

View File

@ -18,7 +18,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15ac34804eb8b3c9b2582d7cf754c57e23182df6"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="40c86437150c62396f187c0efb05a406dbac0147"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="3691614d0045f7968addce45d4140fb360c3ceaf"/>

View File

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "5476e49adf00cafde6cb68e876f0514dac4b993d",
"revision": "e9a13950c6656cbd21307ff82b8282ed1006c492",
"repo_path": "/integration/gaia-central"
}

View File

@ -17,7 +17,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="15ac34804eb8b3c9b2582d7cf754c57e23182df6"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="40c86437150c62396f187c0efb05a406dbac0147"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>

View File

@ -15,7 +15,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="15ac34804eb8b3c9b2582d7cf754c57e23182df6"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="40c86437150c62396f187c0efb05a406dbac0147"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="15ac34804eb8b3c9b2582d7cf754c57e23182df6"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="40c86437150c62396f187c0efb05a406dbac0147"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>

View File

@ -17,7 +17,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="15ac34804eb8b3c9b2582d7cf754c57e23182df6"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="40c86437150c62396f187c0efb05a406dbac0147"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="15ac34804eb8b3c9b2582d7cf754c57e23182df6"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="40c86437150c62396f187c0efb05a406dbac0147"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="ce95d372e6d285725b96490afdaaf489ad8f9ca9"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="3691614d0045f7968addce45d4140fb360c3ceaf"/>

View File

@ -17,7 +17,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="15ac34804eb8b3c9b2582d7cf754c57e23182df6"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="40c86437150c62396f187c0efb05a406dbac0147"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="f313e6d3aaaefe8c82eaed15912a09b120fb7260"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1f6a1fe07f81c5bc5e1d079c9b60f7f78ca2bf4f"/>

View File

@ -1509,9 +1509,6 @@ let SessionStoreInternal = {
},
getTabState: function ssi_getTabState(aTab) {
if (!aTab.ownerDocument) {
throw Components.Exception("Invalid tab object: no ownerDocument", Cr.NS_ERROR_INVALID_ARG);
}
if (!aTab.ownerDocument.defaultView.__SSi) {
throw Components.Exception("Default view is not tracked", Cr.NS_ERROR_INVALID_ARG);
}
@ -1536,9 +1533,6 @@ let SessionStoreInternal = {
if (!("entries" in tabState)) {
throw Components.Exception("Invalid state object: no entries", Cr.NS_ERROR_INVALID_ARG);
}
if (!aTab.ownerDocument) {
throw Components.Exception("Invalid tab object: no ownerDocument", Cr.NS_ERROR_INVALID_ARG);
}
let window = aTab.ownerDocument.defaultView;
if (!("__SSi" in window)) {
@ -1554,9 +1548,6 @@ let SessionStoreInternal = {
},
duplicateTab: function ssi_duplicateTab(aWindow, aTab, aDelta = 0) {
if (!aTab.ownerDocument) {
throw Components.Exception("Invalid tab object: no ownerDocument", Cr.NS_ERROR_INVALID_ARG);
}
if (!aTab.ownerDocument.defaultView.__SSi) {
throw Components.Exception("Default view is not tracked", Cr.NS_ERROR_INVALID_ARG);
}

View File

@ -11,7 +11,8 @@ function test() {
return false;
}
catch (ex) {
return ex.name == "NS_ERROR_ILLEGAL_VALUE";
return ex.name == "NS_ERROR_ILLEGAL_VALUE" ||
ex.name == "NS_ERROR_FAILURE";
}
}

View File

@ -714,9 +714,10 @@ public:
* Returns the appropriate event argument names for the specified
* namespace and event name. Added because we need to switch between
* SVG's "evt" and the rest of the world's "event", and because onerror
* takes 3 args.
* on window takes 5 args.
*/
static void GetEventArgNames(int32_t aNameSpaceID, nsIAtom *aEventName,
bool aIsForWindow,
uint32_t *aArgCount, const char*** aArgNames);
/**

View File

@ -13,7 +13,7 @@
interface nsIVariant;
[scriptable, builtinclass, uuid(af7077ac-0f9f-44e1-815f-9b1a94618531)]
[builtinclass, uuid(af7077ac-0f9f-44e1-815f-9b1a94618531)]
interface nsIDOMDataChannel : nsIDOMEventTarget
{
readonly attribute DOMString label;

View File

@ -7,7 +7,7 @@
interface nsIDOMFile;
[scriptable, uuid(283aa7b2-da81-4c72-aea2-9797b440fe34)]
[uuid(283aa7b2-da81-4c72-aea2-9797b440fe34)]
interface nsIDOMFileList : nsISupports
{
readonly attribute unsigned long length;

View File

@ -8,7 +8,7 @@
interface nsIDOMEventListener;
interface nsIDOMBlob;
[scriptable, builtinclass, uuid(39ea2c73-7711-4cea-9f73-3166c24dfa69)]
[builtinclass, uuid(39ea2c73-7711-4cea-9f73-3166c24dfa69)]
interface nsIDOMFileReader : nsIDOMEventTarget
{
[implicit_jscontext]

View File

@ -7,7 +7,7 @@
interface nsIVariant;
[scriptable, uuid(256c9139-5a29-41e1-8698-f9f9aae7d6cf)]
[uuid(256c9139-5a29-41e1-8698-f9f9aae7d6cf)]
interface nsIDOMFormData : nsISupports
{
void append(in DOMString name, in nsIVariant value);

View File

@ -19,7 +19,7 @@ interface nsIScriptGlobalObject;
* parsing with the XMLHttpRequest interface, which can be used for
* asynchronous (callback-based) loading.
*/
[scriptable, uuid(5677f36e-1842-4c6f-a39c-2e5576ab8b40)]
[uuid(5677f36e-1842-4c6f-a39c-2e5576ab8b40)]
interface nsIDOMParser : nsISupports
{
/**

View File

@ -15,7 +15,7 @@ interface nsIDOMNode;
* or any DOM subtree.
*/
[scriptable, uuid(9fd4ba15-e67c-4c98-b52c-7715f62c9196)]
[uuid(9fd4ba15-e67c-4c98-b52c-7715f62c9196)]
interface nsIDOMSerializer : nsISupports
{
/**

View File

@ -105,6 +105,7 @@ struct ElementRegistrationOptions;
class Event;
class EventTarget;
class FrameRequestCallback;
class OverfillCallback;
class HTMLBodyElement;
struct LifecycleCallbackArgs;
class Link;

View File

@ -18,7 +18,7 @@ interface nsINode;
* @version 1.0
*/
[scriptable, builtinclass, uuid(e0a4d4b3-f34e-44bd-b1f2-4e3bde9b6915)]
[builtinclass, uuid(e0a4d4b3-f34e-44bd-b1f2-4e3bde9b6915)]
interface nsISelection : nsISupports
{
/**

View File

@ -16,12 +16,12 @@ interface nsIGlobalObject;
interface nsIInputStream;
interface nsIDOMBlob;
[scriptable, builtinclass, uuid(5ced7e7a-e2c3-4563-a57d-31b97ce64dc5)]
[builtinclass, uuid(5ced7e7a-e2c3-4563-a57d-31b97ce64dc5)]
interface nsIXMLHttpRequestEventTarget : nsIDOMEventTarget {
// event handler attributes
};
[scriptable, builtinclass, uuid(df3796fa-d98a-4185-9dda-d2f2b56a5d38)]
[builtinclass, uuid(df3796fa-d98a-4185-9dda-d2f2b56a5d38)]
interface nsIXMLHttpRequestUpload : nsIXMLHttpRequestEventTarget {
// for future use
};

View File

@ -2881,14 +2881,15 @@ nsContentUtils::IsExactSitePermDeny(nsIPrincipal* aPrincipal, const char* aType)
static const char *gEventNames[] = {"event"};
static const char *gSVGEventNames[] = {"evt"};
// for b/w compat, the first name to onerror is still 'event', even though it
// is actually the error message. (pre this code, the other 2 were not avail.)
// XXXmarkh - a quick lxr shows no affected code - should we correct this?
static const char *gOnErrorNames[] = {"event", "source", "lineno"};
// is actually the error message
static const char *gOnErrorNames[] = {"event", "source", "lineno",
"colno", "error"};
// static
void
nsContentUtils::GetEventArgNames(int32_t aNameSpaceID,
nsIAtom *aEventName,
bool aIsForWindow,
uint32_t *aArgCount,
const char*** aArgArray)
{
@ -2899,7 +2900,7 @@ nsContentUtils::GetEventArgNames(int32_t aNameSpaceID,
// JSEventHandler is what does the arg magic for onerror, and it does
// not seem to take the namespace into account. So we let onerror in all
// namespaces get the 3 arg names.
if (aEventName == nsGkAtoms::onerror) {
if (aEventName == nsGkAtoms::onerror && aIsForWindow) {
SET_EVENT_ARG_NAMES(gOnErrorNames);
} else if (aNameSpaceID == kNameSpaceID_SVG) {
SET_EVENT_ARG_NAMES(gSVGEventNames);

View File

@ -79,7 +79,7 @@ nsXMLNameSpaceMap::AddPrefix(nsIAtom *aPrefix, nsString &aURI)
int32_t
nsXMLNameSpaceMap::FindNameSpaceID(nsIAtom *aPrefix) const
{
uint32_t index = mNameSpaces.IndexOf(aPrefix);
size_t index = mNameSpaces.IndexOf(aPrefix);
if (index != mNameSpaces.NoIndex) {
return mNameSpaces[index].nameSpaceID;
}
@ -93,7 +93,7 @@ nsXMLNameSpaceMap::FindNameSpaceID(nsIAtom *aPrefix) const
nsIAtom*
nsXMLNameSpaceMap::FindPrefix(int32_t aNameSpaceID) const
{
uint32_t index = mNameSpaces.IndexOf(aNameSpaceID);
size_t index = mNameSpaces.IndexOf(aNameSpaceID);
if (index != mNameSpaces.NoIndex) {
return mNameSpaces[index].prefix;
}

View File

@ -1390,7 +1390,7 @@ CanvasRenderingContext2D::SetStyleFromUnion(const StringOrCanvasGradientOrCanvas
return;
}
MOZ_ASSUME_UNREACHABLE("Invalid union value");
MOZ_ASSERT_UNREACHABLE("Invalid union value");
}
void

View File

@ -18,4 +18,4 @@ support-files =
skipped_tests_winxp.txt
[test_webgl_conformance_test_suite.html]
skip-if = (toolkit == 'android') || (buildapp == 'b2g') #android(bug 865443- seperate suite - the non_conf* tests pass except for one on armv6 tests)
skip-if = (buildapp == 'b2g') # bug 865443- separate suite - the non_conf* tests pass except for one on armv6 tests

View File

@ -26,6 +26,7 @@ conformance/glsl/functions/glsl-function-smoothstep-float.html
conformance/glsl/functions/glsl-function-smoothstep-gentype.html
conformance/glsl/functions/glsl-function-step-float.html
conformance/glsl/functions/glsl-function-step-gentype.html
conformance/misc/uninitialized-test.html
conformance/more/conformance/quickCheckAPI-B2.html
conformance/programs/gl-getshadersource.html
conformance/reading/read-pixels-test.html

View File

@ -361,7 +361,8 @@ HTMLFormControlsCollection::GetFirstNamedElement(const nsAString& aName, bool& a
nsINodeList& nodelist = result.GetAsNodeList();
return nodelist.Item(0)->AsElement();
}
MOZ_ASSUME_UNREACHABLE("Should only have Elements and NodeLists here.");
MOZ_ASSERT_UNREACHABLE("Should only have Elements and NodeLists here.");
return nullptr;
}
void
@ -383,7 +384,7 @@ HTMLFormControlsCollection::NamedGetter(const nsAString& aName,
aResult.SetValue().SetAsNodeList() = nodelist;
return;
}
MOZ_ASSERT(false, "Should only have Elements and NodeLists here.");
MOZ_ASSERT_UNREACHABLE("Should only have Elements and NodeLists here.");
}
static PLDHashOperator

View File

@ -1252,7 +1252,7 @@ HTMLFormElement::RemoveElement(nsGenericHTMLFormElement* aChild,
// Find the index of the child. This will be used later if necessary
// to find the default submit.
uint32_t index = controls.IndexOf(aChild);
size_t index = controls.IndexOf(aChild);
NS_ENSURE_STATE(index != controls.NoIndex);
controls.RemoveElementAt(index);
@ -2339,7 +2339,7 @@ HTMLFormElement::AddImageElementToTable(HTMLImageElement* aChild,
nsresult
HTMLFormElement::RemoveImageElement(HTMLImageElement* aChild)
{
uint32_t index = mImageElements.IndexOf(aChild);
size_t index = mImageElements.IndexOf(aChild);
NS_ENSURE_STATE(index != mImageElements.NoIndex);
mImageElements.RemoveElementAt(index);

View File

@ -2518,7 +2518,7 @@ HTMLInputElement::GetDisplayFileName(nsAString& aValue) const
}
} else {
nsString count;
count.AppendInt(mFiles.Length());
count.AppendInt(int(mFiles.Length()));
const char16_t* params[] = { count.get() };
nsContentUtils::FormatLocalizedString(nsContentUtils::eFORMS_PROPERTIES,

View File

@ -1146,7 +1146,7 @@ HTMLContentSink::FlushTags()
NS_IMETHODIMP
HTMLContentSink::SetDocumentCharset(nsACString& aCharset)
{
MOZ_ASSUME_UNREACHABLE("<meta charset> case doesn't occur with about:blank");
MOZ_ASSERT_UNREACHABLE("<meta charset> case doesn't occur with about:blank");
return NS_ERROR_NOT_IMPLEMENTED;
}

View File

@ -31,14 +31,14 @@ AudioNodeExternalInputStream::TrackMapEntry::~TrackMapEntry()
}
}
uint32_t
size_t
AudioNodeExternalInputStream::GetTrackMapEntry(const StreamBuffer::Track& aTrack,
GraphTime aFrom)
{
AudioSegment* segment = aTrack.Get<AudioSegment>();
// Check the map for an existing entry corresponding to the input track.
for (uint32_t i = 0; i < mTrackMap.Length(); ++i) {
for (size_t i = 0; i < mTrackMap.Length(); ++i) {
TrackMapEntry* map = &mTrackMap[i];
if (map->mTrackID == aTrack.GetID()) {
return i;
@ -58,7 +58,7 @@ AudioNodeExternalInputStream::GetTrackMapEntry(const StreamBuffer::Track& aTrack
// Create a speex resampler with the same sample rate and number of channels
// as the track.
SpeexResamplerState* resampler = nullptr;
uint32_t channelCount = std::min((*ci).mChannelData.Length(),
size_t channelCount = std::min((*ci).mChannelData.Length(),
WebAudioUtils::MaxChannelCount);
if (aTrack.GetRate() != mSampleRate) {
resampler = speex_resampler_init(channelCount,
@ -340,7 +340,7 @@ AudioNodeExternalInputStream::ProcessInput(GraphTime aFrom, GraphTime aTo,
!tracks.IsEnded(); tracks.Next()) {
const StreamBuffer::Track& inputTrack = *tracks;
// Create a TrackMapEntry if necessary.
uint32_t trackMapIndex = GetTrackMapEntry(inputTrack, aFrom);
size_t trackMapIndex = GetTrackMapEntry(inputTrack, aFrom);
// Maybe there's nothing in this track yet. If so, ignore it. (While the
// track is only playing silence, we may not be able to determine the
// correct number of channels to start resampling.)

View File

@ -92,8 +92,8 @@ private:
* Creates a TrackMapEntry for the track, if needed. Returns the index
* of the TrackMapEntry or NoIndex if no entry is needed yet.
*/
uint32_t GetTrackMapEntry(const StreamBuffer::Track& aTrack,
GraphTime aFrom);
size_t GetTrackMapEntry(const StreamBuffer::Track& aTrack,
GraphTime aFrom);
};
}

View File

@ -29,8 +29,8 @@ EncodedBufferCache::AppendBuffer(nsTArray<uint8_t> & aBuf)
if (mTempFileEnabled) {
// has created temporary file, write buffer in it
for (uint32_t i = 0; i < mEncodedBuffers.Length(); i++) {
int64_t amount = PR_Write(mFD, mEncodedBuffers.ElementAt(i).Elements(), mEncodedBuffers.ElementAt(i).Length());
if (amount < mEncodedBuffers.ElementAt(i).Length()) {
int32_t amount = PR_Write(mFD, mEncodedBuffers.ElementAt(i).Elements(), mEncodedBuffers.ElementAt(i).Length());
if (amount < 0 || size_t(amount) < mEncodedBuffers.ElementAt(i).Length()) {
NS_WARNING("Failed to write media cache block!");
}
}

View File

@ -779,7 +779,7 @@ MediaCache::FindReusableBlock(TimeStamp aNow,
{
mReentrantMonitor.AssertCurrentThreadIn();
uint32_t length = std::min(uint32_t(aMaxSearchBlockIndex), mIndex.Length());
uint32_t length = std::min(uint32_t(aMaxSearchBlockIndex), uint32_t(mIndex.Length()));
if (aForStream && aForStreamBlock > 0 &&
uint32_t(aForStreamBlock) <= aForStream->mBlocks.Length()) {

View File

@ -144,7 +144,7 @@ private:
uint32_t end = std::min(GetAtOffset(aOffset + aCount, nullptr) + 1, GetSize());
for (uint32_t i = start; i < end; ++i) {
ResourceItem* item = ResourceAt(i);
uint32_t bytes = std::min(aCount, item->mData.Length() - offset);
uint32_t bytes = std::min(aCount, uint32_t(item->mData.Length() - offset));
if (bytes != 0) {
memcpy(aDest, &item->mData[offset], bytes);
offset = 0;

View File

@ -172,9 +172,9 @@ AnalyserNode::GetFloatFrequencyData(const Float32Array& aArray)
}
float* buffer = aArray.Data();
uint32_t length = std::min(aArray.Length(), mOutputBuffer.Length());
size_t length = std::min(size_t(aArray.Length()), mOutputBuffer.Length());
for (uint32_t i = 0; i < length; ++i) {
for (size_t i = 0; i < length; ++i) {
buffer[i] = WebAudioUtils::ConvertLinearToDecibels(mOutputBuffer[i], mMinDecibels);
}
}
@ -190,9 +190,9 @@ AnalyserNode::GetByteFrequencyData(const Uint8Array& aArray)
const double rangeScaleFactor = 1.0 / (mMaxDecibels - mMinDecibels);
unsigned char* buffer = aArray.Data();
uint32_t length = std::min(aArray.Length(), mOutputBuffer.Length());
size_t length = std::min(size_t(aArray.Length()), mOutputBuffer.Length());
for (uint32_t i = 0; i < length; ++i) {
for (size_t i = 0; i < length; ++i) {
const double decibels = WebAudioUtils::ConvertLinearToDecibels(mOutputBuffer[i], mMinDecibels);
// scale down the value to the range of [0, UCHAR_MAX]
const double scaled = std::max(0.0, std::min(double(UCHAR_MAX),
@ -205,9 +205,9 @@ void
AnalyserNode::GetFloatTimeDomainData(const Float32Array& aArray)
{
float* buffer = aArray.Data();
uint32_t length = std::min(aArray.Length(), mBuffer.Length());
size_t length = std::min(size_t(aArray.Length()), mBuffer.Length());
for (uint32_t i = 0; i < length; ++i) {
for (size_t i = 0; i < length; ++i) {
buffer[i] = mBuffer[(i + mWriteIndex) % mBuffer.Length()];;
}
}
@ -216,9 +216,9 @@ void
AnalyserNode::GetByteTimeDomainData(const Uint8Array& aArray)
{
unsigned char* buffer = aArray.Data();
uint32_t length = std::min(aArray.Length(), mBuffer.Length());
size_t length = std::min(size_t(aArray.Length()), mBuffer.Length());
for (uint32_t i = 0; i < length; ++i) {
for (size_t i = 0; i < length; ++i) {
const float value = mBuffer[(i + mWriteIndex) % mBuffer.Length()];
// scale the value to the range of [0, UCHAR_MAX]
const float scaled = std::max(0.0f, std::min(float(UCHAR_MAX),

View File

@ -109,10 +109,10 @@ AudioNode::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
}
template <class InputNode>
static uint32_t
static size_t
FindIndexOfNode(const nsTArray<InputNode>& aInputNodes, const AudioNode* aNode)
{
for (uint32_t i = 0; i < aInputNodes.Length(); ++i) {
for (size_t i = 0; i < aInputNodes.Length(); ++i) {
if (aInputNodes[i].mInputNode == aNode) {
return i;
}
@ -121,11 +121,11 @@ FindIndexOfNode(const nsTArray<InputNode>& aInputNodes, const AudioNode* aNode)
}
template <class InputNode>
static uint32_t
static size_t
FindIndexOfNodeWithPorts(const nsTArray<InputNode>& aInputNodes, const AudioNode* aNode,
uint32_t aInputPort, uint32_t aOutputPort)
{
for (uint32_t i = 0; i < aInputNodes.Length(); ++i) {
for (size_t i = 0; i < aInputNodes.Length(); ++i) {
if (aInputNodes[i].mInputNode == aNode &&
aInputNodes[i].mInputPort == aInputPort &&
aInputNodes[i].mOutputPort == aOutputPort) {
@ -147,27 +147,27 @@ AudioNode::DisconnectFromGraph()
// Disconnect inputs. We don't need them anymore.
while (!mInputNodes.IsEmpty()) {
uint32_t i = mInputNodes.Length() - 1;
size_t i = mInputNodes.Length() - 1;
nsRefPtr<AudioNode> input = mInputNodes[i].mInputNode;
mInputNodes.RemoveElementAt(i);
input->mOutputNodes.RemoveElement(this);
}
while (!mOutputNodes.IsEmpty()) {
uint32_t i = mOutputNodes.Length() - 1;
size_t i = mOutputNodes.Length() - 1;
nsRefPtr<AudioNode> output = mOutputNodes[i].forget();
mOutputNodes.RemoveElementAt(i);
uint32_t inputIndex = FindIndexOfNode(output->mInputNodes, this);
size_t inputIndex = FindIndexOfNode(output->mInputNodes, this);
// It doesn't matter which one we remove, since we're going to remove all
// entries for this node anyway.
output->mInputNodes.RemoveElementAt(inputIndex);
}
while (!mOutputParams.IsEmpty()) {
uint32_t i = mOutputParams.Length() - 1;
size_t i = mOutputParams.Length() - 1;
nsRefPtr<AudioParam> output = mOutputParams[i].forget();
mOutputParams.RemoveElementAt(i);
uint32_t inputIndex = FindIndexOfNode(output->InputNodes(), this);
size_t inputIndex = FindIndexOfNode(output->InputNodes(), this);
// It doesn't matter which one we remove, since we're going to remove all
// entries for this node anyway.
output->RemoveInputNode(inputIndex);

View File

@ -16,7 +16,7 @@ namespace dom {
// 32 is the minimum required by the spec and matches what is used by blink.
// The limit protects against large memory allocations.
const uint32_t WebAudioUtils::MaxChannelCount = 32;
const size_t WebAudioUtils::MaxChannelCount = 32;
struct ConvertTimeToTickHelper
{

View File

@ -25,7 +25,7 @@ namespace dom {
class AudioParamTimeline;
struct WebAudioUtils {
static const uint32_t MaxChannelCount;
static const size_t MaxChannelCount;
static bool FuzzyEqual(float v1, float v2)
{

View File

@ -14,7 +14,7 @@
interface SpeechRecognitionResultList;
[scriptable, builtinclass, uuid(98dded70-33af-42d5-819d-e15b6f4a3aba)]
[builtinclass, uuid(98dded70-33af-42d5-819d-e15b6f4a3aba)]
interface nsIDOMSpeechRecognitionEvent : nsIDOMEvent {
[noscript] void initSpeechRecognitionEvent(in DOMString eventTypeArg,
in boolean canBubbleArg,

View File

@ -12,7 +12,7 @@
#include "nsIDOMEvent.idl"
[scriptable, builtinclass, uuid(b5240841-dc69-43dd-bcf1-9306b8ddaa09)]
[uuid(b5240841-dc69-43dd-bcf1-9306b8ddaa09)]
interface nsIDOMSpeechSynthesisEvent : nsIDOMEvent {
[noscript] void initSpeechSynthesisEvent(in DOMString aEventTypeArg,
in boolean aCanBubbleArg,

View File

@ -1033,7 +1033,7 @@ XULDocument::AttributeChanged(nsIDocument* aDocument,
attrSet,
needsAttrChange);
uint32_t index =
size_t index =
mDelayedAttrChangeBroadcasts.IndexOf(delayedUpdate,
0, nsDelayedBroadcastUpdate::Comparator());
if (index != mDelayedAttrChangeBroadcasts.NoIndex) {

View File

@ -1042,11 +1042,11 @@ MainProcessRunnable::Run()
case eWaitingToOpenCacheFileForRead:
case eOpened:
case eFinished: {
MOZ_ASSUME_UNREACHABLE("Shouldn't Run() in this state");
MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("Shouldn't Run() in this state");
}
}
MOZ_ASSUME_UNREACHABLE("Corrupt state");
MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("Corrupt state");
return NS_OK;
}
@ -1511,11 +1511,11 @@ ChildProcessRunnable::Run()
case eOpening:
case eOpened:
case eFinished: {
MOZ_ASSUME_UNREACHABLE("Shouldn't Run() in this state");
MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("Shouldn't Run() in this state");
}
}
MOZ_ASSUME_UNREACHABLE("Corrupt state");
MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE("Corrupt state");
return NS_OK;
}
@ -1824,13 +1824,13 @@ public:
WaitForStoragesToComplete(nsTArray<nsIOfflineStorage*>& aStorages,
nsIRunnable* aCallback) MOZ_OVERRIDE
{
MOZ_ASSUME_UNREACHABLE("There are no storages");
MOZ_ASSERT_UNREACHABLE("There are no storages");
}
virtual void
AbortTransactionsForStorage(nsIOfflineStorage* aStorage) MOZ_OVERRIDE
{
MOZ_ASSUME_UNREACHABLE("There are no storages");
MOZ_ASSERT_UNREACHABLE("There are no storages");
}
virtual bool

View File

@ -750,9 +750,9 @@ AudioChannelService::Observe(nsISupports* aSubject, const char* aTopic, const ch
} else if (!keyStr.EqualsLiteral("audio.volume.bt_sco")) {
// bt_sco is not a valid audio channel so we manipulate it in
// AudioManager.cpp. And the others should not be used.
// We didn't use MOZ_ASSUME_UNREACHABLE here because any web content who
// has permission of mozSettings can set any names then it can be easy to
// crash the B2G.
// We didn't use MOZ_CRASH or MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE here
// because any web content who has permission of mozSettings can set any
// names then it can be easy to crash the B2G.
NS_WARNING("unexpected audio channel for volume control");
}
}

View File

@ -68,7 +68,7 @@ public:
return mStack[i];
}
}
MOZ_ASSUME_UNREACHABLE("Non-empty stack should always have an entry point");
MOZ_CRASH("Non-empty stack should always have an entry point");
}
nsIGlobalObject* EntryGlobal() {

View File

@ -2021,47 +2021,11 @@ DefineInterfaceConstants(JSContext *cx, JS::Handle<JSObject*> obj, const nsIID *
JS::Rooted<JS::Value> v(cx);
for (i = parent_constant_count; i < constant_count; i++) {
const nsXPTConstant *c = nullptr;
nsXPIDLCString name;
rv = if_info->GetConstant(i, &v, getter_Copies(name));
NS_ENSURE_TRUE(NS_SUCCEEDED(rv), rv);
rv = if_info->GetConstant(i, &c);
NS_ENSURE_TRUE(NS_SUCCEEDED(rv) && c, rv);
uint16_t type = c->GetType().TagPart();
v.setUndefined();
switch (type) {
case nsXPTType::T_I8:
case nsXPTType::T_U8:
{
v.setInt32(c->GetValue()->val.u8);
break;
}
case nsXPTType::T_I16:
case nsXPTType::T_U16:
{
v.setInt32(c->GetValue()->val.u16);
break;
}
case nsXPTType::T_I32:
{
v = JS_NumberValue(c->GetValue()->val.i32);
break;
}
case nsXPTType::T_U32:
{
v = JS_NumberValue(c->GetValue()->val.u32);
break;
}
default:
{
#ifdef DEBUG
NS_ERROR("Non-numeric constant found in interface.");
#endif
continue;
}
}
if (!::JS_DefineProperty(cx, obj, c->GetName(), v,
if (!::JS_DefineProperty(cx, obj, name, v,
JSPROP_ENUMERATE | JSPROP_READONLY |
JSPROP_PERMANENT,
JS_PropertyStub, JS_StrictPropertyStub)) {

View File

@ -7061,6 +7061,22 @@ nsGlobalWindow::ScrollTo(const CSSIntPoint& aScroll)
}
}
void
nsGlobalWindow::MozRequestOverfill(OverfillCallback& aCallback,
mozilla::ErrorResult& aError)
{
nsIWidget* widget = nsContentUtils::WidgetForDocument(mDoc);
if (widget) {
mozilla::layers::LayerManager* manager = widget->GetLayerManager();
if (manager) {
manager->RequestOverfill(&aCallback);
return;
}
}
aError.Throw(NS_ERROR_NOT_AVAILABLE);
}
NS_IMETHODIMP
nsGlobalWindow::ScrollBy(int32_t aXScrollDif, int32_t aYScrollDif)
{
@ -8978,6 +8994,9 @@ nsGlobalWindow::ShowModalDialog(JSContext* aCx, const nsAString& aUrl,
aError = nsContentUtils::XPConnect()->JSToVariant(aCx,
aArgument,
getter_AddRefs(args));
if (aError.Failed()) {
return JS::UndefinedValue();
}
nsCOMPtr<nsIVariant> retVal = ShowModalDialog(aUrl, args, aOptions, aError);
if (aError.Failed()) {

View File

@ -910,6 +910,7 @@ public:
{
return GetScrollY(aError);
}
void MozRequestOverfill(mozilla::dom::OverfillCallback& aCallback, mozilla::ErrorResult& aError);
int32_t GetScreenX(mozilla::ErrorResult& aError);
void SetScreenX(int32_t aScreenX, mozilla::ErrorResult& aError);
int32_t GetScreenY(mozilla::ErrorResult& aError);

View File

@ -12,7 +12,7 @@ interface nsICursorContinueCallback : nsISupports
void handleContinue();
};
[scriptable, builtinclass, uuid(062ea35a-5158-425a-b7bc-3ae9daa84398)]
[builtinclass, uuid(062ea35a-5158-425a-b7bc-3ae9daa84398)]
interface nsIDOMDOMCursor : nsISupports
{
readonly attribute boolean done;

View File

@ -10,7 +10,7 @@ interface nsIDOMWindow;
interface nsIDOMDOMCursor;
interface nsICursorContinueCallback;
[scriptable, builtinclass, uuid(d4c7372a-661c-4798-9a13-af48128609e9)]
[builtinclass, uuid(d4c7372a-661c-4798-9a13-af48128609e9)]
interface nsIDOMDOMRequest : nsIDOMEventTarget
{
readonly attribute DOMString readyState; // "pending" or "done"

View File

@ -1824,7 +1824,7 @@ BluetoothHfpManager::OnUpdateSdpRecords(const nsAString& aDeviceAddress)
{
// UpdateSdpRecord() is not called so this callback function should not
// be invoked.
MOZ_ASSUME_UNREACHABLE("UpdateSdpRecords() should be called somewhere");
MOZ_ASSERT_UNREACHABLE("UpdateSdpRecords() should be called somewhere");
}
void

View File

@ -179,7 +179,7 @@ nsDOMCameraControl::nsDOMCameraControl(uint32_t aCameraId,
break;
default:
MOZ_ASSUME_UNREACHABLE("Unanticipated camera mode!");
MOZ_ASSERT_UNREACHABLE("Unanticipated camera mode!");
}
config.mPreviewSize.width = aInitialConfig.mPreviewSize.mWidth;
@ -1068,7 +1068,7 @@ nsDOMCameraControl::OnHardwareStateChange(CameraControlListener::HardwareState a
break;
default:
MOZ_ASSUME_UNREACHABLE("Unanticipated camera hardware state");
MOZ_ASSERT_UNREACHABLE("Unanticipated camera hardware state");
}
}
@ -1163,7 +1163,7 @@ nsDOMCameraControl::OnRecorderStateChange(CameraControlListener::RecorderState a
#endif
default:
MOZ_ASSUME_UNREACHABLE("Unanticipated video recorder error");
MOZ_ASSERT_UNREACHABLE("Unanticipated video recorder error");
return;
}
@ -1344,7 +1344,7 @@ nsDOMCameraControl::OnUserError(CameraControlListener::UserContext aContext, nsr
nsPrintfCString msg("Unhandled aContext=%u, aError=0x%x\n", aContext, aError);
NS_WARNING(msg.get());
}
MOZ_ASSUME_UNREACHABLE("Unhandled user error");
MOZ_ASSERT_UNREACHABLE("Unhandled user error");
return;
}

View File

@ -131,7 +131,7 @@ DOMCameraControlListener::OnPreviewStateChange(PreviewState aState)
default:
DOM_CAMERA_LOGE("Unknown preview state %d\n", aState);
MOZ_ASSUME_UNREACHABLE("Invalid preview state");
MOZ_ASSERT_UNREACHABLE("Invalid preview state");
return;
}
NS_DispatchToMainThread(new Callback(mDOMCameraControl, aState));

View File

@ -221,7 +221,9 @@ nsGonkCameraControl::SetConfigurationInternal(const Configuration& aConfig)
break;
default:
MOZ_ASSUME_UNREACHABLE("Unanticipated camera mode in SetConfigurationInternal()");
MOZ_ASSERT_UNREACHABLE("Unanticipated camera mode in SetConfigurationInternal()");
rv = NS_ERROR_FAILURE;
break;
}
DOM_CAMERA_LOGT("%s:%d\n", __func__, __LINE__);

View File

@ -849,10 +849,11 @@ EventListenerManager::CompileEventHandlerInternal(Listener* aListener,
lineNo = 1;
}
nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(mTarget);
uint32_t argCount;
const char **argNames;
nsContentUtils::GetEventArgNames(aElement->GetNameSpaceID(),
typeAtom,
typeAtom, win,
&argCount, &argNames);
// Wrap the event target, so that we can use it as the scope for the event
@ -902,7 +903,6 @@ EventListenerManager::CompileEventHandlerInternal(Listener* aListener,
NS_ENSURE_SUCCESS(result, result);
NS_ENSURE_TRUE(handler, NS_ERROR_FAILURE);
nsCOMPtr<nsPIDOMWindow> win = do_QueryInterface(mTarget);
if (jsEventHandler->EventName() == nsGkAtoms::onerror && win) {
nsRefPtr<OnErrorEventHandlerNonNull> handlerCallback =
new OnErrorEventHandlerNonNull(handler, /* aIncumbentGlobal = */ nullptr);

View File

@ -150,6 +150,7 @@ skip-if = toolkit == 'android' #CRASH_DUMP, RANDOM
[test_focus_disabled.html]
[test_messageEvent.html]
[test_moz_mouse_pixel_scroll_event.html]
[test_onerror_handler_args.html]
[test_wheel_default_action.html]
skip-if = buildapp == 'b2g' || e10s
[test_bug985988.html]

View File

@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1007790
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 1007790</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="application/javascript">
/** Test for Bug 1007790 **/
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
is(frames[0].onerror.toString(),
"function onerror(event, source, lineno, colno, error) {\n\n}",
"Should have the right arguments for onerror on window");
is($("content").onerror.toString(),
"function onerror(event) {\n\n}",
"Should have the right arguments for onerror on element");
SimpleTest.finish();
});
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1007790">Mozilla Bug 1007790</a>
<p id="display"></p>
<div id="content" style="display: none" onerror="">
<iframe src="data:text/html,<body onerror=''>"></iframe>
</div>
<pre id="test">
</pre>
</body>
</html>

View File

@ -351,7 +351,7 @@ IDBCursor::ConvertDirection(mozilla::dom::IDBCursorDirection aDirection)
return PREV_UNIQUE;
default:
MOZ_ASSUME_UNREACHABLE("Unknown direction!");
MOZ_CRASH("Unknown direction!");
}
}
@ -492,7 +492,7 @@ IDBCursor::ContinueInternal(const Key& aKey, int32_t aCount, ErrorResult& aRv)
break;
default:
MOZ_ASSUME_UNREACHABLE("Unknown cursor type!");
MOZ_CRASH("Unknown cursor type!");
}
nsresult rv = helper->DispatchToTransactionPool();
@ -560,7 +560,7 @@ IDBCursor::WrapObject(JSContext* aCx)
return IDBCursorBinding::Wrap(aCx, this);
default:
MOZ_ASSUME_UNREACHABLE("Bad type!");
MOZ_CRASH("Bad type!");
}
}
@ -583,7 +583,7 @@ IDBCursor::GetDirection() const
return mozilla::dom::IDBCursorDirection::Prevunique;
default:
MOZ_ASSUME_UNREACHABLE("Bad direction!");
MOZ_CRASH("Bad direction!");
}
}
@ -606,7 +606,7 @@ IDBCursor::GetSource(OwningIDBObjectStoreOrIDBIndex& aSource) const
break;
default:
MOZ_ASSUME_UNREACHABLE("Bad type!");
MOZ_ASSERT_UNREACHABLE("Bad type!");
}
}
@ -724,7 +724,7 @@ IDBCursor::Continue(JSContext* aCx,
break;
default:
MOZ_ASSUME_UNREACHABLE("Unknown direction type!");
MOZ_CRASH("Unknown direction type!");
}
}

View File

@ -4125,7 +4125,7 @@ OpenKeyCursorHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
break;
default:
MOZ_ASSUME_UNREACHABLE("Unknown direction type!");
MOZ_CRASH("Unknown direction type!");
}
nsCString firstQuery = queryStart + keyRangeClause + directionClause +
@ -4197,7 +4197,7 @@ OpenKeyCursorHelper::DoDatabaseWork(mozIStorageConnection* /* aConnection */)
break;
default:
MOZ_ASSUME_UNREACHABLE("Unknown direction type!");
MOZ_CRASH("Unknown direction type!");
}
mContinueQuery = queryStart + keyRangeClause + directionClause + openLimit;

View File

@ -258,7 +258,7 @@ TransactionThreadPool::FinishTransaction(IDBTransaction* aTransaction)
NS_ASSERTION(info, "We've never heard of this transaction?!?");
const nsTArray<nsString>& objectStoreNames = aTransaction->mObjectStoreNames;
for (uint32_t index = 0, count = objectStoreNames.Length(); index < count;
for (size_t index = 0, count = objectStoreNames.Length(); index < count;
index++) {
TransactionInfoPair* blockInfo =
dbTransactionInfo->blockingTransactions.Get(objectStoreNames[index]);
@ -269,7 +269,7 @@ TransactionThreadPool::FinishTransaction(IDBTransaction* aTransaction)
blockInfo->lastBlockingReads = nullptr;
}
uint32_t i = blockInfo->lastBlockingWrites.IndexOf(info);
size_t i = blockInfo->lastBlockingWrites.IndexOf(info);
if (i != blockInfo->lastBlockingWrites.NoIndex) {
blockInfo->lastBlockingWrites.RemoveElementAt(i);
}

View File

@ -6,7 +6,7 @@
interface mozIDOMApplication;
[scriptable, builtinclass, uuid(453ae38a-8d8d-465f-a718-3f01240f8f75)]
[builtinclass, uuid(453ae38a-8d8d-465f-a718-3f01240f8f75)]
interface nsIDOMMozApplicationEvent : nsIDOMEvent
{
readonly attribute mozIDOMApplication application;

View File

@ -5,7 +5,7 @@
#include "domstubs.idl"
[scriptable, uuid(B2F824C4-D9D3-499B-8D3B-45C8245497C6)]
[uuid(B2F824C4-D9D3-499B-8D3B-45C8245497C6)]
interface nsIDOMClientRect : nsISupports
{
readonly attribute float left;

View File

@ -5,7 +5,7 @@
#include "domstubs.idl"
[scriptable, uuid(f474c567-cbcb-458f-abad-ae42363da287)]
[uuid(f474c567-cbcb-458f-abad-ae42363da287)]
interface nsIDOMClientRectList : nsISupports
{
readonly attribute unsigned long length;

View File

@ -5,7 +5,7 @@
#include "domstubs.idl"
[scriptable, uuid(55226663-fe68-48ba-addf-08e32eaab569)]
[uuid(55226663-fe68-48ba-addf-08e32eaab569)]
interface nsIDOMHistory : nsISupports
{
// Empty interface that exists only for extension backwards compat

View File

@ -5,7 +5,7 @@
#include "nsIDOMEventTarget.idl"
[scriptable, builtinclass, uuid(e732649a-4f78-4ded-abe1-dbdc36fd59d3)]
[builtinclass, uuid(e732649a-4f78-4ded-abe1-dbdc36fd59d3)]
interface nsIDOMScreen : nsIDOMEventTarget
{
readonly attribute long top;

View File

@ -13,7 +13,7 @@
* be referenced directly via a canvas context 2d rather than this interface,
* and that should be preferred in new code.
*/
[scriptable, uuid(4417cab7-c7eb-4e0c-b00a-c43842f0cba8)]
[uuid(4417cab7-c7eb-4e0c-b00a-c43842f0cba8)]
interface nsIDOMCanvasRenderingContext2D : nsISupports
{
// Show the caret if appropriate when drawing

View File

@ -14,7 +14,7 @@
* http://www.w3.org/TR/DOM-Level-2-Core/
*/
[scriptable, builtinclass, uuid(a974a4d3-2ff1-445b-8b8e-0aada5d4eedc)]
[builtinclass, uuid(a974a4d3-2ff1-445b-8b8e-0aada5d4eedc)]
interface nsIDOMAttr : nsIDOMNode
{
readonly attribute DOMString name;

View File

@ -15,7 +15,7 @@
* http://www.w3.org/TR/DOM-Level-2-Core/
*/
[scriptable, uuid(0f401429-30b3-46de-b1bf-d7d5fa7563f9)]
[uuid(0f401429-30b3-46de-b1bf-d7d5fa7563f9)]
interface nsIDOMCDATASection : nsIDOMText
{
};

View File

@ -13,7 +13,7 @@
* http://www.w3.org/TR/DOM-Level-2-Core/
*/
[scriptable, uuid(84f72a38-1873-46f8-937c-1df22d7e7cae)]
[uuid(84f72a38-1873-46f8-937c-1df22d7e7cae)]
interface nsIDOMCharacterData : nsIDOMNode
{
attribute DOMString data;

View File

@ -14,7 +14,7 @@
* http://www.w3.org/TR/DOM-Level-2-Core/
*/
[scriptable, uuid(e702a5d2-3aa8-4788-b048-2d3b3e6d16f2)]
[uuid(e702a5d2-3aa8-4788-b048-2d3b3e6d16f2)]
interface nsIDOMComment : nsIDOMCharacterData
{
};

View File

@ -17,7 +17,7 @@
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#domexception
*/
[scriptable, uuid(5bd766d3-57a9-4833-995d-dbe21da29595)]
[uuid(5bd766d3-57a9-4833-995d-dbe21da29595)]
interface nsIDOMDOMException : nsISupports
{
const unsigned short INDEX_SIZE_ERR = 1;

View File

@ -32,7 +32,7 @@ interface nsIDOMLocation;
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
*/
[scriptable, uuid(d24d1118-a527-4d5a-9c4e-fb07dfc2fc27)]
[uuid(d24d1118-a527-4d5a-9c4e-fb07dfc2fc27)]
interface nsIDOMDocument : nsIDOMNode
{
readonly attribute nsIDOMDocumentType doctype;

View File

@ -14,7 +14,7 @@
* http://www.w3.org/TR/DOM-Level-2-Core/
*/
[scriptable, builtinclass, uuid(75a237af-133e-40f0-8196-2a172867c41a)]
[builtinclass, uuid(75a237af-133e-40f0-8196-2a172867c41a)]
interface nsIDOMDocumentFragment : nsIDOMNode
{
/**

View File

@ -15,7 +15,7 @@
* http://www.w3.org/TR/DOM-Level-2-Core/
*/
[scriptable, uuid(aa7d28b2-7122-422d-8fcf-634771fb9ac1)]
[uuid(aa7d28b2-7122-422d-8fcf-634771fb9ac1)]
interface nsIDOMDocumentType : nsIDOMNode
{
readonly attribute DOMString name;

View File

@ -15,7 +15,7 @@ interface nsIDOMMozNamedAttrMap;
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-element
*/
[scriptable, uuid(989422ef-120d-4d29-8a56-6aa2505a8b02)]
[uuid(989422ef-120d-4d29-8a56-6aa2505a8b02)]
interface nsIDOMElement : nsIDOMNode
{
readonly attribute DOMString tagName;

View File

@ -10,7 +10,7 @@
* world where Attr no longer inherits from Node.
*/
[scriptable, uuid(cb5564cd-26ec-418f-a6d6-1d57cd2c971c)]
[uuid(cb5564cd-26ec-418f-a6d6-1d57cd2c971c)]
interface nsIDOMMozNamedAttrMap : nsISupports
{
nsIDOMAttr getNamedItem(in DOMString name);

View File

@ -17,7 +17,7 @@ interface nsIDOMUserDataHandler;
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
*/
[scriptable, uuid(56545150-a001-484e-9ed4-cb319eebd7b3)]
[uuid(56545150-a001-484e-9ed4-cb319eebd7b3)]
interface nsIDOMNode : nsISupports
{
const unsigned short ELEMENT_NODE = 1;

View File

@ -15,6 +15,8 @@
* http://www.w3.org/TR/DOM-Level-2-Core/
*/
// NOTE: Please do not attempt to make this not scriptable,
// see https://bugzilla.mozilla.org/show_bug.cgi?id=994964#c73.
[scriptable, uuid(450cf0ba-de90-4f86-85bf-e10cc8b8713f)]
interface nsIDOMNodeList : nsISupports
{

View File

@ -15,7 +15,7 @@
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
*/
[scriptable, uuid(91f2e856-5596-44d6-b396-0a02d8ec28c6)]
[uuid(91f2e856-5596-44d6-b396-0a02d8ec28c6)]
interface nsIDOMProcessingInstruction : nsIDOMCharacterData
{
readonly attribute DOMString target;

View File

@ -13,7 +13,7 @@
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html
*/
[scriptable, uuid(d14d13b4-21d5-49e2-8d59-76a24156db54)]
[uuid(d14d13b4-21d5-49e2-8d59-76a24156db54)]
interface nsIDOMText : nsIDOMCharacterData
{
nsIDOMText splitText(in unsigned long offset)

View File

@ -5,7 +5,7 @@
#include "nsIDOMDocument.idl"
[scriptable, uuid(ebf9f390-7cd2-4456-bc53-4869019370ea)]
[uuid(ebf9f390-7cd2-4456-bc53-4869019370ea)]
interface nsIDOMXMLDocument : nsIDOMDocument
{
// DOM Level 3 Load & Save, DocumentLS

View File

@ -13,7 +13,7 @@
* http://www.w3.org/TR/DOM-Level-2-Style
*/
[scriptable, uuid(f6df7293-2dc9-4cb9-9531-778caf4370e0)]
[uuid(f6df7293-2dc9-4cb9-9531-778caf4370e0)]
interface nsIDOMCSSPrimitiveValue : nsIDOMCSSValue
{
// UnitTypes

View File

@ -13,7 +13,7 @@
* http://www.w3.org/TR/DOM-Level-2-Style
*/
[scriptable, uuid(a6cf90be-15b3-11d2-932e-00805f8add32)]
[uuid(a6cf90be-15b3-11d2-932e-00805f8add32)]
interface nsIDOMCSSStyleDeclaration : nsISupports
{
attribute DOMString cssText;

View File

@ -13,7 +13,7 @@
* http://www.w3.org/TR/DOM-Level-2-Style
*/
[scriptable, uuid(a6cf90c2-15b3-11d2-932e-00805f8add32)]
[uuid(a6cf90c2-15b3-11d2-932e-00805f8add32)]
interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet
{
readonly attribute nsIDOMCSSRule ownerRule;

View File

@ -13,7 +13,7 @@
* http://www.w3.org/TR/DOM-Level-2-Style
*/
[scriptable, uuid(009f7ea5-9e80-41be-b008-db62f10823f2)]
[uuid(009f7ea5-9e80-41be-b008-db62f10823f2)]
interface nsIDOMCSSValue : nsISupports
{
// UnitTypes

View File

@ -6,7 +6,7 @@
#include "domstubs.idl"
#include "nsIDOMCSSValue.idl"
[scriptable, uuid(92364ed1-e364-4175-bc52-c2fe9671cbc7)]
[uuid(92364ed1-e364-4175-bc52-c2fe9671cbc7)]
interface nsIDOMCSSValueList : nsIDOMCSSValue
{
};

View File

@ -5,7 +5,7 @@
#include "domstubs.idl"
[scriptable, uuid(71735f62-ac5c-4236-9a1f-5ffb280d531c)]
[uuid(71735f62-ac5c-4236-9a1f-5ffb280d531c)]
interface nsIDOMRect : nsISupports
{
readonly attribute nsIDOMCSSPrimitiveValue top;

View File

@ -16,7 +16,7 @@ struct DeviceStorageFileDescriptor;
%}
[ptr] native DeviceStorageFdPtr(DeviceStorageFileDescriptor);
[scriptable, uuid(8b724547-3c78-4244-969a-f00a1f4ae0c3), builtinclass]
[uuid(8b724547-3c78-4244-969a-f00a1f4ae0c3), builtinclass]
interface nsIDOMDeviceStorage : nsIDOMEventTarget
{
[implicit_jscontext] attribute jsval onchange;

View File

@ -5,7 +5,7 @@
#include "domstubs.idl"
#include "nsIDOMEvent.idl"
[scriptable, uuid(30eaf0b9-8f3f-49fe-818e-7b7d9fbf8f95), builtinclass]
[uuid(30eaf0b9-8f3f-49fe-818e-7b7d9fbf8f95), builtinclass]
interface nsIDOMDeviceStorageChangeEvent : nsIDOMEvent
{

View File

@ -11,7 +11,7 @@
* http://dev.w3.org/csswg/css3-animations/#animation-events-
*/
[scriptable, builtinclass, uuid(b1bea1bc-689b-4e07-8cbc-ef342725f9a6)]
[builtinclass, uuid(b1bea1bc-689b-4e07-8cbc-ef342725f9a6)]
interface nsIDOMAnimationEvent : nsIDOMEvent {
readonly attribute DOMString animationName;
readonly attribute float elapsedTime;

View File

@ -15,7 +15,7 @@
*
*/
[scriptable, builtinclass, uuid(ee7b8943-440e-4cc3-b25e-c17c8a821d8b)]
[builtinclass, uuid(ee7b8943-440e-4cc3-b25e-c17c8a821d8b)]
interface nsIDOMBeforeUnloadEvent : nsIDOMEvent
{
/**

View File

@ -8,7 +8,7 @@
interface nsIDOMDataTransfer;
[scriptable, builtinclass, uuid(8D92944A-F2E5-41F4-9CF3-D85043B90CAC)]
[builtinclass, uuid(8D92944A-F2E5-41F4-9CF3-D85043B90CAC)]
interface nsIDOMClipboardEvent : nsIDOMEvent
{
readonly attribute nsIDOMDataTransfer clipboardData;

View File

@ -12,7 +12,7 @@
* For more information on this interface, please see
* http://dev.w3.org/html5/websockets/#closeevent
*/
[scriptable, builtinclass, uuid(0b85dc61-2436-4786-b153-097f5c3a33b6)]
[builtinclass, uuid(0b85dc61-2436-4786-b153-097f5c3a33b6)]
interface nsIDOMCloseEvent : nsIDOMEvent
{
readonly attribute boolean wasClean;

View File

@ -5,7 +5,7 @@
#include "nsIDOMEvent.idl"
[scriptable, builtinclass, uuid(3fdc07cb-3b2e-4c6e-a054-008a4f302202)]
[builtinclass, uuid(3fdc07cb-3b2e-4c6e-a054-008a4f302202)]
interface nsIDOMCommandEvent : nsIDOMEvent
{
readonly attribute DOMString command;

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