Merge mozilla-central to fx-team

This commit is contained in:
Carsten "Tomcat" Book 2013-12-18 16:13:04 +01:00
commit a973f2cd9b
11 changed files with 201 additions and 59 deletions

View File

@ -1,4 +1,4 @@
{
"revision": "7412c36923b59f6e4d7076de5be7e6ded6ddc586",
"revision": "444fa63091ea8641d08681f921631f8b7ddc0d88",
"repo_path": "/integration/gaia-central"
}

View File

@ -522,6 +522,7 @@ skip-if = toolkit == "gonk" # bug 945189
[test_bug895974.html]
[test_bug902847.html]
[test_bug907892.html]
[test_bug922681.html]
[test_bug927196.html]
[test_caretPositionFromPoint.html]
[test_classList.html]

View File

@ -0,0 +1,113 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=922681
-->
<head>
<meta charset="utf-8">
<title>Test for Bug 922681</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">
function testInnerHTMLParserInsertionMode() {
function testInnerHTML(el, input, output) {
el.innerHTML = input;
is(el.innerHTML, output, el.tagName.toLowerCase() + ': "' + input + '"');
}
var c;
c = document.createElement("html");
testInnerHTML(c, "", "<head></head><body></body>");
testInnerHTML(c, "xyz", "<head></head><body>xyz</body>");
testInnerHTML(c, "<input>", "<head></head><body><input></body>");
c = document.createElement("colgroup");
testInnerHTML(c, "abcdef", "");
testInnerHTML(c, "", "");
testInnerHTML(c, "\n", "\n");
testInnerHTML(c, "<col>", "<col>");
c = document.createElement("select");
testInnerHTML(c, "123", "123");
testInnerHTML(c, "<input>", "");
testInnerHTML(c, "\0", "");
testInnerHTML(c, "<col>", "");
testInnerHTML(c, "<option>", "<option></option>");
c = document.createElement("head");
testInnerHTML(c, "123", "123");
testInnerHTML(c, "\n", "\n");
c = document.createElement("frameset");
testInnerHTML(c, "456", "");
testInnerHTML(c, "\n", "\n");
testInnerHTML(c, "<input>", "");
testInnerHTML(c, "\0", "");
c = document.createElement("table");
testInnerHTML(c, "abc", "abc");
testInnerHTML(c, "<td>", "<tbody><tr><td></td></tr></tbody>");
testInnerHTML(c, "</body>", "");
testInnerHTML(c, "<input>", "<input>");
c = document.createElement("tr");
testInnerHTML(c, "xyz", "xyz");
testInnerHTML(c, "<td>", "<td></td>");
testInnerHTML(c, "</body>", "");
testInnerHTML(c, "<table>", "");
c = document.createElement("td");
testInnerHTML(c, "789", "789");
testInnerHTML(c, "\0", "");
testInnerHTML(c, "<td>", "");
c = document.createElement("th");
testInnerHTML(c, "789", "789");
testInnerHTML(c, "\0", "");
testInnerHTML(c, "</tr>", "");
c = document.createElement("caption");
testInnerHTML(c, "xyz", "xyz");
testInnerHTML(c, "\0", "");
testInnerHTML(c, "<td>", "");
testInnerHTML(c, "<dd>", "<dd></dd>");
testInnerHTML(c, "<body>", "");
function testTableBody(tag) {
var c = document.createElement(tag);
testInnerHTML(c, "abc", "abc");
testInnerHTML(c, "<td>", "<tr><td></td></tr>");
testInnerHTML(c, "</body>", "");
testInnerHTML(c, "<input>", "<input>");
}
testTableBody("thead");
testTableBody("tbody");
testTableBody("tfoot");
c = document.createElement("template");
testInnerHTML(c, "abc", "abc");
testInnerHTML(c, "<td>", "<td></td>");
testInnerHTML(c, "</template>", "");
testInnerHTML(c, "<input>", "<input>");
c = document.createElement("div");
testInnerHTML(c, "abc", "abc");
testInnerHTML(c, "<td>", "");
testInnerHTML(c, "</body>", "");
testInnerHTML(c, "<input>", "<input>");
SimpleTest.finish();
}
addLoadEvent(testInnerHTMLParserInsertionMode);
SimpleTest.waitForExplicitFinish();
</script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=922681">Mozilla Bug 922681</a>
<pre id="test">
</pre>
</body>
</html>

View File

@ -435,7 +435,7 @@ public:
~nsPingListener();
NS_IMETHODIMP StartTimeout();
nsresult StartTimeout();
private:
bool mRequireSameHost;
@ -451,11 +451,11 @@ nsPingListener::~nsPingListener()
{
if (mTimer) {
mTimer->Cancel();
mTimer = 0;
mTimer = nullptr;
}
}
NS_IMETHODIMP
nsresult
nsPingListener::StartTimeout()
{
nsCOMPtr<nsITimer> timer = do_CreateInstance(NS_TIMER_CONTRACTID);
@ -492,7 +492,13 @@ NS_IMETHODIMP
nsPingListener::OnStopRequest(nsIRequest *request, nsISupports *context,
nsresult status)
{
mLoadGroup = 0;
mLoadGroup = nullptr;
if (mTimer) {
mTimer->Cancel();
mTimer = nullptr;
}
return NS_OK;
}
@ -656,8 +662,7 @@ SendPing(void *closure, nsIContent *content, nsIURI *uri, nsIIOService *ios)
if (!pingListener)
return;
nsCOMPtr<nsIStreamListener> listener =
static_cast<nsIStreamListener*>(pingListener);
nsCOMPtr<nsIStreamListener> listener(pingListener);
// Observe redirects as well:
nsCOMPtr<nsIInterfaceRequestor> callbacks = do_QueryInterface(listener);

View File

@ -315,11 +315,13 @@ BluetoothAdapter::Notify(const BluetoothSignal& aData)
DispatchTrustedEvent(event);
} else if (aData.name().EqualsLiteral("PropertyChanged")) {
MOZ_ASSERT(v.type() == BluetoothValue::TArrayOfBluetoothNamedValue);
const InfallibleTArray<BluetoothNamedValue>& arr =
v.get_ArrayOfBluetoothNamedValue();
MOZ_ASSERT(arr.Length() == 1);
SetPropertyByValue(arr[0]);
for (uint32_t i = 0, propCount = arr.Length(); i < propCount; ++i) {
SetPropertyByValue(arr[i]);
}
} else if (aData.name().EqualsLiteral(DISCOVERY_STATE_CHANGED_ID)) {
MOZ_ASSERT(v.type() == BluetoothValue::Tbool);
bool isDiscovering = v.get_bool();

View File

@ -181,14 +181,14 @@ BluetoothDevice::Notify(const BluetoothSignal& aData)
BluetoothValue v = aData.value();
if (aData.name().EqualsLiteral("PropertyChanged")) {
NS_ASSERTION(v.type() == BluetoothValue::TArrayOfBluetoothNamedValue,
"PropertyChanged: Invalid value type");
MOZ_ASSERT(v.type() == BluetoothValue::TArrayOfBluetoothNamedValue);
const InfallibleTArray<BluetoothNamedValue>& arr =
v.get_ArrayOfBluetoothNamedValue();
NS_ASSERTION(arr.Length() == 1,
"Got more than one property in a change message!");
SetPropertyByValue(arr[0]);
for (uint32_t i = 0, propCount = arr.Length(); i < propCount; ++i) {
SetPropertyByValue(arr[i]);
}
} else {
#ifdef DEBUG
nsCString warningMsg;

View File

@ -289,19 +289,18 @@ AdapterStateChangeCallback(bt_state_t aStatus)
}
/**
* AdapterPropertiesChangeCallback will be called after enable() but before
* AdapterStateChangeCallback sIsBtEnabled get updated.
* At that moment, both BluetoothManager/BluetoothAdapter does not register
* observer yet.
* AdapterPropertiesCallback will be called after enable() but before
* AdapterStateChangeCallback sIsBtEnabled get updated. At that moment, both
* BluetoothManager/BluetoothAdapter does not register observer yet.
*/
static void
AdapterPropertiesChangeCallback(bt_status_t aStatus, int aNumProperties,
bt_property_t *aProperties)
AdapterPropertiesCallback(bt_status_t aStatus, int aNumProperties,
bt_property_t *aProperties)
{
MOZ_ASSERT(!NS_IsMainThread());
BluetoothValue propertyValue;
InfallibleTArray<BluetoothNamedValue> propertiesArray;
InfallibleTArray<BluetoothNamedValue> props;
for (int i = 0; i < aNumProperties; i++) {
bt_property_t p = aProperties[i];
@ -309,14 +308,14 @@ AdapterPropertiesChangeCallback(bt_status_t aStatus, int aNumProperties,
if (p.type == BT_PROPERTY_BDADDR) {
BdAddressTypeToString((bt_bdaddr_t*)p.val, sAdapterBdAddress);
propertyValue = sAdapterBdAddress;
propertiesArray.AppendElement(
props.AppendElement(
BluetoothNamedValue(NS_LITERAL_STRING("Address"), propertyValue));
} else if (p.type == BT_PROPERTY_BDNAME) {
// Construct nsCString here because Bd name returned from bluedroid
// is missing a null terminated character after SetProperty.
propertyValue = sAdapterBdName = NS_ConvertUTF8toUTF16(
nsCString((char*)p.val, p.len));
propertiesArray.AppendElement(
props.AppendElement(
BluetoothNamedValue(NS_LITERAL_STRING("Name"), propertyValue));
} else if (p.type == BT_PROPERTY_ADAPTER_SCAN_MODE) {
bt_scan_mode_t newMode = *(bt_scan_mode_t*)p.val;
@ -327,11 +326,11 @@ AdapterPropertiesChangeCallback(bt_status_t aStatus, int aNumProperties,
propertyValue = sAdapterDiscoverable = false;
}
propertiesArray.AppendElement(
props.AppendElement(
BluetoothNamedValue(NS_LITERAL_STRING("Discoverable"), propertyValue));
} else if (p.type == BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT) {
propertyValue = sAdapterDiscoverableTimeout = *(uint32_t*)p.val;
propertiesArray.AppendElement(
props.AppendElement(
BluetoothNamedValue(NS_LITERAL_STRING("DiscoverableTimeout"),
propertyValue));
} else if (p.type == BT_PROPERTY_ADAPTER_BONDED_DEVICES) {
@ -352,45 +351,44 @@ AdapterPropertiesChangeCallback(bt_status_t aStatus, int aNumProperties,
}
propertyValue = sAdapterBondedAddressArray;
propertiesArray.AppendElement(
props.AppendElement(
BluetoothNamedValue(NS_LITERAL_STRING("Devices"), propertyValue));
} else if (p.type == BT_PROPERTY_UUIDS) {
//FIXME: This will be implemented in the later patchset
return;
continue;
} else {
BT_LOGD("Unhandled adapter property type: %d", p.type);
return;
continue;
}
}
BluetoothValue value(propertiesArray);
BluetoothSignal signal(NS_LITERAL_STRING("PropertyChanged"),
NS_LITERAL_STRING(KEY_ADAPTER), value);
nsRefPtr<DistributeBluetoothSignalTask>
t = new DistributeBluetoothSignalTask(signal);
if (NS_FAILED(NS_DispatchToMainThread(t))) {
BT_WARNING("Failed to dispatch to main thread!");
}
NS_ENSURE_TRUE_VOID(props.Length() > 0);
// bluedroid BTU task was stored in the task queue, see GKI_send_msg
if (!sSetPropertyRunnableArray.IsEmpty()) {
DispatchBluetoothReply(sSetPropertyRunnableArray[0], BluetoothValue(true),
EmptyString());
sSetPropertyRunnableArray.RemoveElementAt(0);
}
BluetoothValue value(props);
BluetoothSignal signal(NS_LITERAL_STRING("PropertyChanged"),
NS_LITERAL_STRING(KEY_ADAPTER), value);
nsRefPtr<DistributeBluetoothSignalTask>
t = new DistributeBluetoothSignalTask(signal);
if (NS_FAILED(NS_DispatchToMainThread(t))) {
BT_WARNING("Failed to dispatch to main thread!");
}
// bluedroid BTU task was stored in the task queue, see GKI_send_msg
if (!sSetPropertyRunnableArray.IsEmpty()) {
DispatchBluetoothReply(sSetPropertyRunnableArray[0], BluetoothValue(true),
EmptyString());
sSetPropertyRunnableArray.RemoveElementAt(0);
}
}
/*
* RemoteDevicePropertiesChangeCallback will be called, as the
* following conditions:
/**
* RemoteDevicePropertiesCallback will be called, as the following conditions:
* 1. When BT is turning on, bluedroid automatically execute this callback
* 2. When get_remote_device_properties()
*/
static void
RemoteDevicePropertiesChangeCallback(bt_status_t aStatus,
bt_bdaddr_t *aBdAddress,
int aNumProperties,
bt_property_t *aProperties)
RemoteDevicePropertiesCallback(bt_status_t aStatus, bt_bdaddr_t *aBdAddress,
int aNumProperties, bt_property_t *aProperties)
{
MOZ_ASSERT(!NS_IsMainThread());
@ -429,6 +427,15 @@ RemoteDevicePropertiesChangeCallback(bt_status_t aStatus,
}
}
// Update to registered BluetoothDevice objects
BluetoothSignal signal(NS_LITERAL_STRING("PropertyChanged"),
remoteDeviceBdAddress, props);
nsRefPtr<DistributeBluetoothSignalTask>
t = new DistributeBluetoothSignalTask(signal);
if (NS_FAILED(NS_DispatchToMainThread(t))) {
BT_WARNING("Failed to dispatch to main thread!");
}
// Use address as the index
sRemoteDevicesPack.AppendElement(
BluetoothNamedValue(remoteDeviceBdAddress, props));
@ -653,8 +660,8 @@ bt_callbacks_t sBluetoothCallbacks =
{
sizeof(sBluetoothCallbacks),
AdapterStateChangeCallback,
AdapterPropertiesChangeCallback,
RemoteDevicePropertiesChangeCallback,
AdapterPropertiesCallback,
RemoteDevicePropertiesCallback,
DeviceFoundCallback,
DiscoveryStateChangedCallback,
PinRequestCallback,

View File

@ -168,7 +168,7 @@ def main(argv):
new_test.jitflags.extend(variant)
job_list.append(new_test)
elif options.ion:
flags = [['--baseline-eager'], ['--ion-eager']]
flags = [['--baseline-eager'], ['--ion-eager', '--ion-parallel-compile=off']]
for test in test_list:
for variant in flags:
new_test = test.copy()

View File

@ -0,0 +1,12 @@
function test() {
+ T[g].act
}
gc();
var c = 0;
for (var i = 0; i < 20; test['$+']) {
if (c++ > 110)
break;
try {
__count__(f(2), 1);
} catch (e) {}
}

View File

@ -1035,7 +1035,7 @@ MarkJitExitFrame(JSTracer *trc, const IonFrameIterator &frame)
MarkIonCodeRoot(trc, footer->addressOfIonCode(), "ion-exit-code");
const VMFunction *f = footer->function();
if (f == nullptr || f->explicitArgs == 0)
if (f == nullptr)
return;
// Mark arguments of the VM wrapper.

View File

@ -3685,14 +3685,16 @@ js::SetCallOperation(JSContext *cx)
bool
js::GetAndClearException(JSContext *cx, MutableHandleValue res)
{
// Check the interrupt flag to allow interrupting deeply nested exception
// handling.
if (cx->runtime()->interrupt && !js_HandleExecutionInterrupt(cx))
return false;
bool status = cx->getPendingException(res);
cx->clearPendingException();
return status;
if (!status)
return false;
// Check the interrupt flag to allow interrupting deeply nested exception
// handling.
if (cx->runtime()->interrupt)
return js_HandleExecutionInterrupt(cx);
return true;
}
template <bool strict>