author | Gregory Szorc <gps@mozilla.com> |
Wed, 27 Feb 2013 10:03:52 -0800 | |
changeset 123266 | eb634979fdd7ab2ddf37135cacee51d51cdfdd33 |
parent 123265 | 1ef658c8d6462e0c54ae57f713a2a3320e75253c (current diff) |
parent 123148 | 0a91da5f5eab7ff18c55fa117ef4b707ee5bed51 (diff) |
child 123267 | 1e646e6ddbcd5c3dd2c8233945d14ef1154bd16f |
push id | 24376 |
push user | Ms2ger@gmail.com |
push date | Thu, 28 Feb 2013 17:05:14 +0000 |
treeherder | mozilla-central@c65d59d33aa8 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
milestone | 22.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/accessible/tests/mochitest/actions/test_general.xul +++ b/accessible/tests/mochitest/actions/test_general.xul @@ -16,17 +16,17 @@ src="../common.js" /> <script type="application/javascript" src="../events.js" /> <script type="application/javascript" src="../actions.js" /> <script type="application/javascript"> <![CDATA[ - if (navigator.platform.indexOf("Mac") == 0) { + if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 1); } else { SimpleTest.expectAssertions(1); } function doTest() { var actionsArray = [
--- a/accessible/tests/mochitest/actions/test_link.html +++ b/accessible/tests/mochitest/actions/test_link.html @@ -12,21 +12,21 @@ <script type="application/javascript" src="../common.js"></script> <script type="application/javascript" src="../events.js"></script> <script type="application/javascript" src="../actions.js"></script> <script type="application/javascript"> - if (navigator.platform.indexOf("Win") == 0) { + if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(13); - } else if (navigator.platform.indexOf("Linux") == 0) { + } else if (navigator.platform.startsWith("Linux")) { SimpleTest.expectAssertions(18); - } else if (navigator.platform.indexOf("Mac") == 0) { + } else if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 14); } function getAnchorTargetDocumentAcc() { var thisTabDocAcc = getTabDocAccessible(); var thisDocTabPanelAcc = thisTabDocAcc.parent.parent; var tabPanelsAcc = thisDocTabPanelAcc.parent;
--- a/accessible/tests/mochitest/attributes/test_obj.html +++ b/accessible/tests/mochitest/attributes/test_obj.html @@ -14,17 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> <script type="application/javascript" src="../common.js"></script> <script type="application/javascript" src="../attributes.js"></script> <script type="application/javascript"> - if (navigator.platform.indexOf("Linux") == 0) { + if (navigator.platform.startsWith("Linux")) { SimpleTest.expectAssertions(0, 1); } function doTest() { // aria testAttrs("atomic", {"atomic" : "true"}, true); testAttrs("autocomplete", {"autocomplete" : "true"}, true);
--- a/accessible/tests/mochitest/editabletext/test_1.html +++ b/accessible/tests/mochitest/editabletext/test_1.html @@ -14,17 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg <script type="application/javascript" src="../common.js"></script> <script type="application/javascript" src="../events.js"></script> <script type="application/javascript" src="editabletext.js"></script> <script type="application/javascript"> - if (navigator.platform.indexOf("Mac") == 0) { + if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 3); } else { SimpleTest.expectAssertions(3); } function addTestEditable(aID, aTestRun, aTrailChar) { var et = new editableTextTest(aID);
--- a/accessible/tests/mochitest/events/test_focus_autocomplete.xul +++ b/accessible/tests/mochitest/events/test_focus_autocomplete.xul @@ -27,17 +27,17 @@ <script type="application/javascript" src="../events.js" /> <script type="application/javascript" src="../autocomplete.js" /> <script type="application/javascript"> <![CDATA[ - if (navigator.platform.indexOf("Mac") != 0) { + if (!navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(2); } //////////////////////////////////////////////////////////////////////////// // Hacky stuffs // This is the hack needed for searchbar work outside of browser. function getBrowser() {
--- a/accessible/tests/mochitest/events/test_focus_browserui.xul +++ b/accessible/tests/mochitest/events/test_focus_browserui.xul @@ -19,17 +19,17 @@ src="../states.js"></script> <script type="application/javascript" src="../events.js"></script> <script type="application/javascript" src="../browser.js"></script> <script type="application/javascript"> <![CDATA[ - if (navigator.platform.indexOf("Linux") == 0) { + if (navigator.platform.startsWith("Linux")) { SimpleTest.expectAssertions(1); } //////////////////////////////////////////////////////////////////////////// // Helpers function inputInDocument() { var tabdoc = currentTabDocument();
--- a/accessible/tests/mochitest/events/test_focus_doc.html +++ b/accessible/tests/mochitest/events/test_focus_doc.html @@ -16,21 +16,21 @@ <script type="application/javascript" src="../events.js"></script> <script type="application/javascript" src="../role.js"></script> <script type="application/javascript" src="../states.js"></script> <script type="application/javascript"> - if (navigator.platform.indexOf("Win") == 0) { + if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(1, 2); - } else if (navigator.platform.indexOf("Linux") == 0) { + } else if (navigator.platform.startsWith("Linux")) { SimpleTest.expectAssertions(1); - } else if (navigator.platform.indexOf("Mac") == 0) { + } else if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 1); } var gQueue = null; //var gA11yEventDumpID = "eventdump"; //gA11yEventDumpToConsole = true;
--- a/accessible/tests/mochitest/relations/test_ui_modalprompt.html +++ b/accessible/tests/mochitest/relations/test_ui_modalprompt.html @@ -17,17 +17,17 @@ <script type="application/javascript" src="../role.js"></script> <script type="application/javascript" src="../events.js"></script> <script type="application/javascript" src="../browser.js"></script> <script type="application/javascript"> - if (navigator.platform.indexOf("Mac") == 0) { + if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 1); } else { SimpleTest.expectAssertions(1); } function hasTabModalPrompts() { try { return SpecialPowers.getBoolPref("prompts.tab_modal.enabled");
--- a/accessible/tests/mochitest/states/test_tree.xul +++ b/accessible/tests/mochitest/states/test_tree.xul @@ -23,18 +23,16 @@ <script type="application/javascript" src="../events.js" /> <script type="application/javascript"> <![CDATA[ //////////////////////////////////////////////////////////////////////////// // Test - // gA11yEventDumpID = "debug"; - /** * Event queue invoker object to test accessible states for XUL tree * accessible. */ function statesChecker(aTreeID, aView) { this.DOMNode = getNode(aTreeID); this.invoke = function invoke() @@ -75,16 +73,18 @@ } } this.getID = function getID() { "tree processor for " + prettyName(aTreeID); } } + gA11yEventDumpToConsole = true; // debug stuff + var gQueue = null; function doTest() { gQueue = new eventQueue(EVENT_REORDER); gQueue.push(new statesChecker("tree", new nsTreeTreeView())); gQueue.push(new statesChecker("treesingle", new nsTreeTreeView())); gQueue.push(new statesChecker("tabletree", new nsTreeTreeView()));
--- a/accessible/tests/mochitest/text/test_singleline.html +++ b/accessible/tests/mochitest/text/test_singleline.html @@ -6,17 +6,17 @@ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> <script type="application/javascript" src="../common.js"></script> <script type="application/javascript" src="../text.js"></script> <script type="application/javascript"> - if (navigator.platform.indexOf("Mac") == 0) { + if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 23); } else { SimpleTest.expectAssertions(23); } function doTest() { // __h__e__l__l__o__ __m__y__ __f__r__i__e__n__d__
--- a/accessible/tests/mochitest/text/test_whitespaces.html +++ b/accessible/tests/mochitest/text/test_whitespaces.html @@ -8,17 +8,17 @@ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> <script type="application/javascript" src="../common.js"></script> <script type="application/javascript" src="../text.js"></script> <script type="application/javascript"> - if (navigator.platform.indexOf("Mac") == 0) { + if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 10); } else { SimpleTest.expectAssertions(10); } function doTest() { // __B__r__a__v__e__ __S__i__r__ __ __R__o__b__i__n__ __ __ __r__a__n
--- a/accessible/tests/mochitest/text/test_words.html +++ b/accessible/tests/mochitest/text/test_words.html @@ -7,17 +7,17 @@ <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> <script type="application/javascript" src="../common.js"></script> <script type="application/javascript" src="../text.js"></script> <script type="application/javascript"> - if (navigator.platform.indexOf("Mac") == 0) { + if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 1); } else { SimpleTest.expectAssertions(1); } function doTest() { // "one two"
--- a/accessible/tests/mochitest/tree/test_dockids.html +++ b/accessible/tests/mochitest/tree/test_dockids.html @@ -11,17 +11,17 @@ <script type="application/javascript" src="../common.js"></script> <script type="application/javascript" src="../role.js"></script> <script type="application/javascript" src="../states.js"></script> <script type="application/javascript"> - if (navigator.platform.indexOf("Win") == 0) { + if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 1); } function doTest() { var tree = { DOCUMENT: [ { PARAGRAPH: [ // head
--- a/accessible/tests/mochitest/tree/test_txtctrl.xul +++ b/accessible/tests/mochitest/tree/test_txtctrl.xul @@ -13,17 +13,17 @@ src="../common.js" /> <script type="application/javascript" src="../role.js" /> <script type="application/javascript" src="../events.js" /> <script type="application/javascript"> <![CDATA[ - if (navigator.platform.indexOf("Mac") == 0) { + if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 1); } else { SimpleTest.expectAssertions(1); } //////////////////////////////////////////////////////////////////////////// // Test function doTest()
--- a/b2g/chrome/content/forms.js +++ b/b2g/chrome/content/forms.js @@ -194,16 +194,17 @@ let FormAssistant = { 'button', 'file', 'checkbox', 'radio', 'reset', 'submit', 'image' ]), isKeyboardOpened: false, selectionStart: 0, selectionEnd: 0, scrollIntoViewTimeout: null, _focusedElement: null, + _documentEncoder: null, get focusedElement() { if (this._focusedElement && Cu.isDeadWrapper(this._focusedElement)) this._focusedElement = null; return this._focusedElement; }, @@ -218,28 +219,37 @@ let FormAssistant = { if (this.focusedElement) { this.focusedElement.removeEventListener('mousedown', this); this.focusedElement.removeEventListener('mouseup', this); if (!element) { this.focusedElement.blur(); } } + this._documentEncoder = null; + if (element) { element.addEventListener('mousedown', this); element.addEventListener('mouseup', this); + if (isContentEditable(element)) { + this._documentEncoder = getDocumentEncoder(element); + } } this.focusedElement = element; }, + get documentEncoder() { + return this._documentEncoder; + }, + handleEvent: function fa_handleEvent(evt) { - let focusedElement = this.focusedElement; let target = evt.target; + let range = null; switch (evt.type) { case "focus": if (!target) { break; } if (target instanceof HTMLDocument || target == content) { break; @@ -259,27 +269,29 @@ let FormAssistant = { case "pagehide": if (this.focusedElement) this.hideKeyboard(); break; case 'mousedown': // We only listen for this event on the currently focused element. // When the mouse goes down, note the cursor/selection position - this.selectionStart = this.focusedElement.selectionStart; - this.selectionEnd = this.focusedElement.selectionEnd; + range = getSelectionRange(this.focusedElement); + this.selectionStart = range[0]; + this.selectionEnd = range[1]; break; case 'mouseup': // We only listen for this event on the currently focused element. // When the mouse goes up, see if the cursor has moved (or the // selection changed) since the mouse went down. If it has, we // need to tell the keyboard about it - if (this.focusedElement.selectionStart !== this.selectionStart || - this.focusedElement.selectionEnd !== this.selectionEnd) { + range = getSelectionRange(this.focusedElement); + if (range[0] !== this.selectionStart || + range[1] !== this.selectionEnd) { this.sendKeyboardState(this.focusedElement); } break; case "resize": if (!this.isKeyboardOpened) return; @@ -354,21 +366,21 @@ let FormAssistant = { showKeyboard: function fa_showKeyboard(target) { if (this.isKeyboardOpened) return; if (target instanceof HTMLOptionElement) target = target.parentNode; + this.setFocusedElement(target); + let kbOpened = this.sendKeyboardState(target); if (this.isTextInputElement(target)) this.isKeyboardOpened = kbOpened; - - this.setFocusedElement(target); }, hideKeyboard: function fa_hideKeyboard() { sendAsyncMessage("Forms:Input", { "type": "blur" }); this.isKeyboardOpened = false; this.setFocusedElement(null); }, @@ -425,17 +437,16 @@ let FormAssistant = { sendAsyncMessage("Forms:Input", getJSON(element)); return true; } }; FormAssistant.init(); - function isContentEditable(element) { if (element.isContentEditable || element.designMode == "on") return true; // If a body element is editable and the body is the child of an // iframe we can assume this is an advanced HTML editor if (element instanceof HTMLIFrameElement && element.contentDocument && @@ -443,22 +454,22 @@ function isContentEditable(element) { element.contentDocument.designMode == "on")) return true; return element.ownerDocument && element.ownerDocument.designMode == "on"; } function getJSON(element) { let type = element.type || ""; - let value = element.value || "" + let value = element.value || ""; - // Treat contenteditble element as a special text field + // Treat contenteditble element as a special text area field if (isContentEditable(element)) { - type = "text"; - value = element.textContent; + type = "textarea"; + value = getContentEditableText(element); } // Until the input type=date/datetime/range have been implemented // let's return their real type even if the platform returns 'text' let attributeType = element.getAttribute("type") || ""; if (attributeType) { var typeLowerCase = attributeType.toLowerCase(); @@ -479,23 +490,25 @@ function getJSON(element) { // solution will be find. let inputmode = element.getAttribute('x-inputmode'); if (inputmode) { inputmode = inputmode.toLowerCase(); } else { inputmode = ''; } + let range = getSelectionRange(element); + return { "type": type.toLowerCase(), "choices": getListForElement(element), "value": value, "inputmode": inputmode, - "selectionStart": element.selectionStart, - "selectionEnd": element.selectionEnd + "selectionStart": range[0], + "selectionEnd": range[1] }; } function getListForElement(element) { if (!(element instanceof HTMLSelectElement)) return null; let optionIndex = 0; @@ -541,8 +554,56 @@ function getListForElement(element) { "optionIndex": optionIndex++ }); } } return result; }; +// Create a plain text document encode from the focused element. +function getDocumentEncoder(element) { + let encoder = Cc["@mozilla.org/layout/documentEncoder;1?type=text/plain"] + .createInstance(Ci.nsIDocumentEncoder); + let flags = Ci.nsIDocumentEncoder.SkipInvisibleContent | + Ci.nsIDocumentEncoder.OutputRaw | + Ci.nsIDocumentEncoder.OutputLFLineBreak | + Ci.nsIDocumentEncoder.OutputDropInvisibleBreak; + encoder.init(element.ownerDocument, "text/plain", flags); + return encoder; +} + +// Get the visible content text of a content editable element +function getContentEditableText(element) { + let doc = element.ownerDocument; + let range = doc.createRange(); + range.selectNodeContents(element); + let encoder = FormAssistant.documentEncoder; + encoder.setRange(range); + return encoder.encodeToString(); +} + +function getSelectionRange(element) { + let start = 0; + let end = 0; + if (element instanceof HTMLInputElement || + element instanceof HTMLTextAreaElement) { + // Get the selection range of <input> and <textarea> elements + start = element.selectionStart; + end = element.selectionEnd; + } else { + // Get the selection range of contenteditable elements + let win = element.ownerDocument.defaultView; + let sel = win.getSelection(); + + let range = win.document.createRange(); + range.setStart(element, 0); + range.setEnd(sel.anchorNode, sel.anchorOffset); + let encoder = FormAssistant.documentEncoder; + + encoder.setRange(range); + start = encoder.encodeToString().length; + + encoder.setRange(sel.getRangeAt(0)); + end = start + encoder.encodeToString().length; + } + return [start, end]; +}
--- a/b2g/config/otoro/releng-otoro.tt +++ b/b2g/config/otoro/releng-otoro.tt @@ -1,12 +1,12 @@ [ { -"size": 895408640, -"digest": "fc5be04b9b8365cd65fa8e66f4686bf0da8e34abb16ee618dd069469c9d9c9c3495562ebfcd21a2beadb27d59d6c011781188b9038ffebfd3e85cdd264f0aac3", +"size": 896038748, +"digest": "a153b55e13938c608d0d449073142322470aaf6c77375165df83dc845d9c357d0cf4754db3b058d4707442cd6252fe3076e81a22c32cb34bd3df6432ad5b99f1", "algorithm": "sha512", "filename": "gonk.tar.xz" }, { "size": 4139008, "digest": "6f65553e882316582b944e46c659915a1b907c4a326104cb31d81356330dddacba757e3eafbd282063da0e670c3c5d6b9a0905ab88da84b47848d810c37571cb", "algorithm": "sha512", "filename": "boot.img"
--- a/b2g/config/otoro/sources.xml +++ b/b2g/config/otoro/sources.xml @@ -1,109 +1,110 @@ <?xml version="1.0" ?><manifest> <!-- This is only a record of which revisions were pulled to generate the gonk.tar.xz snapshot referred to by releng-otoro.tt --> <remote fetch="https://android.googlesource.com/" name="aosp"/> - <remote fetch="git://github.com/mozilla-b2g/" name="b2g"/> + <remote fetch="https://git.mozilla.org/b2g" name="b2g"/> + <remote fetch="git://github.com/mozilla-b2g/" name="b2ggithub"/> <remote fetch="git://github.com/mozilla/" name="mozilla"/> <remote fetch="git://codeaurora.org/" name="caf"/> <remote fetch="git://android.git.linaro.org/" name="linaro"/> - <remote fetch="https://git.mozilla.org" name="mozillaorg"/> + <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/> <!-- Gonk specific things and forks --> - <project name="platform_build" path="build" remote="b2g" revision="273ba23d5c6c9f6a34995a3cc429804d1449ca9f"> + <project name="platform_build" path="build" remote="b2g" revision="43434d6cdbf702e6197e0791f19406860284edf6"> <copyfile dest="Makefile" src="core/root.mk"/> </project> - <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> - <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="654358494ba601a46ef9838debc95417ae464cc6"/> - <project name="rilproxy" path="rilproxy" remote="b2g" revision="32106d4ea635ebe17a1610b643b398db639b8b97"/> - <project name="librecovery" path="librecovery" remote="b2g" revision="e1bd90051c9e937221eb1f91c94e3cde747311a7"/> - <project name="moztt" path="external/moztt" remote="b2g" revision="6ee1f8987ef36d688f97064c003ad57849dfadf2"/> + <!-- Information: fake-dalvik is tagged with B2G_1_0_0_20130125190500 --><project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> + <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c6fc2e70b2586fe45db4b676567be2aa94cf420e"/> + <project name="rilproxy" path="rilproxy" remote="b2g" revision="f634b3d50effdd42828cc757c01fdbf74e562a36"/> + <!-- Information: librecovery is tagged with B2G_1_0_0_20130125190500 --><project name="librecovery" path="librecovery" remote="b2g" revision="601fc18b28c9d7cf6954b281ddd3b705c74a9215"/> + <project name="moztt" path="external/moztt" remote="b2g" revision="62f94a26d34c1f1e1846efd58d34363c051e8c66"/> <!-- Stock Android things --> - <!-- Information: platform/abi/cpp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/> + <!-- Information: platform/abi/cpp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/> <!-- Information: platform/bionic is tagged with M8960AAAAANLYA100715A --><project name="platform/bionic" path="bionic" revision="cd5dfce80bc3f0139a56b58aca633202ccaee7f8"/> <!-- Information: platform/bootable/recovery is tagged with M8960AAAAANLYA100715A --><project name="platform/bootable/recovery" path="bootable/recovery" revision="e0a9ac010df3afaa47ba107192c05ac8b5516435"/> <!-- Information: platform/development is tagged with M8960AAAAANLYA100715A --><project name="platform/development" path="development" revision="a384622f5fcb1d2bebb9102591ff7ae91fe8ed2d"/> - <!-- Information: device/common is tagged with M8960AAAAANLYA1005304 --><project name="device/common" path="device/common" revision="7c65ea240157763b8ded6154a17d3c033167afb7"/> + <!-- Information: device/common is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="device/common" path="device/common" revision="7c65ea240157763b8ded6154a17d3c033167afb7"/> <!-- Information: device/sample is tagged with M8960AAAAANLYA100715A --><project name="device/sample" path="device/sample" revision="c328f3d4409db801628861baa8d279fb8855892f"/> - <!-- Information: platform/external/apache-http is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/apache-http" path="external/apache-http" revision="6c9d8c58d3ed710f87c26820d903bb8aad81754f"/> + <project name="platform_external_apriori" path="external/apriori" remote="b2ggithub" revision="2c3a7113299eb789a076be23449d868b3bfa07fd"/> <!-- Information: platform/external/bluetooth/bluez is tagged with M76XXUSNEKNLYA2040 --><project name="platform/external/bluetooth/bluez" path="external/bluetooth/bluez" revision="1023c91c66e9c3bd1132480051993bf7827770f6"/> - <!-- Information: platform/external/bluetooth/glib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="c6b49241cc1a8950723a5f74f8f4b4f4c3fa970e"/> - <!-- Information: platform/external/bluetooth/hcidump is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/bluetooth/hcidump" path="external/bluetooth/hcidump" revision="02b1eb24fbb3d0135a81edb4a2175b1397308d7d"/> - <!-- Information: platform/external/bsdiff is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/bsdiff" path="external/bsdiff" revision="81872540236d9bb15cccf963d05b9de48baa5375"/> - <!-- Information: platform/external/bzip2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/bzip2" path="external/bzip2" revision="048dacdca43eed1534689ececcf2781c63e1e4ba"/> + <!-- Information: platform/external/bluetooth/glib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="c6b49241cc1a8950723a5f74f8f4b4f4c3fa970e"/> + <!-- Information: platform/external/bluetooth/hcidump is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/bluetooth/hcidump" path="external/bluetooth/hcidump" revision="02b1eb24fbb3d0135a81edb4a2175b1397308d7d"/> + <!-- Information: platform/external/bsdiff is tagged with A8064AAAAANLYA102313 --><project name="platform/external/bsdiff" path="external/bsdiff" revision="81872540236d9bb15cccf963d05b9de48baa5375"/> + <!-- Information: platform/external/bzip2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/bzip2" path="external/bzip2" revision="048dacdca43eed1534689ececcf2781c63e1e4ba"/> <!-- Information: platform/external/dbus is tagged with M8960AAAAANLYA100715A --><project name="platform/external/dbus" path="external/dbus" revision="c7517b6195dc6926728352113e6cc335da3f9c9e"/> <!-- Information: platform/external/dhcpcd is tagged with M8960AAAAANLYA100715A --><project name="platform/external/dhcpcd" path="external/dhcpcd" revision="1e00fb67022d0921af0fead263f81762781b9ffa"/> - <!-- Information: platform/external/dnsmasq is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/dnsmasq" path="external/dnsmasq" revision="f621afad94df46204c25fc2593a19d704d2637f5"/> - <!-- Information: platform/external/e2fsprogs is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/e2fsprogs" path="external/e2fsprogs" revision="d5f550bb2f556c5d287f7c8d2b77223654bcec37"/> - <!-- Information: platform/external/expat is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/expat" path="external/expat" revision="6df134250feab71edb5915ecaa6268210bca76c5"/> - <!-- Information: platform/external/fdlibm is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/fdlibm" path="external/fdlibm" revision="988ffeb12a6e044ae3504838ef1fee3fe0716934"/> - <!-- Information: platform/external/flac is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/flac" path="external/flac" revision="5893fbe890f5dab8e4146d2baa4bd2691c0739e0"/> - <!-- Information: platform/external/freetype is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/freetype" path="external/freetype" revision="aeb407daf3711a10a27f3bc2223c5eb05158076e"/> - <!-- Information: platform/external/giflib is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/giflib" path="external/giflib" revision="b2597268aef084202a8c349d1cc072c03c6e22eb"/> - <!-- Information: platform/external/gtest is tagged with android-4.2.1_r1 --><project name="platform/external/gtest" path="external/gtest" remote="linaro" revision="344e5f3db17615cc853073a02968a603efd39109"/> - <!-- Information: platform/external/harfbuzz is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/harfbuzz" path="external/harfbuzz" revision="116610d63a859521dacf00fb6818ee9ab2e666f6"/> - <!-- Information: platform/external/icu4c is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/icu4c" path="external/icu4c" revision="0fa67b93b831c6636ca18b152a1b1b14cc99b034"/> - <!-- Information: platform/external/iptables is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/iptables" path="external/iptables" revision="3b2deb17f065c5664bb25e1a28489e5792eb63ff"/> - <!-- Information: platform/external/jhead is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/jhead" path="external/jhead" revision="754078052c687f6721536009c816644c73e4f145"/> - <!-- Information: platform/external/jpeg is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/jpeg" path="external/jpeg" revision="a62e464d672a4623233180e4023034bf825f066e"/> - <!-- Information: platform/external/libgsm is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/libgsm" path="external/libgsm" revision="5e4516958690b9a1b2c98f88eeecba3edd2dbda4"/> - <!-- Information: platform/external/liblzf is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/liblzf" path="external/liblzf" revision="6946aa575b0949d045722794850896099d937cbb"/> - <!-- Information: platform/external/libnfc-nxp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/libnfc-nxp" path="external/libnfc-nxp" revision="3a912b065a31a72c63ad56ac224cfeaa933423b6"/> - <!-- Information: platform/external/libnl-headers is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/libnl-headers" path="external/libnl-headers" revision="6ccf7349d61f73ac26a0675d735d903ab919c658"/> - <!-- Information: platform/external/libphonenumber is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/libphonenumber" path="external/libphonenumber" revision="8d22c9a05eda1935c6dc27d188158e6ee38dc016"/> + <!-- Information: platform/external/dnsmasq is tagged with A8064AAAAANLYA102313 --><project name="platform/external/dnsmasq" path="external/dnsmasq" revision="f621afad94df46204c25fc2593a19d704d2637f5"/> + <project name="platform_external_elfcopy" path="external/elfcopy" remote="b2ggithub" revision="62c1bed1c4505369cac2e72fbe30452a598fb690"/> + <project name="platform_external_elfutils" path="external/elfutils" remote="b2ggithub" revision="72940dec691fa3255e13df01f8c53b620e446066"/> + <!-- Information: platform/external/e2fsprogs is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/e2fsprogs" path="external/e2fsprogs" revision="d5f550bb2f556c5d287f7c8d2b77223654bcec37"/> + <!-- Information: platform/external/expat is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/expat" path="external/expat" revision="6df134250feab71edb5915ecaa6268210bca76c5"/> + <!-- Information: platform/external/fdlibm is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/fdlibm" path="external/fdlibm" revision="988ffeb12a6e044ae3504838ef1fee3fe0716934"/> + <!-- Information: platform/external/flac is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/flac" path="external/flac" revision="5893fbe890f5dab8e4146d2baa4bd2691c0739e0"/> + <!-- Information: platform/external/freetype is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/freetype" path="external/freetype" revision="aeb407daf3711a10a27f3bc2223c5eb05158076e"/> + <!-- Information: platform/external/giflib is tagged with A8064AAAAANLYA102313 --><project name="platform/external/giflib" path="external/giflib" revision="b2597268aef084202a8c349d1cc072c03c6e22eb"/> + <project name="platform/external/gtest" path="external/gtest" remote="linaro" revision="8c212ebe53bb2baab3575f03069016f1fb11e449"/> + <!-- Information: platform/external/harfbuzz is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/harfbuzz" path="external/harfbuzz" revision="116610d63a859521dacf00fb6818ee9ab2e666f6"/> + <!-- Information: platform/external/icu4c is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/icu4c" path="external/icu4c" revision="0fa67b93b831c6636ca18b152a1b1b14cc99b034"/> + <!-- Information: platform/external/iptables is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/iptables" path="external/iptables" revision="3b2deb17f065c5664bb25e1a28489e5792eb63ff"/> + <!-- Information: platform/external/jpeg is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/jpeg" path="external/jpeg" revision="a62e464d672a4623233180e4023034bf825f066e"/> + <!-- Information: platform/external/libgsm is tagged with A8064AAAAANLYA102313 --><project name="platform/external/libgsm" path="external/libgsm" revision="5e4516958690b9a1b2c98f88eeecba3edd2dbda4"/> + <!-- Information: platform/external/liblzf is tagged with AU_LINUX_ANDROID_JB_MR1.04.02.02.49.134 --><project name="platform/external/liblzf" path="external/liblzf" revision="6946aa575b0949d045722794850896099d937cbb"/> + <!-- Information: platform/external/libnfc-nxp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/libnfc-nxp" path="external/libnfc-nxp" revision="3a912b065a31a72c63ad56ac224cfeaa933423b6"/> + <!-- Information: platform/external/libnl-headers is tagged with AU_LINUX_ANDROID_JB_MR1.04.02.02.49.134 --><project name="platform/external/libnl-headers" path="external/libnl-headers" revision="6ccf7349d61f73ac26a0675d735d903ab919c658"/> <!-- Information: platform/external/libpng is tagged with M8960AAAAANLYA100715A --><project name="platform/external/libpng" path="external/libpng" revision="9c3730f0efa69f580f03463c237cd928f3196404"/> - <!-- Information: platform/external/libvpx is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/libvpx" path="external/libvpx" revision="3a40da0d96da5c520e7707aa14f48a80956e20d7"/> - <!-- Information: platform/external/llvm is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/llvm" path="external/llvm" revision="bff5923831940309f7d8ddbff5826ca6ed2dc050"/> - <!-- Information: platform/external/mksh is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/mksh" path="external/mksh" revision="ec646e8f5e7dac9a77d1de549c6ed92c04d0cd4b"/> - <project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/> + <!-- Information: platform/external/libvpx is tagged with M8960AAAAANLYA1519349 --><project name="platform/external/libvpx" path="external/libvpx" revision="3a40da0d96da5c520e7707aa14f48a80956e20d7"/> + <!-- Information: platform/external/llvm is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/llvm" path="external/llvm" revision="bff5923831940309f7d8ddbff5826ca6ed2dc050"/> + <!-- Information: platform/external/mksh is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/mksh" path="external/mksh" revision="ec646e8f5e7dac9a77d1de549c6ed92c04d0cd4b"/> + <!-- Information: platform_external_opensans is tagged with B2G_1_0_0_20130125190500 --><project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/> <!-- Information: platform/external/openssl is tagged with AU_LINUX_ANDROID_ICS.04.00.04.00.110 --><project name="platform/external/openssl" path="external/openssl" revision="27d333cce9a31c806b4bfa042925f045c727aecd"/> - <!-- Information: platform/external/protobuf is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/protobuf" path="external/protobuf" revision="e217977611c52bccde7f7c78e1d3c790c6357431"/> - <!-- Information: platform/external/safe-iop is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/safe-iop" path="external/safe-iop" revision="07073634e2e3aa4f518e36ed5dec3aabc549d5fb"/> - <project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/> + <!-- Information: platform/external/protobuf is tagged with A8064AAAAANLYA102313 --><project name="platform/external/protobuf" path="external/protobuf" revision="e217977611c52bccde7f7c78e1d3c790c6357431"/> + <!-- Information: platform/external/safe-iop is tagged with A8064AAAAANLYA102313 --><project name="platform/external/safe-iop" path="external/safe-iop" revision="07073634e2e3aa4f518e36ed5dec3aabc549d5fb"/> + <!-- Information: screencap-gonk is tagged with B2G_1_0_0_20130125190500 --><project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/> <!-- Information: platform/external/skia is tagged with M8960AAAAANLYA100715A --><project name="platform/external/skia" path="external/skia" revision="7d90c85f2c0e3b747f7c7eff8bc9253b0063b439"/> - <!-- Information: platform/external/sonivox is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/sonivox" path="external/sonivox" revision="7c967779dfc61ac1f346e972de91d4bfce7dccbb"/> - <!-- Information: platform/external/speex is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/speex" path="external/speex" revision="ebe6230a7f7c69f5a4389f2b09b7b19ef9e94f32"/> + <!-- Information: platform/external/sonivox is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/sonivox" path="external/sonivox" revision="7c967779dfc61ac1f346e972de91d4bfce7dccbb"/> + <!-- Information: platform/external/speex is tagged with A8064AAAAANLYA102313 --><project name="platform/external/speex" path="external/speex" revision="ebe6230a7f7c69f5a4389f2b09b7b19ef9e94f32"/> <project name="platform/external/sqlite" path="external/sqlite" revision="fb30e613139b8836fdc8e81e166cf3a76e5fa17f"/> - <!-- Information: platform/external/stlport is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/stlport" path="external/stlport" revision="a6734e0645fce81c9610de0488b729207bfa576e"/> - <!-- Information: platform/external/strace is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/strace" path="external/strace" revision="c9fd2e5ef7d002e12e7cf2512506c84a9414b0fd"/> - <!-- Information: platform/external/tagsoup is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/tagsoup" path="external/tagsoup" revision="68c2ec9e0acdb3214b7fb91dbab8c9fab8736817"/> - <!-- Information: platform/external/tinyalsa is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/tinyalsa" path="external/tinyalsa" revision="06cc244ee512c1352215e543615738bc8ac82814"/> - <!-- Information: platform/external/tremolo is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/tremolo" path="external/tremolo" revision="25bd78d2392dbdc879ae53382cde9d019f79cf6f"/> - <project name="unbootimg" path="external/unbootimg" remote="b2g" revision="9464623d92eb8668544916dc5a8f4f6337d0bc08"/> - <!-- Information: platform/external/webp is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/webp" path="external/webp" revision="88fe2b83c4b9232cd08729556fd0485d6a6a92cd"/> - <!-- Information: platform/external/webrtc is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/webrtc" path="external/webrtc" revision="137024dc8a2e9251a471e20518a9c3ae06f81f23"/> - <!-- Information: platform/external/wpa_supplicant is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/wpa_supplicant" path="external/wpa_supplicant" revision="a01d37870bbf9892d43e792e5de0683ca41c5497"/> + <!-- Information: platform/external/stlport is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/stlport" path="external/stlport" revision="a6734e0645fce81c9610de0488b729207bfa576e"/> + <!-- Information: platform/external/strace is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/strace" path="external/strace" revision="c9fd2e5ef7d002e12e7cf2512506c84a9414b0fd"/> + <!-- Information: platform/external/tagsoup is tagged with AU_LINUX_ANDROID_JB_MR1.04.02.02.49.134 --><project name="platform/external/tagsoup" path="external/tagsoup" revision="68c2ec9e0acdb3214b7fb91dbab8c9fab8736817"/> + <!-- Information: platform/external/tinyalsa is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/tinyalsa" path="external/tinyalsa" revision="06cc244ee512c1352215e543615738bc8ac82814"/> + <!-- Information: platform/external/tremolo is tagged with A8064AAAAANLYA102313 --><project name="platform/external/tremolo" path="external/tremolo" revision="25bd78d2392dbdc879ae53382cde9d019f79cf6f"/> + <!-- Information: unbootimg is tagged with B2G_1_0_0_20130125190500 --><project name="unbootimg" path="external/unbootimg" remote="b2g" revision="9464623d92eb8668544916dc5a8f4f6337d0bc08"/> + <!-- Information: platform/external/webp is tagged with A8064AAAAANLYA102313 --><project name="platform/external/webp" path="external/webp" revision="88fe2b83c4b9232cd08729556fd0485d6a6a92cd"/> + <!-- Information: platform/external/webrtc is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/webrtc" path="external/webrtc" revision="137024dc8a2e9251a471e20518a9c3ae06f81f23"/> + <!-- Information: platform/external/wpa_supplicant is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/wpa_supplicant" path="external/wpa_supplicant" revision="a01d37870bbf9892d43e792e5de0683ca41c5497"/> <!-- Information: platform/external/hostap is tagged with M8960AAAAANLYA1047 --><project name="platform/external/hostap" path="external/hostap" revision="bf04b0faadbdeb4b7943f2e2c4c5aa59df872bb1"/> - <!-- Information: platform/external/zlib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/zlib" path="external/zlib" revision="f96a1d1ebfdf1cd582210fd09c23d8f59e0ae094"/> - <!-- Information: platform/external/yaffs2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/yaffs2" path="external/yaffs2" revision="0afa916204c664b3114429637b63af1321a0aeca"/> + <!-- Information: platform/external/zlib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.01.19.008 --><project name="platform/external/zlib" path="external/zlib" revision="f96a1d1ebfdf1cd582210fd09c23d8f59e0ae094"/> + <!-- Information: platform/external/yaffs2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/yaffs2" path="external/yaffs2" revision="0afa916204c664b3114429637b63af1321a0aeca"/> <!-- Information: platform/frameworks/base is tagged with M76XXUSNEKNLYA2040 --><project name="platform/frameworks/base" path="frameworks/base" revision="eb2bc75803ca179353c24c364a9c8a8ce23e8b78"/> - <!-- Information: platform/frameworks/opt/emoji is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="a95d8db002770469d72dfaf59ff37ac96db29a87"/> - <!-- Information: platform/frameworks/support is tagged with M8960AAAAANLYA1005304 --><project name="platform/frameworks/support" path="frameworks/support" revision="27208692b001981f1806f4f396434f4eac78b909"/> + <!-- Information: platform/frameworks/opt/emoji is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="a95d8db002770469d72dfaf59ff37ac96db29a87"/> + <!-- Information: platform/frameworks/support is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/frameworks/support" path="frameworks/support" revision="27208692b001981f1806f4f396434f4eac78b909"/> <!-- Information: platform/hardware/libhardware is tagged with M8960AAAAANLYA1049B --><project name="platform/hardware/libhardware" path="hardware/libhardware" revision="4a619901847621f8a7305edf42dd07347a140484"/> <!-- Information: platform/hardware/libhardware_legacy is tagged with M8960AAAAANLYA153611 --><project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="87b4d7afa8f854b445e2d0d95091f6f6069f2b30"/> <!-- Information: platform/libcore is tagged with M8960AAAAANLYA100715A --><project name="platform/libcore" path="libcore" revision="30841f9fba9ccd5c54f4f079f495994db97f283e"/> - <!-- Information: platform/ndk is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/ndk" path="ndk" revision="9f555971e1481854d5b4dc11b3e6af9fff4f241f"/> - <!-- Information: platform/prebuilt is tagged with M8960AAAAANLYA1005304 --><project name="platform/prebuilt" path="prebuilt" revision="447ea790fcc957dde59730ecc2a65ca263bdc733"/> + <!-- Information: platform/ndk is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/ndk" path="ndk" revision="9f555971e1481854d5b4dc11b3e6af9fff4f241f"/> + <!-- Information: platform/prebuilt is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/prebuilt" path="prebuilt" revision="447ea790fcc957dde59730ecc2a65ca263bdc733"/> <!-- Information: platform/system/bluetooth is tagged with M8960AAAAANLYA100703 --><project name="platform/system/bluetooth" path="system/bluetooth" revision="7772cad4823f1f427ce1d4df84a55982386d6d18"/> <!-- Information: platform/system/core is tagged with M76XXUSNEKNLYA2040 --><project name="platform/system/core" path="system/core" revision="bf1970408676ce570b8f4dc3efa038e47552137f"/> - <!-- Information: platform/system/extras is tagged with M8960AAAAANLYA1005304 --><project name="platform/system/extras" path="system/extras" revision="01db6c1254e1407740a543f24317fc540fc4c049"/> - <!-- Information: platform/system/media is tagged with M8960AAAAANLYA1005304 --><project name="platform/system/media" path="system/media" revision="7f71c7fd362bbd992ff2e0e80f7af5859ad116ad"/> + <!-- Information: platform/system/extras is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/system/extras" path="system/extras" revision="01db6c1254e1407740a543f24317fc540fc4c049"/> + <!-- Information: platform/system/media is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/system/media" path="system/media" revision="7f71c7fd362bbd992ff2e0e80f7af5859ad116ad"/> <!-- Information: platform/system/netd is tagged with M8960AAAAANLYA1049 --><project name="platform/system/netd" path="system/netd" revision="306e765248e3900041bf2737e9f57b1b5694a4ce"/> <!-- Information: platform/system/vold is tagged with M8960AAAAANLYA100715A --><project name="platform/system/vold" path="system/vold" revision="99fff257d53cc045d1460841edca5d901dacfcf5"/> <!-- Otoro/Unagi specific things --> <!-- Information: device/qcom/common is tagged with M8960AAAAANLYA100715A --><project name="device/qcom/common" path="device/qcom/common" revision="b9cdab8e1e1a215a8c65b8d5816f666bec7be205"/> <!-- Information: platform/vendor/qcom/msm7627a is tagged with M8960AAAAANLYA100715A --><project name="platform/vendor/qcom/msm7627a" path="device/qcom/msm7627a" revision="d920a502ba17cf4d716f8b1a615f07e796b0501a"/> - <project name="android-device-otoro" path="device/qcom/otoro" remote="b2g" revision="e3e99b264dd0230108aa78f2b653db4ce0e494fb"/> - <project name="android-device-unagi" path="device/qcom/unagi" remote="b2g" revision="e74925a10e11a4f0bc56158c248bd20c521d3dd7"/> - <project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="0a01247e4b0880f93424b27251cd3a1f6b19dbb2"/> + <!-- Information: android-device-otoro is tagged with B2G_1_0_0_20130125190500 --><project name="android-device-otoro" path="device/qcom/otoro" remote="b2g" revision="7662275433fc0b1d8b035f03185b24b7ca965ab4"/> + <!-- Information: android-device-unagi is tagged with B2G_1_0_0_20130125190500 --><project name="android-device-unagi" path="device/qcom/unagi" remote="b2g" revision="6c014552d1b26bee611d9a9b23bd4cd014e392ee"/> + <!-- Information: codeaurora_kernel_msm is tagged with B2G_1_0_0_20130125190500 --><project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="0a01247e4b0880f93424b27251cd3a1f6b19dbb2"/> <!-- Information: platform/hardware/qcom/camera is tagged with M76XXUSNEKNLYA2040 --><project name="platform/hardware/qcom/camera" path="hardware/qcom/camera" revision="1acf77a75e30f3fc8b1eed2057c97adf1cb1633f"/> - <project name="hardware_qcom_display" path="hardware/qcom/display" remote="b2g" revision="6405d30f2fac7d8a1f2cb17b99fb7dd0a8bcfdac"/> + <!-- Information: hardware_qcom_display is tagged with B2G_1_0_0_20130125190500 --><project name="hardware_qcom_display" path="hardware/qcom/display" remote="b2g" revision="6405d30f2fac7d8a1f2cb17b99fb7dd0a8bcfdac"/> <!-- Information: platform/hardware/qcom/media is tagged with M8960AAAAANLYA100715A --><project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="552c3ddb7174a01f3508782d40c4d8c845ab441a"/> <!-- Information: platform/hardware/qcom/gps is tagged with M8960AAAAANLYA100705 --><project name="platform/hardware/qcom/gps" path="hardware/qcom/gps" revision="23d5707b320d7fc69f8ba3b7d84d78a1c5681708"/> - <!-- Information: platform/hardware/msm7k is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/hardware/msm7k" path="hardware/msm7k" revision="8892d46805c5639b55dd07547745c5180da861e7"/> + <!-- Information: platform/hardware/msm7k is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.01.19.008 --><project name="platform/hardware/msm7k" path="hardware/msm7k" revision="8892d46805c5639b55dd07547745c5180da861e7"/> <!-- Information: platform/vendor/qcom-opensource/omx/mm-core is tagged with M8960AAAAANLYA100715A --><project name="platform/vendor/qcom-opensource/omx/mm-core" path="vendor/qcom/opensource/omx/mm-core" revision="ab17ac9a074b4bb69986a8436336bdfbbaf9cd39"/> <!-- Information: platform/hardware/ril is tagged with M76XXUSNEKNLYA1610 --><project name="platform/hardware/ril" path="hardware/ril" remote="caf" revision="fe9a3f63922143b57e79ed570bab2328df8c83a5"/> </manifest> \ No newline at end of file
--- a/b2g/config/panda/releng-pandaboard.tt +++ b/b2g/config/panda/releng-pandaboard.tt @@ -1,12 +1,12 @@ [ { -"size": 678628568, -"digest": "e0b98a75831313171781d91ab4c3b8ae66e3af7fcec433a33d75fbc647cb3bba311f790ccb9cd9c8be8c5549210b759d6b85afe7395ada74c2c319a29556fd8e", +"size": 677418796, +"digest": "34f8e675382cbd6acc8803a540c9ecd51641f24679b3803ff585176c1ba5b869989bed070ee6db79f70d4875d16ad6b4cb2e676e24caca4012874574d3899d2c", "algorithm": "sha512", "filename": "gonk.tar.xz" }, { "size": 2116507, "digest": "be67a012963a5c162834f9fcb989bcebd2d047dcb4e17ee23031b694dcf7cdfd6d7a6545d7a1f5e7293b6d24415403972f4ea1ab8c6c78fefcabfaf3f6875214", "algorithm": "sha512", "filename": "download-panda.tar.bz2"
--- a/b2g/config/panda/sources.xml +++ b/b2g/config/panda/sources.xml @@ -1,99 +1,101 @@ <?xml version="1.0" ?><manifest> <!-- This is only a record of which revisions were pulled to generate the gonk.tar.xz snapshot referred to by releng-pandaboard.tt --> <remote fetch="https://android.googlesource.com/" name="aosp"/> <remote fetch="git://github.com/mozilla-b2g/" name="b2g"/> <remote fetch="git://android.git.linaro.org/" name="linaro"/> <remote fetch="git://github.com/mozilla/" name="mozilla"/> - <remote fetch="http://git.mozilla.org/" name="mozillaorg"/> + <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <default remote="linaro" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/> <!-- Gonk specific things and forks --> - <project name="platform_build" path="build" remote="b2g" revision="0784cdcb29ae45e5bf903cc03fa1bc206162665b"> + <project name="platform_build" path="build" remote="b2g" revision="43434d6cdbf702e6197e0791f19406860284edf6"> <copyfile dest="Makefile" src="core/root.mk"/> </project> - <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> - <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2f8c7d3546bda16b02a61b422786919875c19f15"/> - <project name="rilproxy" path="rilproxy" remote="b2g" revision="2d380d27c86263537f6b829cd0238f5dd702c735"/> - <project name="moztt" path="external/moztt" remote="b2g" revision="6ee1f8987ef36d688f97064c003ad57849dfadf2"/> + <!-- Information: fake-dalvik is tagged with B2G_1_0_0_20130125190500 --><project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> + <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="c6fc2e70b2586fe45db4b676567be2aa94cf420e"/> + <project name="rilproxy" path="rilproxy" remote="b2g" revision="f634b3d50effdd42828cc757c01fdbf74e562a36"/> + <project name="moztt" path="external/moztt" remote="b2g" revision="62f94a26d34c1f1e1846efd58d34363c051e8c66"/> <!-- Stock Android things --> - <!-- Information: platform/abi/cpp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/> - <!-- Information: platform/bionic is tagged with android-4.0.4_r2.1 --><project name="platform/bionic" path="bionic" revision="3d11bf0f3f3cf848f6f1e8449bf8736d8d1c78a3"/> + <!-- Information: platform/abi/cpp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/> + <project name="platform/bionic" path="bionic" revision="c7bab8cb8483e7869eabdbd4add7c9e5beeecc80"/> <!-- Information: platform/bootable/recovery is tagged with android-4.0.4_r2.1 --><project name="platform/bootable/recovery" path="bootable/recovery" revision="fadc5ac81d6400ebdd041f7d4ea64021596d6b7d"/> <!-- Information: device/common is tagged with android-sdk-adt_r20 --><project name="device/common" path="device/common" revision="7d4526582f88808a3194e1a3b304abb369d2745c"/> <!-- Information: device/sample is tagged with android-4.0.4_r2.1 --><project name="device/sample" path="device/sample" revision="ef228b8b377a9663e94be4b1aeb6c2bf7a07d098"/> - <!-- Information: platform/external/apache-http is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/apache-http" path="external/apache-http" revision="6c9d8c58d3ed710f87c26820d903bb8aad81754f"/> + <project name="platform_external_apriori" path="external/apriori" remote="b2g" revision="2c3a7113299eb789a076be23449d868b3bfa07fd"/> <!-- Information: platform/external/bluetooth/bluez is tagged with android-4.0.4_r2.1 --><project name="platform/external/bluetooth/bluez" path="external/bluetooth/bluez" revision="966afbd88f0bfc325bf80274ad2723c238883fa1"/> <!-- Information: platform/external/bluetooth/glib is tagged with android-4.1.1_r6.1 --><project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="1143b9918eab068401b604eb11c3f651f4e38b25"/> <!-- Information: platform/external/bluetooth/hcidump is tagged with android-4.1.1_r6.1 --><project name="platform/external/bluetooth/hcidump" path="external/bluetooth/hcidump" revision="7322661808c2006b7848e79e6bb72b37fbcf6710"/> - <!-- Information: platform/external/bsdiff is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/bsdiff" path="external/bsdiff" revision="81872540236d9bb15cccf963d05b9de48baa5375"/> - <project name="platform/external/busybox" path="external/busybox" remote="linaro" revision="0a41b083cdaf2ddd602fb5c955329494da25f2b9"/> - <!-- Information: platform/external/bzip2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/bzip2" path="external/bzip2" revision="048dacdca43eed1534689ececcf2781c63e1e4ba"/> + <!-- Information: platform/external/bsdiff is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/bsdiff" path="external/bsdiff" revision="81872540236d9bb15cccf963d05b9de48baa5375"/> + <project name="platform/external/busybox" path="external/busybox" remote="linaro" revision="2e461c8029a50d986dfe4ab07ae5a1834b5c40f0"/> + <!-- Information: platform/external/bzip2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/bzip2" path="external/bzip2" revision="048dacdca43eed1534689ececcf2781c63e1e4ba"/> <!-- Information: platform/external/dbus is tagged with android-4.1.1_r6.1 --><project name="platform/external/dbus" path="external/dbus" revision="537eaff5de9aace3348436166d4cde7adc1e488e"/> <!-- Information: platform/external/dhcpcd is tagged with android-sdk-adt_r20 --><project name="platform/external/dhcpcd" path="external/dhcpcd" revision="ddaa48f57b54b2862b3e6dcf18a44c9647f3baaa"/> - <!-- Information: platform/external/dnsmasq is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/dnsmasq" path="external/dnsmasq" revision="f621afad94df46204c25fc2593a19d704d2637f5"/> - <!-- Information: platform/external/expat is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/expat" path="external/expat" revision="6df134250feab71edb5915ecaa6268210bca76c5"/> - <!-- Information: platform/external/fdlibm is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/fdlibm" path="external/fdlibm" revision="988ffeb12a6e044ae3504838ef1fee3fe0716934"/> - <!-- Information: platform/external/flac is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/flac" path="external/flac" revision="5893fbe890f5dab8e4146d2baa4bd2691c0739e0"/> - <!-- Information: platform/external/freetype is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/freetype" path="external/freetype" revision="aeb407daf3711a10a27f3bc2223c5eb05158076e"/> - <!-- Information: platform/external/giflib is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/giflib" path="external/giflib" revision="b2597268aef084202a8c349d1cc072c03c6e22eb"/> - <!-- Information: platform/external/gtest is tagged with android-sdk-support_r11 --><project name="platform/external/gtest" path="external/gtest" remote="linaro" revision="344e5f3db17615cc853073a02968a603efd39109"/> + <!-- Information: platform/external/dnsmasq is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/dnsmasq" path="external/dnsmasq" revision="f621afad94df46204c25fc2593a19d704d2637f5"/> + <project name="platform_external_elfcopy" path="external/elfcopy" remote="b2g" revision="62c1bed1c4505369cac2e72fbe30452a598fb690"/> + <project name="platform_external_elfutils" path="external/elfutils" remote="b2g" revision="72940dec691fa3255e13df01f8c53b620e446066"/> + <!-- Information: platform/external/expat is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/expat" path="external/expat" revision="6df134250feab71edb5915ecaa6268210bca76c5"/> + <!-- Information: platform/external/fdlibm is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/fdlibm" path="external/fdlibm" revision="988ffeb12a6e044ae3504838ef1fee3fe0716934"/> + <!-- Information: platform/external/flac is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/flac" path="external/flac" revision="5893fbe890f5dab8e4146d2baa4bd2691c0739e0"/> + <!-- Information: platform/external/freetype is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/freetype" path="external/freetype" revision="aeb407daf3711a10a27f3bc2223c5eb05158076e"/> + <!-- Information: platform/external/giflib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/giflib" path="external/giflib" revision="b2597268aef084202a8c349d1cc072c03c6e22eb"/> + <project name="platform/external/gtest" path="external/gtest" remote="linaro" revision="8c212ebe53bb2baab3575f03069016f1fb11e449"/> <!-- Information: platform/external/harfbuzz is tagged with android-sdk-adt_r20 --><project name="platform/external/harfbuzz" path="external/harfbuzz" revision="bae491c03a00757d83ede8d855b7d85d246bde3d"/> - <!-- Information: platform/external/icu4c is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/icu4c" path="external/icu4c" revision="0fa67b93b831c6636ca18b152a1b1b14cc99b034"/> - <!-- Information: platform/external/iptables is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/iptables" path="external/iptables" revision="3b2deb17f065c5664bb25e1a28489e5792eb63ff"/> - <!-- Information: platform/external/jhead is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/jhead" path="external/jhead" revision="754078052c687f6721536009c816644c73e4f145"/> + <!-- Information: platform/external/icu4c is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/icu4c" path="external/icu4c" revision="0fa67b93b831c6636ca18b152a1b1b14cc99b034"/> + <!-- Information: platform/external/iptables is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/iptables" path="external/iptables" revision="3b2deb17f065c5664bb25e1a28489e5792eb63ff"/> + <!-- Information: platform/external/jhead is tagged with android-4.0.4_r2.1 --><project name="platform/external/jhead" path="external/jhead" revision="754078052c687f6721536009c816644c73e4f145"/> <!-- Information: platform/external/jpeg is tagged with android-4.1.1_r6.1 --><project name="platform/external/jpeg" path="external/jpeg" revision="d4fad7f50f79626455d88523207e05b868819cd8"/> - <!-- Information: platform/external/libgsm is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/libgsm" path="external/libgsm" revision="5e4516958690b9a1b2c98f88eeecba3edd2dbda4"/> - <!-- Information: platform/external/liblzf is tagged with android-sdk-support_r11 --><project name="platform/external/liblzf" path="external/liblzf" revision="6946aa575b0949d045722794850896099d937cbb"/> + <!-- Information: platform/external/libgsm is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/libgsm" path="external/libgsm" revision="5e4516958690b9a1b2c98f88eeecba3edd2dbda4"/> + <!-- Information: platform/external/liblzf is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/liblzf" path="external/liblzf" revision="6946aa575b0949d045722794850896099d937cbb"/> <!-- Information: platform/external/libnfc-nxp is tagged with android-4.0.4_r2.1 --><project name="platform/external/libnfc-nxp" path="external/libnfc-nxp" revision="533c14450e6239cce8acb74f4e4dea2c89f8f219"/> - <!-- Information: platform/external/libnl-headers is tagged with android-sdk-support_r11 --><project name="platform/external/libnl-headers" path="external/libnl-headers" revision="6ccf7349d61f73ac26a0675d735d903ab919c658"/> - <!-- Information: platform/external/libphonenumber is tagged with android-4.0.4_r2.1 --><project name="platform/external/libphonenumber" path="external/libphonenumber" revision="d470984844c388d6766c3de6ac64e93e00480fc9"/> + <!-- Information: platform/external/libnl-headers is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/libnl-headers" path="external/libnl-headers" revision="6ccf7349d61f73ac26a0675d735d903ab919c658"/> <!-- Information: platform/external/libpng is tagged with android-4.0.4_r2.1 --><project name="platform/external/libpng" path="external/libpng" revision="84d92c718ab9f48faec0f640747c4b6f7a995607"/> - <!-- Information: platform/external/libvpx is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/libvpx" path="external/libvpx" revision="3a40da0d96da5c520e7707aa14f48a80956e20d7"/> + <!-- Information: platform/external/libvpx is tagged with M8960AAAAANLYA1519349 --><project name="platform/external/libvpx" path="external/libvpx" revision="3a40da0d96da5c520e7707aa14f48a80956e20d7"/> <!-- Information: platform/external/mksh is tagged with M8960AAAAANLYA1099D --><project name="platform/external/mksh" path="external/mksh" revision="5155f1c7438ef540d7b25eb70aa1639579795b07"/> - <project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/> + <!-- Information: platform_external_opensans is tagged with B2G_1_0_0_20130125190500 --><project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/> <!-- Information: platform/external/openssl is tagged with android-4.0.4_r2.1 --><project name="platform/external/openssl" path="external/openssl" revision="ce96fb211b9a44bbd7fb5ef7ed0e6c1244045c2e"/> - <!-- Information: platform/external/protobuf is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/protobuf" path="external/protobuf" revision="e217977611c52bccde7f7c78e1d3c790c6357431"/> - <!-- Information: platform/external/safe-iop is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/safe-iop" path="external/safe-iop" revision="07073634e2e3aa4f518e36ed5dec3aabc549d5fb"/> - <project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/> + <!-- Information: platform/external/protobuf is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/protobuf" path="external/protobuf" revision="e217977611c52bccde7f7c78e1d3c790c6357431"/> + <!-- Information: platform/external/safe-iop is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/safe-iop" path="external/safe-iop" revision="07073634e2e3aa4f518e36ed5dec3aabc549d5fb"/> + <!-- Information: screencap-gonk is tagged with B2G_1_0_0_20130125190500 --><project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/> <!-- Information: platform/external/skia is tagged with android-4.0.4_r2.1 --><project name="platform/external/skia" path="external/skia" revision="5c67a309e16bffe7013defda8f1217b3ce2420b4"/> <!-- Information: platform/external/sonivox is tagged with android-sdk-adt_r20 --><project name="platform/external/sonivox" path="external/sonivox" revision="5f9600971859fe072f31b38a51c38157f5f9b381"/> - <!-- Information: platform/external/speex is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/speex" path="external/speex" revision="ebe6230a7f7c69f5a4389f2b09b7b19ef9e94f32"/> + <!-- Information: platform/external/speex is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/speex" path="external/speex" revision="ebe6230a7f7c69f5a4389f2b09b7b19ef9e94f32"/> <!-- Information: platform/external/sqlite is tagged with android-4.0.4_r2.1 --><project name="platform/external/sqlite" path="external/sqlite" revision="c999ff8c12a4cf81cb9ad628f47b2720effba5e5"/> - <!-- Information: platform/external/stlport is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/stlport" path="external/stlport" revision="a6734e0645fce81c9610de0488b729207bfa576e"/> - <!-- Information: platform/external/strace is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/strace" path="external/strace" revision="c9fd2e5ef7d002e12e7cf2512506c84a9414b0fd"/> - <!-- Information: platform/external/tagsoup is tagged with android-sdk-support_r11 --><project name="platform/external/tagsoup" path="external/tagsoup" revision="68c2ec9e0acdb3214b7fb91dbab8c9fab8736817"/> + <!-- Information: platform/external/stlport is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/stlport" path="external/stlport" revision="a6734e0645fce81c9610de0488b729207bfa576e"/> + <!-- Information: platform/external/strace is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/strace" path="external/strace" revision="c9fd2e5ef7d002e12e7cf2512506c84a9414b0fd"/> + <!-- Information: platform/external/tagsoup is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/tagsoup" path="external/tagsoup" revision="68c2ec9e0acdb3214b7fb91dbab8c9fab8736817"/> <!-- Information: platform/external/tinyalsa is tagged with android-4.0.4_r2.1 --><project name="platform/external/tinyalsa" path="external/tinyalsa" revision="495239e683a728957c890c124b239f9b7b8ef5a8"/> - <!-- Information: platform/external/tremolo is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/tremolo" path="external/tremolo" revision="25bd78d2392dbdc879ae53382cde9d019f79cf6f"/> - <!-- Information: platform/external/webp is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.041 --><project name="platform/external/webp" path="external/webp" revision="88fe2b83c4b9232cd08729556fd0485d6a6a92cd"/> + <!-- Information: platform/external/tremolo is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/tremolo" path="external/tremolo" revision="25bd78d2392dbdc879ae53382cde9d019f79cf6f"/> + <!-- Information: platform/external/webp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/webp" path="external/webp" revision="88fe2b83c4b9232cd08729556fd0485d6a6a92cd"/> <!-- Information: platform/external/webrtc is tagged with android-sdk-adt_r20 --><project name="platform/external/webrtc" path="external/webrtc" revision="4b6dc1ec58105d17dc8c2f550124cc0621dc93b7"/> - <!-- Information: platform/external/wpa_supplicant is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/external/wpa_supplicant" path="external/wpa_supplicant" revision="a01d37870bbf9892d43e792e5de0683ca41c5497"/> + <!-- Information: platform/external/wpa_supplicant is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/wpa_supplicant" path="external/wpa_supplicant" revision="a01d37870bbf9892d43e792e5de0683ca41c5497"/> <project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="6dd24fc3792d71edccef9b09140f9a44b063a553"/> <!-- Information: platform/external/zlib is tagged with android-4.0.4_r2.1 --><project name="platform/external/zlib" path="external/zlib" revision="69e5801bd16a495e1c1666669fe827b1ddb8d56b"/> <!-- Information: platform/external/yaffs2 is tagged with android-4.0.4-aah_r1 --><project name="platform/external/yaffs2" path="external/yaffs2" revision="6232e2d5ab34a40d710e4b05ab0ec6e3727804e7"/> <!-- Information: platform/frameworks/base is tagged with android-4.0.4_r2.1 --><project name="platform/frameworks/base" path="frameworks/base" revision="df331873c8576e0ae34ae1ee3cc258beed373535"/> - <!-- Information: platform/frameworks/opt/emoji is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.138 --><project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="a95d8db002770469d72dfaf59ff37ac96db29a87"/> + <!-- Information: platform/frameworks/opt/emoji is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="a95d8db002770469d72dfaf59ff37ac96db29a87"/> <!-- Information: platform/frameworks/support is tagged with android-4.0.4_r2.1 --><project name="platform/frameworks/support" path="frameworks/support" revision="bfc8e01b7b0d5ea70ce89d0409b72b7f7d540f43"/> <!-- Information: platform/hardware/libhardware is tagged with android-4.0.4_r2.1 --><project name="platform/hardware/libhardware" path="hardware/libhardware" revision="a9b677fce432b29ab8f61e13796f34880dc0fe0f"/> <!-- Information: platform/hardware/libhardware_legacy is tagged with android-4.0.4_r2.1 --><project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="153d0f1a27e0a157cabb6ca9d0d88248630f5695"/> <!-- Information: platform/hardware/ril is tagged with android-4.0.4_r2.1 --><project name="platform/hardware/ril" path="hardware/ril" revision="300105d1487f5238940c18792b879793826b61f4"/> <!-- Information: platform/libcore is tagged with android-4.0.4_r2.1 --><project name="platform/libcore" path="libcore" revision="fc294a48d80d9e2b2ac126edf93ad316f5f6cf72"/> <!-- Information: platform/ndk is tagged with android-4.0.4_r2.1 --><project name="platform/ndk" path="ndk" revision="2d77f5a05f60029c981f299b222cfe28db18ccf7"/> <!-- Information: platform/prebuilt is tagged with tungsten-bootloader-ics-aah --><project name="platform/prebuilt" path="prebuilt" revision="0e104261b6d33f87e9f86ff4249bcc0306ab278b"/> <!-- Information: platform/system/bluetooth is tagged with android-4.0.4_r2.1 --><project name="platform/system/bluetooth" path="system/bluetooth" revision="2588cd802f322650ed737dfb7a10e9ad94064e99"/> <!-- Information: platform/system/core is tagged with android-4.0.4_r2.1 --><project name="platform/system/core" path="system/core" revision="c2db4ffb874783220abf967ca4ccd0e6cf1ba57f"/> <!-- Information: platform/system/extras is tagged with android-4.0.4_r2.1 --><project name="platform/system/extras" path="system/extras" revision="fa351ab265957fa8815df3c4ca1f3c105f253e8b"/> <!-- Information: platform/system/media is tagged with android-4.0.4_r2.1 --><project name="platform/system/media" path="system/media" revision="a8eea50f80327f15cb04bbdfee2d1cfcc4c3ce4a"/> <!-- Information: platform/system/netd is tagged with android-4.0.4_r2.1 --><project name="platform/system/netd" path="system/netd" revision="3c903b555975fa59d6688a0a6417ac7512c202e7"/> <!-- Information: platform/system/vold is tagged with android-4.0.4_r2.1 --><project name="platform/system/vold" path="system/vold" revision="3ad9072a5d6f6bda32123b367545649364e3c11d"/> <!-- Pandaboard specific things --> - <project name="android-device-panda" path="device/ti/panda" remote="b2g" revision="0e9a89187970d6fa99930c8d9cb438b935c2337c"/> + <project name="android-device-panda" path="device/ti/panda" remote="b2g" revision="eec93d3e9eb7765f63415e2ad42003a00b5996b4"/> <!-- Information: platform/hardware/ti/omap4xxx is tagged with android-4.0.4_r2.1 --><project name="platform/hardware/ti/omap4xxx" path="hardware/ti/omap4xxx" revision="8be8e9a68c96b6cf43c08a58e7ecd7708737c599"/> <project name="platform/hardware/ti/wlan" path="hardware/ti/wlan" revision="60dfeb6e4448bfed707946ebca6612980f525e69"/> <project name="platform/hardware/ti/wpan" path="hardware/ti/wpan" revision="3ece7d9e08052989401e008bc397dbcd2557cfd0"/> - <project name="Negatus" path="external/negatus" remote="mozilla" revision="151697c638a6781e83c76d4a01fb001aabde4e79"/> - + <project name="Negatus" path="external/negatus" remote="mozilla" revision="83e11def08ae4bc590adda8dfc1de661585adb53"/> + <project name="orangutan" path="external/orangutan" remote="b2g" revision="1735c3c4d6008d7f9e929d55ed0e06b995156fa2"/> + </manifest> \ No newline at end of file
--- a/b2g/config/unagi/releng-unagi.tt +++ b/b2g/config/unagi/releng-unagi.tt @@ -1,12 +1,12 @@ [ { -"size": 832272360, -"digest": "bb7369106d32a184c61fc8c6658c4d1c64dd778e432a3dd39592b99a92ed0a8f4a9fede60399ec2c85ddaf077f27d77613848b253f0ac155383b23955446396f", +"size": 832866776, +"digest": "27b9e0754de94537d664d12f5e3a2767582ceedb4ee96eb06abe405e6e9b8a0937d56ffd84cb6ce4d197c25168124296806b1ad638175b004a11ab5293b99f08", "algorithm": "sha512", "filename": "gonk.tar.xz" }, { "size": 8622080, "digest": "36681be904b20a52dbebf38b86466026430d59adb0e72428ae7557a442d037eb378d278aab181b04a753821ff0a99b6228380d59f86ddd5fbf291284fe54932b", "algorithm": "sha512", "filename": "boot.img"
--- a/b2g/config/unagi/sources.xml +++ b/b2g/config/unagi/sources.xml @@ -1,109 +1,110 @@ <?xml version="1.0" ?><manifest> <!-- This is only a record of which revisions were pulled to generate the gonk.tar.xz snapshot referred to by releng-unagi.tt --> <remote fetch="https://android.googlesource.com/" name="aosp"/> - <remote fetch="git://github.com/mozilla-b2g/" name="b2g"/> + <remote fetch="https://git.mozilla.org/b2g" name="b2g"/> + <remote fetch="git://github.com/mozilla-b2g/" name="b2ggithub"/> <remote fetch="git://github.com/mozilla/" name="mozilla"/> - <remote fetch="http://git.mozilla.org/" name="mozillaorg"/> <remote fetch="git://codeaurora.org/" name="caf"/> <remote fetch="git://android.git.linaro.org/" name="linaro"/> + <remote fetch="https://git.mozilla.org/releases" name="mozillaorg"/> <default remote="caf" revision="ics_chocolate_rb4.2" sync-j="4"/> <!-- Gonk specific things and forks --> - <project name="platform_build" path="build" remote="b2g" revision="0784cdcb29ae45e5bf903cc03fa1bc206162665b"> + <project name="platform_build" path="build" remote="b2g" revision="43434d6cdbf702e6197e0791f19406860284edf6"> <copyfile dest="Makefile" src="core/root.mk"/> </project> - <project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> - <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2f8c7d3546bda16b02a61b422786919875c19f15"/> - <project name="rilproxy" path="rilproxy" remote="b2g" revision="2d380d27c86263537f6b829cd0238f5dd702c735"/> - <project name="librecovery" path="librecovery" remote="b2g" revision="601fc18b28c9d7cf6954b281ddd3b705c74a9215"/> - <project name="moztt" path="external/moztt" remote="b2g" revision="6ee1f8987ef36d688f97064c003ad57849dfadf2"/> + <!-- Information: fake-dalvik is tagged with B2G_1_0_0_20130125190500 --><project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/> + <project name="gonk-misc" path="gonk-misc" remote="b2g" revision="8f016ce56fc7d7ef0aa7428ed509f6fb7cbde5b7"/> + <project name="rilproxy" path="rilproxy" remote="b2g" revision="f634b3d50effdd42828cc757c01fdbf74e562a36"/> + <!-- Information: librecovery is tagged with B2G_1_0_0_20130125190500 --><project name="librecovery" path="librecovery" remote="b2g" revision="601fc18b28c9d7cf6954b281ddd3b705c74a9215"/> + <project name="moztt" path="external/moztt" remote="b2g" revision="62f94a26d34c1f1e1846efd58d34363c051e8c66"/> <!-- Stock Android things --> - <!-- Information: platform/abi/cpp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/> + <!-- Information: platform/abi/cpp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/> <!-- Information: platform/bionic is tagged with M8960AAAAANLYA100715A --><project name="platform/bionic" path="bionic" revision="cd5dfce80bc3f0139a56b58aca633202ccaee7f8"/> <!-- Information: platform/bootable/recovery is tagged with M8960AAAAANLYA100715A --><project name="platform/bootable/recovery" path="bootable/recovery" revision="e0a9ac010df3afaa47ba107192c05ac8b5516435"/> <!-- Information: platform/development is tagged with M8960AAAAANLYA100715A --><project name="platform/development" path="development" revision="a384622f5fcb1d2bebb9102591ff7ae91fe8ed2d"/> - <!-- Information: device/common is tagged with M8960AAAAANLYA1005304 --><project name="device/common" path="device/common" revision="7c65ea240157763b8ded6154a17d3c033167afb7"/> + <!-- Information: device/common is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="device/common" path="device/common" revision="7c65ea240157763b8ded6154a17d3c033167afb7"/> <!-- Information: device/sample is tagged with M8960AAAAANLYA100715A --><project name="device/sample" path="device/sample" revision="c328f3d4409db801628861baa8d279fb8855892f"/> - <!-- Information: platform/external/apache-http is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/apache-http" path="external/apache-http" revision="6c9d8c58d3ed710f87c26820d903bb8aad81754f"/> + <project name="platform_external_apriori" path="external/apriori" remote="b2ggithub" revision="2c3a7113299eb789a076be23449d868b3bfa07fd"/> <!-- Information: platform/external/bluetooth/bluez is tagged with M76XXUSNEKNLYA2040 --><project name="platform/external/bluetooth/bluez" path="external/bluetooth/bluez" revision="1023c91c66e9c3bd1132480051993bf7827770f6"/> - <!-- Information: platform/external/bluetooth/glib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="c6b49241cc1a8950723a5f74f8f4b4f4c3fa970e"/> - <!-- Information: platform/external/bluetooth/hcidump is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/bluetooth/hcidump" path="external/bluetooth/hcidump" revision="02b1eb24fbb3d0135a81edb4a2175b1397308d7d"/> - <!-- Information: platform/external/bsdiff is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/bsdiff" path="external/bsdiff" revision="81872540236d9bb15cccf963d05b9de48baa5375"/> - <!-- Information: platform/external/bzip2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/bzip2" path="external/bzip2" revision="048dacdca43eed1534689ececcf2781c63e1e4ba"/> + <!-- Information: platform/external/bluetooth/glib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="c6b49241cc1a8950723a5f74f8f4b4f4c3fa970e"/> + <!-- Information: platform/external/bluetooth/hcidump is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/bluetooth/hcidump" path="external/bluetooth/hcidump" revision="02b1eb24fbb3d0135a81edb4a2175b1397308d7d"/> + <!-- Information: platform/external/bsdiff is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/bsdiff" path="external/bsdiff" revision="81872540236d9bb15cccf963d05b9de48baa5375"/> + <!-- Information: platform/external/bzip2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/bzip2" path="external/bzip2" revision="048dacdca43eed1534689ececcf2781c63e1e4ba"/> <!-- Information: platform/external/dbus is tagged with M8960AAAAANLYA100715A --><project name="platform/external/dbus" path="external/dbus" revision="c7517b6195dc6926728352113e6cc335da3f9c9e"/> <!-- Information: platform/external/dhcpcd is tagged with M8960AAAAANLYA100715A --><project name="platform/external/dhcpcd" path="external/dhcpcd" revision="1e00fb67022d0921af0fead263f81762781b9ffa"/> - <!-- Information: platform/external/dnsmasq is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/dnsmasq" path="external/dnsmasq" revision="f621afad94df46204c25fc2593a19d704d2637f5"/> - <!-- Information: platform/external/e2fsprogs is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/e2fsprogs" path="external/e2fsprogs" revision="d5f550bb2f556c5d287f7c8d2b77223654bcec37"/> - <!-- Information: platform/external/expat is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/expat" path="external/expat" revision="6df134250feab71edb5915ecaa6268210bca76c5"/> - <!-- Information: platform/external/fdlibm is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/fdlibm" path="external/fdlibm" revision="988ffeb12a6e044ae3504838ef1fee3fe0716934"/> - <!-- Information: platform/external/flac is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/flac" path="external/flac" revision="5893fbe890f5dab8e4146d2baa4bd2691c0739e0"/> - <!-- Information: platform/external/freetype is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/freetype" path="external/freetype" revision="aeb407daf3711a10a27f3bc2223c5eb05158076e"/> - <!-- Information: platform/external/giflib is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/giflib" path="external/giflib" revision="b2597268aef084202a8c349d1cc072c03c6e22eb"/> - <!-- Information: platform/external/gtest is tagged with android-sdk-support_r11 --><project name="platform/external/gtest" path="external/gtest" remote="linaro" revision="344e5f3db17615cc853073a02968a603efd39109"/> - <!-- Information: platform/external/harfbuzz is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/harfbuzz" path="external/harfbuzz" revision="116610d63a859521dacf00fb6818ee9ab2e666f6"/> - <!-- Information: platform/external/icu4c is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/icu4c" path="external/icu4c" revision="0fa67b93b831c6636ca18b152a1b1b14cc99b034"/> - <!-- Information: platform/external/iptables is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/iptables" path="external/iptables" revision="3b2deb17f065c5664bb25e1a28489e5792eb63ff"/> - <!-- Information: platform/external/jhead is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/jhead" path="external/jhead" revision="754078052c687f6721536009c816644c73e4f145"/> - <!-- Information: platform/external/jpeg is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/jpeg" path="external/jpeg" revision="a62e464d672a4623233180e4023034bf825f066e"/> - <!-- Information: platform/external/libgsm is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/libgsm" path="external/libgsm" revision="5e4516958690b9a1b2c98f88eeecba3edd2dbda4"/> - <!-- Information: platform/external/liblzf is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/liblzf" path="external/liblzf" revision="6946aa575b0949d045722794850896099d937cbb"/> - <!-- Information: platform/external/libnfc-nxp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/libnfc-nxp" path="external/libnfc-nxp" revision="3a912b065a31a72c63ad56ac224cfeaa933423b6"/> - <!-- Information: platform/external/libnl-headers is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/libnl-headers" path="external/libnl-headers" revision="6ccf7349d61f73ac26a0675d735d903ab919c658"/> - <!-- Information: platform/external/libphonenumber is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/libphonenumber" path="external/libphonenumber" revision="8d22c9a05eda1935c6dc27d188158e6ee38dc016"/> + <!-- Information: platform/external/dnsmasq is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/dnsmasq" path="external/dnsmasq" revision="f621afad94df46204c25fc2593a19d704d2637f5"/> + <project name="platform_external_elfcopy" path="external/elfcopy" remote="b2ggithub" revision="62c1bed1c4505369cac2e72fbe30452a598fb690"/> + <project name="platform_external_elfutils" path="external/elfutils" remote="b2ggithub" revision="72940dec691fa3255e13df01f8c53b620e446066"/> + <!-- Information: platform/external/e2fsprogs is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/e2fsprogs" path="external/e2fsprogs" revision="d5f550bb2f556c5d287f7c8d2b77223654bcec37"/> + <!-- Information: platform/external/expat is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/expat" path="external/expat" revision="6df134250feab71edb5915ecaa6268210bca76c5"/> + <!-- Information: platform/external/fdlibm is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/fdlibm" path="external/fdlibm" revision="988ffeb12a6e044ae3504838ef1fee3fe0716934"/> + <!-- Information: platform/external/flac is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/flac" path="external/flac" revision="5893fbe890f5dab8e4146d2baa4bd2691c0739e0"/> + <!-- Information: platform/external/freetype is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/freetype" path="external/freetype" revision="aeb407daf3711a10a27f3bc2223c5eb05158076e"/> + <!-- Information: platform/external/giflib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/giflib" path="external/giflib" revision="b2597268aef084202a8c349d1cc072c03c6e22eb"/> + <project name="platform/external/gtest" path="external/gtest" remote="linaro" revision="8c212ebe53bb2baab3575f03069016f1fb11e449"/> + <!-- Information: platform/external/harfbuzz is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/harfbuzz" path="external/harfbuzz" revision="116610d63a859521dacf00fb6818ee9ab2e666f6"/> + <!-- Information: platform/external/icu4c is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/icu4c" path="external/icu4c" revision="0fa67b93b831c6636ca18b152a1b1b14cc99b034"/> + <!-- Information: platform/external/iptables is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/iptables" path="external/iptables" revision="3b2deb17f065c5664bb25e1a28489e5792eb63ff"/> + <!-- Information: platform/external/jpeg is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/jpeg" path="external/jpeg" revision="a62e464d672a4623233180e4023034bf825f066e"/> + <!-- Information: platform/external/libgsm is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/libgsm" path="external/libgsm" revision="5e4516958690b9a1b2c98f88eeecba3edd2dbda4"/> + <!-- Information: platform/external/liblzf is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/liblzf" path="external/liblzf" revision="6946aa575b0949d045722794850896099d937cbb"/> + <!-- Information: platform/external/libnfc-nxp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/libnfc-nxp" path="external/libnfc-nxp" revision="3a912b065a31a72c63ad56ac224cfeaa933423b6"/> + <!-- Information: platform/external/libnl-headers is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/libnl-headers" path="external/libnl-headers" revision="6ccf7349d61f73ac26a0675d735d903ab919c658"/> <!-- Information: platform/external/libpng is tagged with M8960AAAAANLYA100715A --><project name="platform/external/libpng" path="external/libpng" revision="9c3730f0efa69f580f03463c237cd928f3196404"/> <!-- Information: platform/external/libvpx is tagged with M8960AAAAANLYA1519349 --><project name="platform/external/libvpx" path="external/libvpx" revision="3a40da0d96da5c520e7707aa14f48a80956e20d7"/> - <!-- Information: platform/external/llvm is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/llvm" path="external/llvm" revision="bff5923831940309f7d8ddbff5826ca6ed2dc050"/> - <!-- Information: platform/external/mksh is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/mksh" path="external/mksh" revision="ec646e8f5e7dac9a77d1de549c6ed92c04d0cd4b"/> - <project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/> + <!-- Information: platform/external/llvm is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/llvm" path="external/llvm" revision="bff5923831940309f7d8ddbff5826ca6ed2dc050"/> + <!-- Information: platform/external/mksh is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/mksh" path="external/mksh" revision="ec646e8f5e7dac9a77d1de549c6ed92c04d0cd4b"/> + <!-- Information: platform_external_opensans is tagged with B2G_1_0_0_20130125190500 --><project name="platform_external_opensans" path="external/opensans" remote="b2g" revision="b5b4c226ca1d71e936153cf679dda6d3d60e2354"/> <!-- Information: platform/external/openssl is tagged with AU_LINUX_ANDROID_ICS.04.00.04.00.110 --><project name="platform/external/openssl" path="external/openssl" revision="27d333cce9a31c806b4bfa042925f045c727aecd"/> - <!-- Information: platform/external/protobuf is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/protobuf" path="external/protobuf" revision="e217977611c52bccde7f7c78e1d3c790c6357431"/> - <!-- Information: platform/external/safe-iop is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/safe-iop" path="external/safe-iop" revision="07073634e2e3aa4f518e36ed5dec3aabc549d5fb"/> - <project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/> + <!-- Information: platform/external/protobuf is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/protobuf" path="external/protobuf" revision="e217977611c52bccde7f7c78e1d3c790c6357431"/> + <!-- Information: platform/external/safe-iop is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/safe-iop" path="external/safe-iop" revision="07073634e2e3aa4f518e36ed5dec3aabc549d5fb"/> + <!-- Information: screencap-gonk is tagged with B2G_1_0_0_20130125190500 --><project name="screencap-gonk" path="external/screencap-gonk" remote="b2g" revision="e6403c71e9eca8cb943739d5a0a192deac60fc51"/> <!-- Information: platform/external/skia is tagged with M8960AAAAANLYA100715A --><project name="platform/external/skia" path="external/skia" revision="7d90c85f2c0e3b747f7c7eff8bc9253b0063b439"/> - <!-- Information: platform/external/sonivox is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/sonivox" path="external/sonivox" revision="7c967779dfc61ac1f346e972de91d4bfce7dccbb"/> - <!-- Information: platform/external/speex is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/speex" path="external/speex" revision="ebe6230a7f7c69f5a4389f2b09b7b19ef9e94f32"/> + <!-- Information: platform/external/sonivox is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/sonivox" path="external/sonivox" revision="7c967779dfc61ac1f346e972de91d4bfce7dccbb"/> + <!-- Information: platform/external/speex is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/speex" path="external/speex" revision="ebe6230a7f7c69f5a4389f2b09b7b19ef9e94f32"/> <project name="platform/external/sqlite" path="external/sqlite" revision="fb30e613139b8836fdc8e81e166cf3a76e5fa17f"/> - <!-- Information: platform/external/stlport is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/stlport" path="external/stlport" revision="a6734e0645fce81c9610de0488b729207bfa576e"/> - <!-- Information: platform/external/strace is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/strace" path="external/strace" revision="c9fd2e5ef7d002e12e7cf2512506c84a9414b0fd"/> - <!-- Information: platform/external/tagsoup is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/tagsoup" path="external/tagsoup" revision="68c2ec9e0acdb3214b7fb91dbab8c9fab8736817"/> - <!-- Information: platform/external/tinyalsa is tagged with M8960AAAAANLYA1005304 --><project name="platform/external/tinyalsa" path="external/tinyalsa" revision="06cc244ee512c1352215e543615738bc8ac82814"/> - <!-- Information: platform/external/tremolo is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/tremolo" path="external/tremolo" revision="25bd78d2392dbdc879ae53382cde9d019f79cf6f"/> - <project name="unbootimg" path="external/unbootimg" remote="b2g" revision="9464623d92eb8668544916dc5a8f4f6337d0bc08"/> - <!-- Information: platform/external/webp is tagged with AU_LINUX_ANDROID_JB_REL_2.0.3.04.01.02.21.081 --><project name="platform/external/webp" path="external/webp" revision="88fe2b83c4b9232cd08729556fd0485d6a6a92cd"/> - <!-- Information: platform/external/webrtc is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/webrtc" path="external/webrtc" revision="137024dc8a2e9251a471e20518a9c3ae06f81f23"/> - <!-- Information: platform/external/wpa_supplicant is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/wpa_supplicant" path="external/wpa_supplicant" revision="a01d37870bbf9892d43e792e5de0683ca41c5497"/> + <!-- Information: platform/external/stlport is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/stlport" path="external/stlport" revision="a6734e0645fce81c9610de0488b729207bfa576e"/> + <!-- Information: platform/external/strace is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/strace" path="external/strace" revision="c9fd2e5ef7d002e12e7cf2512506c84a9414b0fd"/> + <!-- Information: platform/external/tagsoup is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/tagsoup" path="external/tagsoup" revision="68c2ec9e0acdb3214b7fb91dbab8c9fab8736817"/> + <!-- Information: platform/external/tinyalsa is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/external/tinyalsa" path="external/tinyalsa" revision="06cc244ee512c1352215e543615738bc8ac82814"/> + <!-- Information: platform/external/tremolo is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/tremolo" path="external/tremolo" revision="25bd78d2392dbdc879ae53382cde9d019f79cf6f"/> + <!-- Information: unbootimg is tagged with B2G_1_0_0_20130125190500 --><project name="unbootimg" path="external/unbootimg" remote="b2g" revision="9464623d92eb8668544916dc5a8f4f6337d0bc08"/> + <!-- Information: platform/external/webp is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/webp" path="external/webp" revision="88fe2b83c4b9232cd08729556fd0485d6a6a92cd"/> + <!-- Information: platform/external/webrtc is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/webrtc" path="external/webrtc" revision="137024dc8a2e9251a471e20518a9c3ae06f81f23"/> + <!-- Information: platform/external/wpa_supplicant is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/wpa_supplicant" path="external/wpa_supplicant" revision="a01d37870bbf9892d43e792e5de0683ca41c5497"/> <!-- Information: platform/external/hostap is tagged with M8960AAAAANLYA1047 --><project name="platform/external/hostap" path="external/hostap" revision="bf04b0faadbdeb4b7943f2e2c4c5aa59df872bb1"/> - <!-- Information: platform/external/zlib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/zlib" path="external/zlib" revision="f96a1d1ebfdf1cd582210fd09c23d8f59e0ae094"/> - <!-- Information: platform/external/yaffs2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/external/yaffs2" path="external/yaffs2" revision="0afa916204c664b3114429637b63af1321a0aeca"/> + <!-- Information: platform/external/zlib is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.01.19.008 --><project name="platform/external/zlib" path="external/zlib" revision="f96a1d1ebfdf1cd582210fd09c23d8f59e0ae094"/> + <!-- Information: platform/external/yaffs2 is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/external/yaffs2" path="external/yaffs2" revision="0afa916204c664b3114429637b63af1321a0aeca"/> <!-- Information: platform/frameworks/base is tagged with M76XXUSNEKNLYA2040 --><project name="platform/frameworks/base" path="frameworks/base" revision="eb2bc75803ca179353c24c364a9c8a8ce23e8b78"/> - <!-- Information: platform/frameworks/opt/emoji is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="a95d8db002770469d72dfaf59ff37ac96db29a87"/> - <!-- Information: platform/frameworks/support is tagged with M8960AAAAANLYA1005304 --><project name="platform/frameworks/support" path="frameworks/support" revision="27208692b001981f1806f4f396434f4eac78b909"/> + <!-- Information: platform/frameworks/opt/emoji is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/frameworks/opt/emoji" path="frameworks/opt/emoji" revision="a95d8db002770469d72dfaf59ff37ac96db29a87"/> + <!-- Information: platform/frameworks/support is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/frameworks/support" path="frameworks/support" revision="27208692b001981f1806f4f396434f4eac78b909"/> <!-- Information: platform/hardware/libhardware is tagged with M8960AAAAANLYA1049B --><project name="platform/hardware/libhardware" path="hardware/libhardware" revision="4a619901847621f8a7305edf42dd07347a140484"/> <!-- Information: platform/hardware/libhardware_legacy is tagged with M8960AAAAANLYA153611 --><project name="platform/hardware/libhardware_legacy" path="hardware/libhardware_legacy" revision="87b4d7afa8f854b445e2d0d95091f6f6069f2b30"/> <!-- Information: platform/libcore is tagged with M8960AAAAANLYA100715A --><project name="platform/libcore" path="libcore" revision="30841f9fba9ccd5c54f4f079f495994db97f283e"/> - <!-- Information: platform/ndk is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/ndk" path="ndk" revision="9f555971e1481854d5b4dc11b3e6af9fff4f241f"/> - <!-- Information: platform/prebuilt is tagged with M8960AAAAANLYA1005304 --><project name="platform/prebuilt" path="prebuilt" revision="447ea790fcc957dde59730ecc2a65ca263bdc733"/> + <!-- Information: platform/ndk is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.01.00.19.013 --><project name="platform/ndk" path="ndk" revision="9f555971e1481854d5b4dc11b3e6af9fff4f241f"/> + <!-- Information: platform/prebuilt is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/prebuilt" path="prebuilt" revision="447ea790fcc957dde59730ecc2a65ca263bdc733"/> <!-- Information: platform/system/bluetooth is tagged with M8960AAAAANLYA100703 --><project name="platform/system/bluetooth" path="system/bluetooth" revision="7772cad4823f1f427ce1d4df84a55982386d6d18"/> <!-- Information: platform/system/core is tagged with M76XXUSNEKNLYA2040 --><project name="platform/system/core" path="system/core" revision="bf1970408676ce570b8f4dc3efa038e47552137f"/> - <!-- Information: platform/system/extras is tagged with M8960AAAAANLYA1005304 --><project name="platform/system/extras" path="system/extras" revision="01db6c1254e1407740a543f24317fc540fc4c049"/> - <!-- Information: platform/system/media is tagged with M8960AAAAANLYA1005304 --><project name="platform/system/media" path="system/media" revision="7f71c7fd362bbd992ff2e0e80f7af5859ad116ad"/> + <!-- Information: platform/system/extras is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/system/extras" path="system/extras" revision="01db6c1254e1407740a543f24317fc540fc4c049"/> + <!-- Information: platform/system/media is tagged with AU_LINUX_ANDROID_ICS_CHOCOLATE.04.00.04.05.324 --><project name="platform/system/media" path="system/media" revision="7f71c7fd362bbd992ff2e0e80f7af5859ad116ad"/> <!-- Information: platform/system/netd is tagged with M8960AAAAANLYA1049 --><project name="platform/system/netd" path="system/netd" revision="306e765248e3900041bf2737e9f57b1b5694a4ce"/> <!-- Information: platform/system/vold is tagged with M8960AAAAANLYA100715A --><project name="platform/system/vold" path="system/vold" revision="99fff257d53cc045d1460841edca5d901dacfcf5"/> <!-- Otoro/Unagi specific things --> <!-- Information: device/qcom/common is tagged with M8960AAAAANLYA100715A --><project name="device/qcom/common" path="device/qcom/common" revision="b9cdab8e1e1a215a8c65b8d5816f666bec7be205"/> <!-- Information: platform/vendor/qcom/msm7627a is tagged with M8960AAAAANLYA100715A --><project name="platform/vendor/qcom/msm7627a" path="device/qcom/msm7627a" revision="d920a502ba17cf4d716f8b1a615f07e796b0501a"/> - <project name="android-device-otoro" path="device/qcom/otoro" remote="b2g" revision="7662275433fc0b1d8b035f03185b24b7ca965ab4"/> - <project name="android-device-unagi" path="device/qcom/unagi" remote="b2g" revision="6c014552d1b26bee611d9a9b23bd4cd014e392ee"/> - <project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="0a01247e4b0880f93424b27251cd3a1f6b19dbb2"/> + <!-- Information: android-device-otoro is tagged with B2G_1_0_0_20130125190500 --><project name="android-device-otoro" path="device/qcom/otoro" remote="b2g" revision="7662275433fc0b1d8b035f03185b24b7ca965ab4"/> + <!-- Information: android-device-unagi is tagged with B2G_1_0_0_20130125190500 --><project name="android-device-unagi" path="device/qcom/unagi" remote="b2g" revision="6c014552d1b26bee611d9a9b23bd4cd014e392ee"/> + <!-- Information: codeaurora_kernel_msm is tagged with B2G_1_0_0_20130125190500 --><project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="0a01247e4b0880f93424b27251cd3a1f6b19dbb2"/> <!-- Information: platform/hardware/qcom/camera is tagged with M76XXUSNEKNLYA2040 --><project name="platform/hardware/qcom/camera" path="hardware/qcom/camera" revision="1acf77a75e30f3fc8b1eed2057c97adf1cb1633f"/> - <project name="hardware_qcom_display" path="hardware/qcom/display" remote="b2g" revision="6405d30f2fac7d8a1f2cb17b99fb7dd0a8bcfdac"/> + <!-- Information: hardware_qcom_display is tagged with B2G_1_0_0_20130125190500 --><project name="hardware_qcom_display" path="hardware/qcom/display" remote="b2g" revision="6405d30f2fac7d8a1f2cb17b99fb7dd0a8bcfdac"/> <!-- Information: platform/hardware/qcom/media is tagged with M8960AAAAANLYA100715A --><project name="platform/hardware/qcom/media" path="hardware/qcom/media" revision="552c3ddb7174a01f3508782d40c4d8c845ab441a"/> <!-- Information: platform/hardware/qcom/gps is tagged with M8960AAAAANLYA100705 --><project name="platform/hardware/qcom/gps" path="hardware/qcom/gps" revision="23d5707b320d7fc69f8ba3b7d84d78a1c5681708"/> - <!-- Information: platform/hardware/msm7k is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.00.19.183 --><project name="platform/hardware/msm7k" path="hardware/msm7k" revision="8892d46805c5639b55dd07547745c5180da861e7"/> + <!-- Information: platform/hardware/msm7k is tagged with AU_LINUX_GECKO_ICS_STRAWBERRY.01.00.01.19.008 --><project name="platform/hardware/msm7k" path="hardware/msm7k" revision="8892d46805c5639b55dd07547745c5180da861e7"/> <!-- Information: platform/vendor/qcom-opensource/omx/mm-core is tagged with M8960AAAAANLYA100715A --><project name="platform/vendor/qcom-opensource/omx/mm-core" path="vendor/qcom/opensource/omx/mm-core" revision="ab17ac9a074b4bb69986a8436336bdfbbaf9cd39"/> <!-- Information: platform/hardware/ril is tagged with M76XXUSNEKNLYA1610 --><project name="platform/hardware/ril" path="hardware/ril" remote="caf" revision="fe9a3f63922143b57e79ed570bab2328df8c83a5"/> </manifest> \ No newline at end of file
--- a/browser/base/content/utilityOverlay.js +++ b/browser/base/content/utilityOverlay.js @@ -317,22 +317,23 @@ function openLinkIn(url, where, params) postData: aPostData, inBackground: loadInBackground, allowThirdPartyFixup: aAllowThirdPartyFixup, relatedToCurrent: aRelatedToCurrent, isUTF8: aIsUTF8}); break; } - // If this window is active, focus the target window. Otherwise, focus the - // content but don't raise the window, since the URI we just loaded may have - // resulted in a new frontmost window (e.g. "javascript:window.open('');"). + // If this window is active, or the user created a new tab, focus the target + // window. Otherwise, focus the content but don't raise the window, since the + // URI we just loaded may have resulted in a new frontmost window + // (e.g. "javascript:window.open('');"). var fm = Components.classes["@mozilla.org/focus-manager;1"]. getService(Components.interfaces.nsIFocusManager); - if (window == fm.activeWindow) + if (window == fm.activeWindow || isBlankPageURL(url)) w.focus(); w.gBrowser.selectedBrowser.focus(); if (!loadInBackground && isBlankPageURL(url)) w.focusAndSelectUrlBar(); } // Used as an onclick handler for UI elements with link-like behavior.
--- a/browser/components/nsBrowserContentHandler.js +++ b/browser/components/nsBrowserContentHandler.js @@ -716,18 +716,19 @@ nsBrowserContentHandler.prototype = { }; var gBrowserContentHandler = new nsBrowserContentHandler(); function handURIToExistingBrowser(uri, location, cmdLine) { if (!shouldLoadURI(uri)) return; - // Do not open external links in private windows - var navWin = RecentWindow.getMostRecentBrowserWindow({private: false}); + // Do not open external links in private windows, unless we're in perma-private mode + var allowPrivate = PrivateBrowsingUtils.permanentPrivateBrowsing; + var navWin = RecentWindow.getMostRecentBrowserWindow({private: allowPrivate}); if (!navWin) { // if we couldn't load it in an existing window, open a new one openWindow(null, gBrowserContentHandler.chromeURL, "_blank", "chrome,dialog=no,all" + gBrowserContentHandler.getFeatures(cmdLine), uri.spec); return; }
--- a/browser/components/sessionstore/src/SessionStore.jsm +++ b/browser/components/sessionstore/src/SessionStore.jsm @@ -3656,17 +3656,17 @@ let SessionStoreInternal = { oState.windows.splice(i, 1); if (oState.selectedWindow >= i) { oState.selectedWindow--; } } } // Don't save invalid states. - // Looks we currently have private windows, only. + // Looks like we currently have private windows, only. if (oState.windows.length == 0) { TelemetryStopwatch.cancel("FX_SESSION_RESTORE_COLLECT_DATA_MS"); TelemetryStopwatch.cancel("FX_SESSION_RESTORE_COLLECT_DATA_LONGEST_OP_MS"); return; } for (let i = oState._closedWindows.length - 1; i >= 0; i--) { if (oState._closedWindows[i].isPrivate) {
--- a/browser/devtools/commandline/BuiltinCommands.jsm +++ b/browser/devtools/commandline/BuiltinCommands.jsm @@ -1,19 +1,14 @@ /* 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/. */ const { classes: Cc, interfaces: Ci, utils: Cu } = Components; -const BRAND_SHORT_NAME = Cc["@mozilla.org/intl/stringbundle;1"] - .getService(Ci.nsIStringBundleService) - .createBundle("chrome://branding/locale/brand.properties") - .GetStringFromName("brandShortName"); - this.EXPORTED_SYMBOLS = [ "CmdAddonFlags", "CmdCommands" ]; Cu.import("resource:///modules/devtools/gcli.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/osfile.jsm") XPCOMUtils.defineLazyModuleGetter(this, "gDevTools", @@ -1453,18 +1448,18 @@ XPCOMUtils.defineLazyModuleGetter(this, manual: gcli.lookup('jsbJslintHappyManual') }, { name: 'braceStyle', type: { name: 'selection', data: ['collapse', 'expand', 'end-expand', 'expand-strict'] }, - description: gcli.lookup('jsbBraceStyleDesc'), - manual: gcli.lookup('jsbBraceStyleManual'), + description: gcli.lookup('jsbBraceStyleDesc2'), + manual: gcli.lookup('jsbBraceStyleManual2'), defaultValue: "collapse" }, { name: 'noSpaceBeforeConditional', type: 'boolean', description: gcli.lookup('jsbNoSpaceBeforeConditionalDesc') }, { @@ -1791,46 +1786,45 @@ XPCOMUtils.defineLazyModuleGetter(this, * Disables loading content from cache upon restart. * * Examples : * >> restart * - restarts browser immediately * >> restart --nocache * - restarts immediately and starts Firefox without using cache */ - gcli.addCommand({ name: "restart", - description: gcli.lookupFormat("restartBrowserDesc", [BRAND_SHORT_NAME]), + description: gcli.lookup("restartFirefoxDesc"), params: [ { name: "nocache", type: "boolean", - description: gcli.lookup("restartBrowserNocacheDesc") + description: gcli.lookup("restartFirefoxNocacheDesc") } ], returnType: "string", exec: function Restart(args, context) { let canceled = Cc["@mozilla.org/supports-PRBool;1"] .createInstance(Ci.nsISupportsPRBool); Services.obs.notifyObservers(canceled, "quit-application-requested", "restart"); if (canceled.data) { - return gcli.lookup("restartBrowserRequestCancelled"); + return gcli.lookup("restartFirefoxRequestCancelled"); } // disable loading content from cache. if (args.nocache) { Services.appinfo.invalidateCachesOnRestart(); } // restart Cc['@mozilla.org/toolkit/app-startup;1'] .getService(Ci.nsIAppStartup) .quit(Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart); - return gcli.lookupFormat("restartBrowserRestarting", [BRAND_SHORT_NAME]); + return gcli.lookup("restartFirefoxRestarting"); } }); }(this)); /* CmdScreenshot ----------------------------------------------------------- */ (function(module) { XPCOMUtils.defineLazyModuleGetter(this, "LayoutHelpers", @@ -1863,18 +1857,18 @@ XPCOMUtils.defineLazyModuleGetter(this, name: "clipboard", type: "boolean", description: gcli.lookup("screenshotClipboardDesc"), manual: gcli.lookup("screenshotClipboardManual") }, { name: "chrome", type: "boolean", - description: gcli.lookupFormat("screenshotChromeDesc", [BRAND_SHORT_NAME]), - manual: gcli.lookupFormat("screenshotChromeManual", [BRAND_SHORT_NAME]) + description: gcli.lookup("screenshotChromeDesc"), + manual: gcli.lookup("screenshotChromeManual") }, { name: "delay", type: { name: "number", min: 0 }, defaultValue: 0, description: gcli.lookup("screenshotDelayDesc"), manual: gcli.lookup("screenshotDelayManual") },
--- a/browser/devtools/framework/Target.jsm +++ b/browser/devtools/framework/Target.jsm @@ -212,29 +212,29 @@ TabTarget.prototype = { /** * Listen to the different events. */ _setupListeners: function TabTarget__setupListeners() { this._webProgressListener = new TabWebProgressListener(this); this.tab.linkedBrowser.addProgressListener(this._webProgressListener); this.tab.addEventListener("TabClose", this); this.tab.parentNode.addEventListener("TabSelect", this); - this.tab.ownerDocument.defaultView.addEventListener("close", this); + this.tab.ownerDocument.defaultView.addEventListener("unload", this); this._handleThreadState = this._handleThreadState.bind(this); this.on("thread-resumed", this._handleThreadState); this.on("thread-paused", this._handleThreadState); }, /** * Handle tabs events. */ handleEvent: function (event) { switch (event.type) { case "TabClose": - case "close": + case "unload": this.destroy(); break; case "TabSelect": if (this.tab.selected) { this.emit("visible", event); } else { this.emit("hidden", event); } @@ -261,17 +261,17 @@ TabTarget.prototype = { */ destroy: function() { if (!this._destroyed) { this._destroyed = true; this.tab.linkedBrowser.removeProgressListener(this._webProgressListener) this._webProgressListener.target = null; this._webProgressListener = null; - this.tab.ownerDocument.defaultView.removeEventListener("close", this); + this.tab.ownerDocument.defaultView.removeEventListener("unload", this); this.tab.removeEventListener("TabClose", this); this.tab.parentNode.removeEventListener("TabSelect", this); this.off("thread-resumed", this._handleThreadState); this.off("thread-paused", this._handleThreadState); this.emit("close"); targets.delete(this._tab); this._tab = null;
--- a/browser/devtools/framework/ToolDefinitions.jsm +++ b/browser/devtools/framework/ToolDefinitions.jsm @@ -80,17 +80,17 @@ let webConsoleDefinition = { } }; let debuggerDefinition = { id: "jsdebugger", key: l10n("open.commandkey", debuggerStrings), accesskey: l10n("debuggerMenu.accesskey", debuggerStrings), modifiers: osString == "Darwin" ? "accel,alt" : "accel,shift", - ordinal: 1, + ordinal: 2, killswitch: "devtools.debugger.enabled", icon: "chrome://browser/skin/devtools/tool-debugger.png", url: "chrome://browser/content/debugger.xul", label: l10n("ToolboxDebugger.label", debuggerStrings), tooltip: l10n("ToolboxDebugger.tooltip", debuggerStrings), isTargetSupported: function(target) { return true; @@ -101,17 +101,17 @@ let debuggerDefinition = { return panel.open(); } }; let inspectorDefinition = { id: "inspector", accesskey: l10n("inspector.accesskey", inspectorStrings), key: l10n("inspector.commandkey", inspectorStrings), - ordinal: 2, + ordinal: 1, modifiers: osString == "Darwin" ? "accel,alt" : "accel,shift", icon: "chrome://browser/skin/devtools/tool-inspector.png", url: "chrome://browser/content/devtools/inspector/inspector.xul", label: l10n("inspector.label", inspectorStrings), tooltip: l10n("inspector.tooltip", inspectorStrings), isTargetSupported: function(target) { return !target.isRemote;
--- a/browser/devtools/framework/Toolbox.jsm +++ b/browser/devtools/framework/Toolbox.jsm @@ -14,21 +14,25 @@ Cu.import("resource:///modules/devtools/ XPCOMUtils.defineLazyModuleGetter(this, "Hosts", "resource:///modules/devtools/ToolboxHosts.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "CommandUtils", "resource:///modules/devtools/DeveloperToolbar.jsm"); XPCOMUtils.defineLazyGetter(this, "toolboxStrings", function() { let bundle = Services.strings.createBundle("chrome://browser/locale/devtools/toolbox.properties"); - let l10n = function(name) { + let l10n = function(aName, ...aArgs) { try { - return bundle.GetStringFromName(name); + if (aArgs.length == 0) { + return bundle.GetStringFromName(aName); + } else { + return bundle.formatStringFromName(aName, aArgs, aArgs.length); + } } catch (ex) { - Services.console.logStringMessage("Error reading '" + name + "'"); + Services.console.logStringMessage("Error reading '" + aName + "'"); } }; return l10n; }); XPCOMUtils.defineLazyGetter(this, "Requisition", function() { Cu.import("resource://gre/modules/devtools/Require.jsm"); Cu.import("resource:///modules/devtools/gcli.jsm"); @@ -135,16 +139,21 @@ this.Toolbox = function Toolbox(target, selectedTool = "webconsole"; } this._defaultToolId = selectedTool; this._host = this._createHost(hostType); EventEmitter.decorate(this); + this._refreshHostTitle = this._refreshHostTitle.bind(this); + this._target.on("navigate", this._refreshHostTitle); + this.on("host-changed", this._refreshHostTitle); + this.on("select", this._refreshHostTitle); + gDevTools.on("tool-registered", this._toolRegistered); gDevTools.on("tool-unregistered", this._toolUnregistered); } /** * The toolbox can be 'hosted' either embedded in a browser window * or in a separate window. */ @@ -504,16 +513,34 @@ Toolbox.prototype = { /** * Raise the toolbox host. */ raise: function TBOX_raise() { this._host.raise(); }, /** + * Refresh the host's title. + */ + _refreshHostTitle: function TBOX_refreshHostTitle() { + let toolName; + let toolId = this.currentToolId; + if (toolId) { + let toolDef = gDevTools.getToolDefinitionMap().get(toolId); + toolName = toolDef.label; + } else { + // no tool is selected + toolName = toolboxStrings("toolbox.defaultTitle"); + } + let title = toolboxStrings("toolbox.titleTemplate", + toolName, this.target.url); + this._host.setTitle(title); + }, + + /** * Create a host object based on the given host type. * * Warning: some hosts require that the toolbox target provides a reference to * the attached tab. Not all Targets have a tab property - make sure you correctly * mix and match hosts and targets. * * @param {string} hostType * The host type of the new host object @@ -643,16 +670,25 @@ Toolbox.prototype = { * Remove all UI elements, detach from target and clear up */ destroy: function TBOX_destroy() { // If several things call destroy then we give them all the same // destruction promise so we're sure to destroy only once if (this._destroyer) { return this._destroyer; } + // Assign the "_destroyer" property before calling the other + // destroyer methods to guarantee that the Toolbox's destroy + // method is only executed once. + let deferred = Promise.defer(); + this._destroyer = deferred.promise; + + this._target.off("navigate", this._refreshHostTitle); + this.off("select", this._refreshHostTitle); + this.off("host-changed", this._refreshHostTitle); let outstanding = []; // Remote targets need to be notified that the toolbox is being torn down. if (this._target && this._target.isRemote) { outstanding.push(this._target.destroy()); } this._target = null; @@ -661,20 +697,16 @@ Toolbox.prototype = { outstanding.push(panel.destroy()); } outstanding.push(this._host.destroy()); gDevTools.off("tool-registered", this._toolRegistered); gDevTools.off("tool-unregistered", this._toolUnregistered); - this._destroyer = Promise.all(outstanding); - this._destroyer.then(function() { + Promise.all(outstanding).then(function() { this.emit("destroyed"); + deferred.resolve(); }.bind(this)); - return this._destroyer.then(function() { - // Ensure that the promise resolves to nothing, rather than an array of - // several nothings, which is what we get from Promise.all - return undefined; - }); + return this._destroyer; } };
--- a/browser/devtools/framework/ToolboxHosts.jsm +++ b/browser/devtools/framework/ToolboxHosts.jsm @@ -81,16 +81,23 @@ BottomHost.prototype = { /** * Raise the host. */ raise: function BH_raise() { focusTab(this.hostTab); }, /** + * Set the toolbox title. + */ + setTitle: function BH_setTitle(title) { + // Nothing to do for this host type. + }, + + /** * Destroy the bottom dock. */ destroy: function BH_destroy() { if (!this._destroyed) { this._destroyed = true; Services.prefs.setIntPref(this.heightPref, this.frame.height); this._nbox.removeChild(this._splitter); @@ -154,16 +161,23 @@ SidebarHost.prototype = { /** * Raise the host. */ raise: function SH_raise() { focusTab(this.hostTab); }, /** + * Set the toolbox title. + */ + setTitle: function SH_setTitle(title) { + // Nothing to do for this host type. + }, + + /** * Destroy the sidebar. */ destroy: function SH_destroy() { if (!this._destroyed) { this._destroyed = true; Services.prefs.setIntPref(this.widthPref, this.frame.width); this._sidebar.removeChild(this._splitter); @@ -231,16 +245,23 @@ WindowHost.prototype = { /** * Raise the host. */ raise: function RH_raise() { this._window.focus(); }, /** + * Set the toolbox title. + */ + setTitle: function WH_setTitle(title) { + this._window.document.title = title; + }, + + /** * Destroy the window. */ destroy: function WH_destroy() { if (!this._destroyed) { this._destroyed = true; this._window.removeEventListener("unload", this._boundUnload); this._window.close();
--- a/browser/devtools/framework/test/Makefile.in +++ b/browser/devtools/framework/test/Makefile.in @@ -17,11 +17,12 @@ MOCHITEST_BROWSER_FILES = \ browser_toolbox_dynamic_registration.js \ browser_toolbox_hosts.js \ browser_toolbox_ready.js \ browser_toolbox_select_event.js \ browser_target_events.js \ browser_toolbox_tool_ready.js \ browser_toolbox_sidebar.js \ browser_toolbox_window_shortcuts.js \ + browser_toolbox_window_title_changes.js \ $(NULL) include $(topsrcdir)/config/rules.mk
new file mode 100644 --- /dev/null +++ b/browser/devtools/framework/test/browser_toolbox_window_title_changes.js @@ -0,0 +1,83 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +let temp = {}; +Cu.import("resource:///modules/devtools/Toolbox.jsm", temp); +let Toolbox = temp.Toolbox; +temp = {}; +Cu.import("resource:///modules/devtools/Target.jsm", temp); +let TargetFactory = temp.TargetFactory; +temp = {}; +Cu.import("resource:///modules/devtools/gDevTools.jsm", temp); +let gDevTools = temp.gDevTools; +temp = {}; +Cu.import("resource://gre/modules/Services.jsm", temp); +let Services = temp.Services; +temp = null; + +function test() { + waitForExplicitFinish(); + + const URL_1 = "data:text/plain;charset=UTF-8,abcde"; + const URL_2 = "data:text/plain;charset=UTF-8,12345"; + + const TOOL_ID_1 = "webconsole"; + const TOOL_ID_2 = "jsdebugger"; + + const LABEL_1 = "Web Console"; + const LABEL_2 = "Debugger"; + + let toolbox; + + addTab(URL_1, function () { + let target = TargetFactory.forTab(gBrowser.selectedTab); + gDevTools.showToolbox(target, null, Toolbox.HostType.BOTTOM) + .then(function (aToolbox) { toolbox = aToolbox; }) + .then(function () toolbox.selectTool(TOOL_ID_1)) + + // undock toolbox and check title + .then(function () toolbox.switchHost(Toolbox.HostType.WINDOW)) + .then(checkTitle.bind(null, LABEL_1, URL_1, "toolbox undocked")) + + // switch to different tool and check title + .then(function () toolbox.selectTool(TOOL_ID_2)) + .then(checkTitle.bind(null, LABEL_2, URL_1, "tool changed")) + + // navigate to different url and check title + .then(function () { + let deferred = Promise.defer(); + target.once("navigate", function () deferred.resolve()); + gBrowser.loadURI(URL_2); + return deferred.promise; + }) + .then(checkTitle.bind(null, LABEL_2, URL_2, "url changed")) + + // destroy toolbox, create new one hosted in a window (with a + // different tool id), and check title + .then(function () toolbox.destroy()) + .then(function () gDevTools.showToolbox(target, null, + Toolbox.HostType.WINDOW)) + .then(function (aToolbox) { toolbox = aToolbox; }) + .then(function () toolbox.selectTool(TOOL_ID_1)) + .then(checkTitle.bind(null, LABEL_1, URL_2, + "toolbox destroyed and recreated")) + + // clean up + .then(function () toolbox.destroy()) + .then(function () { + toolbox = null; + gBrowser.removeCurrentTab(); + Services.prefs.clearUserPref("devtools.toolbox.host"); + Services.prefs.clearUserPref("devtools.toolbox.selectedTool"); + Services.prefs.clearUserPref("devtools.toolbox.sideEnabled"); + finish(); + }); + }); +} + +function checkTitle(toolLabel, url, context) { + let win = Services.wm.getMostRecentWindow("devtools:toolbox"); + let definitions = gDevTools.getToolDefinitionMap(); + let expectedTitle = toolLabel + " - " + url; + is(win.document.title, expectedTitle, context); +}
--- a/browser/devtools/framework/toolbox-window.xul +++ b/browser/devtools/framework/toolbox-window.xul @@ -6,17 +6,16 @@ <!ENTITY % toolboxDTD SYSTEM "chrome://browser/locale/devtools/toolbox.dtd" > %toolboxDTD; ]> <?xml-stylesheet href="chrome://browser/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" id="devtools-toolbox-window" - title="&window.title;" macanimationtype="document" fullscreenbutton="true" windowtype="devtools:toolbox" width="900" height="320" persist="screenX screenY width height sizemode"> <commandset id="toolbox-commandset"> <command id="toolbox-cmd-close" oncommand="window.close();"/>
--- a/browser/devtools/inspector/test/Makefile.in +++ b/browser/devtools/inspector/test/Makefile.in @@ -23,17 +23,17 @@ include $(topsrcdir)/config/rules.mk browser_inspector_invalidate.js \ browser_inspector_menu.js \ browser_inspector_pseudoClass_menu.js \ browser_inspector_destroyselection.html \ browser_inspector_destroyselection.js \ browser_inspector_bug_699308_iframe_navigation.js \ browser_inspector_bug_672902_keyboard_shortcuts.js \ browser_inspector_bug_566084_location_changed.js \ - $(filter disabled-temporarily--bug-816990, browser_inspector_sidebarstate.js) \ + browser_inspector_sidebarstate.js \ browser_inspector_pseudoclass_lock.js \ browser_inspector_cmd_inspect.js \ browser_inspector_cmd_inspect.html \ browser_inspector_highlighter_autohide.js \ browser_inspector_changes.js \ browser_inspector_bug_674871.js \ browser_inspector_bug_817558_delete_node.js \ browser_inspector_bug_650804_search.js \
--- a/browser/devtools/markupview/MarkupView.jsm +++ b/browser/devtools/markupview/MarkupView.jsm @@ -1078,17 +1078,17 @@ ElementEditor.prototype = { if (!attr.inplaceEditor) { attr.style.removeProperty("display"); } } }, _createAttribute: function EE_createAttribute(aAttr, aBefore) { - if (aAttr.name in this.attrs) { + if (this.attrs.indexOf(aAttr.name) !== -1) { var attr = this.attrs[aAttr.name]; var name = attr.querySelector(".attrname"); var val = attr.querySelector(".attrvalue"); } else { // Create the template editor, which will save some variables here. let data = { attrName: aAttr.name, };
--- a/browser/devtools/profiler/test/head.js +++ b/browser/devtools/profiler/test/head.js @@ -49,20 +49,18 @@ function loadTab(url, callback) { function openProfiler(tab, callback) { let target = TargetFactory.forTab(tab); gDevTools.showToolbox(target, "jsprofiler").then(callback); } function closeProfiler(tab, callback) { let target = TargetFactory.forTab(tab); - let panel = gDevTools.getToolbox(target).getPanel("jsprofiler"); - panel.once("destroyed", callback); - - gDevTools.closeToolbox(target); + let toolbox = gDevTools.getToolbox(target); + toolbox.destroy().then(callback); } function setUp(url, callback=function(){}) { Services.prefs.setBoolPref(PROFILER_ENABLED, true); loadTab(url, function onTabLoad(tab, browser) { openProfiler(tab, function onProfilerOpen() { let target = TargetFactory.forTab(tab);
--- a/browser/devtools/responsivedesign/CmdResize.jsm +++ b/browser/devtools/responsivedesign/CmdResize.jsm @@ -1,50 +1,45 @@ /* 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/. */ const { classes: Cc, interfaces: Ci, utils: Cu } = Components; -const BRAND_SHORT_NAME = Cc["@mozilla.org/intl/stringbundle;1"]. - getService(Ci.nsIStringBundleService). - createBundle("chrome://branding/locale/brand.properties"). - GetStringFromName("brandShortName"); - this.EXPORTED_SYMBOLS = [ ]; Cu.import("resource:///modules/devtools/gcli.jsm"); /* Responsive Mode commands */ gcli.addCommand({ name: 'resize', description: gcli.lookup('resizeModeDesc') }); gcli.addCommand({ name: 'resize on', description: gcli.lookup('resizeModeOnDesc'), - manual: gcli.lookupFormat('resizeModeManual', [BRAND_SHORT_NAME]), + manual: gcli.lookup('resizeModeManual'), exec: gcli_cmd_resize }); gcli.addCommand({ name: 'resize off', description: gcli.lookup('resizeModeOffDesc'), - manual: gcli.lookupFormat('resizeModeManual', [BRAND_SHORT_NAME]), + manual: gcli.lookup('resizeModeManual'), exec: gcli_cmd_resize }); gcli.addCommand({ name: 'resize toggle', buttonId: "command-button-responsive", buttonClass: "command-button", tooltipText: gcli.lookup("resizeModeToggleTooltip"), description: gcli.lookup('resizeModeToggleDesc'), - manual: gcli.lookupFormat('resizeModeManual', [BRAND_SHORT_NAME]), + manual: gcli.lookup('resizeModeManual'), state: { isChecked: function(aTarget) { let browserWindow = aTarget.tab.ownerDocument.defaultView; let mgr = browserWindow.ResponsiveUI.ResponsiveUIManager; return mgr.isActiveForTab(aTarget.tab); }, onChange: function(aTarget, aChangeHandler) { let browserWindow = aTarget.tab.ownerDocument.defaultView;
--- a/browser/devtools/scratchpad/scratchpad.js +++ b/browser/devtools/scratchpad/scratchpad.js @@ -23,16 +23,17 @@ Cu.import("resource://gre/modules/Servic Cu.import("resource://gre/modules/NetUtil.jsm"); Cu.import("resource:///modules/PropertyPanel.jsm"); Cu.import("resource:///modules/source-editor.jsm"); Cu.import("resource:///modules/devtools/LayoutHelpers.jsm"); Cu.import("resource:///modules/devtools/scratchpad-manager.jsm"); Cu.import("resource://gre/modules/jsdebugger.jsm"); Cu.import("resource:///modules/devtools/gDevTools.jsm"); Cu.import("resource:///modules/devtools/Target.jsm"); +Cu.import("resource://gre/modules/osfile.jsm") const SCRATCHPAD_CONTEXT_CONTENT = 1; const SCRATCHPAD_CONTEXT_BROWSER = 2; const SCRATCHPAD_L10N = "chrome://browser/locale/devtools/scratchpad.properties"; const DEVTOOLS_CHROME_ENABLED = "devtools.chrome.enabled"; const PREF_RECENT_FILES_MAX = "devtools.scratchpad.recentFilesMax"; const BUTTON_POSITION_SAVE = 0; const BUTTON_POSITION_CANCEL = 1; @@ -637,36 +638,32 @@ var Scratchpad = { aCallback) { if (!aNoConfirmation && aFile.exists() && !window.confirm(this.strings. GetStringFromName("export.fileOverwriteConfirmation"))) { return; } - let fs = Cc["@mozilla.org/network/file-output-stream;1"]. - createInstance(Ci.nsIFileOutputStream); - let modeFlags = 0x02 | 0x08 | 0x20; - fs.init(aFile, modeFlags, 420 /* 0644 */, fs.DEFER_OPEN); - - let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]. - createInstance(Ci.nsIScriptableUnicodeConverter); - converter.charset = "UTF-8"; - let input = converter.convertToInputStream(this.getText()); + let encoder = new TextEncoder(); + let buffer = encoder.encode(this.getText()); + let promise = OS.File.writeAtomic(aFile.path, buffer,{tmpPath: aFile.path + ".tmp"}); + promise.then(function success(value) { + if (aCallback) { + aCallback.call(this, Components.results.NS_OK); + } + }.bind(this), function failure(reason) { + if (!aSilentError) { + window.alert(this.strings.GetStringFromName("saveFile.failed")); + } + if (aCallback) { + aCallback.call(this, Components.results.NS_ERROR_UNEXPECTED); + } + }.bind(this)); - let self = this; - NetUtil.asyncCopy(input, fs, function(aStatus) { - if (!aSilentError && !Components.isSuccessCode(aStatus)) { - window.alert(self.strings.GetStringFromName("saveFile.failed")); - } - - if (aCallback) { - aCallback.call(self, aStatus); - } - }); }, /** * Read the content of a file and put it into the textbox. * * @param nsILocalFile aFile * The file you want to save the textbox content into. * @param boolean aSilentError
--- a/browser/devtools/scratchpad/test/Makefile.in +++ b/browser/devtools/scratchpad/test/Makefile.in @@ -20,23 +20,25 @@ MOCHITEST_BROWSER_FILES = \ browser_scratchpad_ui.js \ browser_scratchpad_bug_646070_chrome_context_pref.js \ browser_scratchpad_bug_660560_tab.js \ browser_scratchpad_open.js \ browser_scratchpad_restore.js \ browser_scratchpad_bug_679467_falsy.js \ browser_scratchpad_bug_699130_edit_ui_updates.js \ browser_scratchpad_bug_669612_unsaved.js \ - browser_scratchpad_bug_653427_confirm_close.js \ browser_scratchpad_bug684546_reset_undo.js \ browser_scratchpad_bug690552_display_outputs_errors.js \ browser_scratchpad_bug650345_find_ui.js \ browser_scratchpad_bug714942_goto_line_ui.js \ browser_scratchpad_bug_650760_help_key.js \ browser_scratchpad_bug_651942_recent_files.js \ browser_scratchpad_bug756681_display_non_error_exceptions.js \ browser_scratchpad_bug_751744_revert_to_saved.js \ browser_scratchpad_bug740948_reload_and_run.js \ browser_scratchpad_bug_661762_wrong_window_focus.js \ browser_scratchpad_bug_644413_modeline.js \ head.js \ +# Disable test due to bug 807234 becoming basically permanent +# browser_scratchpad_bug_653427_confirm_close.js \ + include $(topsrcdir)/config/rules.mk
--- a/browser/devtools/styleinspector/CssRuleView.jsm +++ b/browser/devtools/styleinspector/CssRuleView.jsm @@ -1867,16 +1867,19 @@ TextPropertyEditor.prototype = { */ _onValueDone: function PropertyEditor_onValueDone(aValue, aCommit) { if (aCommit) { let val = this._parseValue(aValue); this.prop.setValue(val.value, val.priority); this.committed.value = this.prop.value; this.committed.priority = this.prop.priority; + if (this.prop.overridden) { + this.element.classList.add("ruleview-overridden"); + } } else { this.prop.setValue(this.committed.value, this.committed.priority); } }, /** * Validate this property. *
--- a/browser/devtools/webconsole/HUDService.jsm +++ b/browser/devtools/webconsole/HUDService.jsm @@ -155,41 +155,32 @@ HUD_SERVICE.prototype = function WebConsole(aTarget, aIframe) { this.iframe = aIframe; this.iframe.className = "web-console-frame"; this.chromeDocument = this.iframe.ownerDocument; this.chromeWindow = this.chromeDocument.defaultView; this.hudId = "hud_" + Date.now(); this.target = aTarget; + + this.browserWindow = this.chromeWindow.top; + let element = this.browserWindow.document.documentElement; + if (element.getAttribute("windowtype") != "navigator:browser") { + this.browserWindow = HUDService.currentContext(); + } } WebConsole.prototype = { chromeWindow: null, chromeDocument: null, hudId: null, target: null, iframe: null, _destroyer: null, - _browserWindow: null, - - get browserWindow() - { - if (!this._browserWindow) { - let window = this.chromeWindow.top; - let element = window.document.documentElement; - if (element.getAttribute("windowtype") != "navigator:browser") { - window = HUDService.currentContext(); - } - this._browserWindow = window; - } - return this._browserWindow; - }, - /** * Getter for HUDService.lastFinishedRequestCallback. * * @see HUDService.lastFinishedRequestCallback * @type function */ get lastFinishedRequestCallback() HUDService.lastFinishedRequestCallback,
--- a/browser/devtools/webconsole/test/Makefile.in +++ b/browser/devtools/webconsole/test/Makefile.in @@ -119,16 +119,22 @@ MOCHITEST_BROWSER_FILES = \ $(NULL) ifeq ($(OS_ARCH), Darwin) MOCHITEST_BROWSER_FILES += \ browser_webconsole_bug_804845_ctrl_key_nav.js \ $(NULL) endif +ifeq ($(OS_ARCH),WINNT) +MOCHITEST_BROWSER_FILES += \ + browser_webconsole_bug_623749_ctrl_a_select_all_winnt.js \ + $(NULL) +endif + MOCHITEST_BROWSER_FILES += \ test-console.html \ test-network.html \ test-network-request.html \ test-mutation.html \ testscript.js \ test-filter.html \ test-observe-http-ajax.html \
new file mode 100644 --- /dev/null +++ b/browser/devtools/webconsole/test/browser_webconsole_bug_623749_ctrl_a_select_all_winnt.js @@ -0,0 +1,32 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +// Test for https://bugzilla.mozilla.org/show_bug.cgi?id=623749 +// Map Control + A to Select All, In the web console input, on Windows + +function test() { + addTab("data:text/html;charset=utf-8,Test console for bug 623749"); + browser.addEventListener("load", function onLoad() { + browser.removeEventListener("load", onLoad, true); + openConsole(null, runTest); + }, true); +} + +function runTest(HUD) { + let jsterm = HUD.jsterm; + jsterm.setInputValue("Ignore These Four Words"); + let inputNode = jsterm.inputNode; + + // Test select all with Control + A. + EventUtils.synthesizeKey("a", { ctrlKey: true }); + let inputLength = inputNode.selectionEnd - inputNode.selectionStart; + is(inputLength, inputNode.value.length, "Select all of input"); + + // Test do nothing on Control + E. + jsterm.setInputValue("Ignore These Four Words"); + inputNode.selectionStart = 0; + EventUtils.synthesizeKey("e", { ctrlKey: true }); + is(inputNode.selectionStart, 0, "Control + E does not move to end of input"); + + executeSoon(finishTest); +}
--- a/browser/devtools/webconsole/webconsole.js +++ b/browser/devtools/webconsole/webconsole.js @@ -3110,16 +3110,20 @@ JSTerm.prototype = { keyPress: function JSTF_keyPress(aEvent) { if (aEvent.ctrlKey) { let inputNode = this.inputNode; let closePopup = false; switch (aEvent.charCode) { case 97: // control-a + if (Services.appinfo.OS == "WINNT") { + closePopup = true; + break; + } let lineBeginPos = 0; if (this.hasMultilineInput()) { // find index of closest newline <= to cursor for (let i = inputNode.selectionStart-1; i >= 0; i--) { if (inputNode.value.charAt(i) == "\r" || inputNode.value.charAt(i) == "\n") { lineBeginPos = i+1; break; @@ -3127,16 +3131,19 @@ JSTerm.prototype = { } } inputNode.setSelectionRange(lineBeginPos, lineBeginPos); aEvent.preventDefault(); closePopup = true; break; case 101: // control-e + if (Services.appinfo.OS == "WINNT") { + break; + } let lineEndPos = inputNode.value.length; if (this.hasMultilineInput()) { // find index of closest newline >= cursor for (let i = inputNode.selectionEnd; i<lineEndPos; i++) { if (inputNode.value.charAt(i) == "\r" || inputNode.value.charAt(i) == "\n") { lineEndPos = i; break;
--- a/browser/locales/en-US/chrome/browser/devtools/gcli.properties +++ b/browser/locales/en-US/chrome/browser/devtools/gcli.properties @@ -332,17 +332,17 @@ introDesc=Show the opening message # LOCALIZATION NOTE (introManual): A fuller description of the 'intro' # command. Displayed when the user asks for help on what it does. introManual=Redisplay the message that is shown to new users until they click the 'Got it!' button # LOCALIZATION NOTE (introTextOpening): The 'intro text' opens when the user # first opens the developer toolbar to explain the command line, and is shown # each time it is opened until the user clicks the 'Got it!' button. This # string is the opening paragraph of the intro text. -introTextOpening=This command line is designed for developers. It focuses on speed of input over JavaScript syntax and a rich display over monospace output. +introTextOpening=The Firefox command line is designed for developers. It focuses on speed of input over JavaScript syntax and a rich display over monospace output. # LOCALIZATION NOTE (introTextCommands): For information about the 'intro # text' see introTextOpening. The second paragraph is in 2 sections, the first # section points the user to the 'help' command. introTextCommands=For a list of commands type # LOCALIZATION NOTE (introTextKeys): For information about the 'intro text' # see introTextOpening. The second section in the second paragraph points the
--- a/browser/locales/en-US/chrome/browser/devtools/gclicommands.properties +++ b/browser/locales/en-US/chrome/browser/devtools/gclicommands.properties @@ -68,24 +68,22 @@ screenshotClipboardDesc=Copy screenshot # LOCALIZATION NOTE (screenshotClipboardManual) A fuller description of the # 'clipboard' parameter to the 'screenshot' command, displayed when the user # asks for help on what it does. screenshotClipboardManual=True if you want to copy the screenshot instead of saving it to a file. # LOCALIZATION NOTE (screenshotChromeDesc) A very short string to describe # the 'chrome' parameter to the 'screenshot' command, which is displayed in # a dialog when the user is using this command. -# The argument (%1$S) is the browser name. -screenshotChromeDesc=Capture %1$S chrome window? (true/false) +screenshotChromeDesc=Capture Firefox chrome window? (true/false) # LOCALIZATION NOTE (screenshotChromeManual) A fuller description of the # 'chrome' parameter to the 'screenshot' command, displayed when the user # asks for help on what it does. -# The argument (%1$S) is the browser name. -screenshotChromeManual=True if you want to take the screenshot of the %1$S window rather than the web page's content window. +screenshotChromeManual=True if you want to take the screenshot of the Firefox window rather than the web page's content window. # LOCALIZATION NOTE (screenshotGroupOptions) A label for the optional options of # the screenshot command. screenshotGroupOptions=Options # LOCALIZATION NOTE (screenshotDelayDesc) A very short string to describe # the 'delay' parameter to the 'screenshot' command, which is displayed in # a dialog when the user is using this command. @@ -128,35 +126,33 @@ screenshotSavedToFile=Saved to # LOCALIZATION NOTE (screenshotErrorCopying) Text displayed to user upon # encountering error while copying the screenshot to clipboard. screenshotErrorCopying=Error occurred while copying to clipboard. # LOCALIZATION NOTE (screenshotCopied) Text displayed to user when the # screenshot is successfully copied to the clipboard. screenshotCopied=Copied to clipboard. -# LOCALIZATION NOTE (restartBrowserDesc) A very short description of the +# LOCALIZATION NOTE (restartFirefoxDesc) A very short description of the # 'restart' command. This string is designed to be shown in a menu alongside the # command name, which is why it should be as short as possible. -# The argument (%1$S) is the browser name. -restartBrowserDesc=Restart %1$S +restartFirefoxDesc=Restart Firefox -# LOCALIZATION NOTE (restartBrowserNocacheDesc) A very short string to +# LOCALIZATION NOTE (restartFirefoxNocacheDesc) A very short string to # describe the 'nocache' parameter to the 'restart' command, which is # displayed in a dialog when the user is using this command. -restartBrowserNocacheDesc=Disables loading content from cache upon restart +restartFirefoxNocacheDesc=Disables loading content from cache upon restart -# LOCALIZATION NOTE (restartBrowserRequestCancelled) A string displayed to the +# LOCALIZATION NOTE (restartFirefoxRequestCancelled) A string displayed to the # user when a scheduled restart has been aborted by the user. -restartBrowserRequestCancelled=Restart request cancelled by user. +restartFirefoxRequestCancelled=Restart request cancelled by user. -# LOCALIZATION NOTE (restartBrowserRestarting) A string displayed to the +# LOCALIZATION NOTE (restartFirefoxRestarting) A string displayed to the # user when a restart has been initiated without a delay. -# The argument (%1$S) is the browser name. -restartBrowserRestarting=Restarting %1$S… +restartFirefoxRestarting=Restarting Firefox… # LOCALIZATION NOTE (inspectDesc) A very short description of the 'inspect' # command. See inspectManual for a fuller description of what it does. This # string is designed to be shown in a menu alongside the command name, which # is why it should be as short as possible. inspectDesc=Inspect a node # LOCALIZATION NOTE (inspectManual) A fuller description of the 'inspect' @@ -503,18 +499,17 @@ resizeModeToDesc=Alter page size # LOCALIZATION NOTE (resizeModeDesc) A very short string to describe the # 'resize' command. This string is designed to be shown in a menu # alongside the command name, which is why it should be as short as possible. resizeModeDesc=Control Responsive Design Mode # LOCALIZATION NOTE (resizeModeManual) A fuller description of the 'resize' # command, displayed when the user asks for help on what it does. -# The argument (%1$S) is the browser name. -resizeModeManual=Responsive websites respond to their environment, so they look good on a mobile display, a cinema display and everything in-between. Responsive Design Mode allows you to easily test a variety of page sizes in %1$S without needing to resize your whole browser. +resizeModeManual=Responsive websites respond to their environment, so they look good on a mobile display, a cinema display and everything in-between. Responsive Design Mode allows you to easily test a variety of page sizes in Firefox without needing to resize your whole browser. # LOCALIZATION NOTE (cmdDesc) A very short description of the 'cmd' # command. This string is designed to be shown in a menu alongside the command # name, which is why it should be as short as possible. cmdDesc=Manipulate the commands # LOCALIZATION NOTE (cmdRefreshDesc) A very short description of the 'cmd refresh' # command. This string is designed to be shown in a menu alongside the command @@ -865,26 +860,26 @@ jsbPreserveMaxNewlinesManual=The maximum # possible. jsbJslintHappyDesc=Enforce jslint-stricter mode? # LOCALIZATION NOTE (jsbJslintHappyManual) A fuller description of the # 'jsb <jslintHappy>' parameter, displayed when the user asks for help # on what it does. jsbJslintHappyManual=When set to true, jslint-stricter mode is enforced -# LOCALIZATION NOTE (jsbBraceStyleDesc) A very short description of the +# LOCALIZATION NOTE (jsbBraceStyleDesc2) A very short description of the # 'jsb <braceStyle>' parameter. This string is designed to be shown # in a menu alongside the command name, which is why it should be as short as # possible. -jsbBraceStyleDesc=Collapse, expand, end-expand, expand-strict +jsbBraceStyleDesc2=Select the coding style of braces -# LOCALIZATION NOTE (jsbBraceStyleManual) A fuller description of the +# LOCALIZATION NOTE (jsbBraceStyleManual2) A fuller description of the # 'jsb <braceStyle>' parameter, displayed when the user asks for help # on what it does. -jsbBraceStyleManual=The coding style of braces. Either collapse, expand, end-expand or expand-strict +jsbBraceStyleManual2=Select the coding style of braces: collapse - put braces on the same line as control statements; expand - put braces on own line (Allman / ANSI style); end-expand - put end braces on own line; expand-strict - put braces on own line even if it will break your code. # LOCALIZATION NOTE (jsbNoSpaceBeforeConditionalDesc) A very short description # of the 'jsb <noSpaceBeforeConditional>' parameter. This string is designed to # be shown in a menu alongside the command name, which is why it should be as # short as possible. jsbNoSpaceBeforeConditionalDesc=No space before conditional statements # LOCALIZATION NOTE (jsbUnescapeStringsDesc) A very short description of the
--- a/browser/locales/en-US/chrome/browser/devtools/toolbox.dtd +++ b/browser/locales/en-US/chrome/browser/devtools/toolbox.dtd @@ -1,9 +1,7 @@ <!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> -<!ENTITY window.title "Developer Tools"> - <!ENTITY closeCmd.key "W"> -<!ENTITY toolboxCloseButton.tooltip "Close Developer Tools"> \ No newline at end of file +<!ENTITY toolboxCloseButton.tooltip "Close Developer Tools">
--- a/browser/locales/en-US/chrome/browser/devtools/toolbox.properties +++ b/browser/locales/en-US/chrome/browser/devtools/toolbox.properties @@ -15,8 +15,18 @@ toolboxToggleButton.errors=#1 error;#1 e toolboxToggleButton.warnings=#1 warning;#1 warnings # LOCALIZATION NOTE (toolboxToggleButton.tooltip): This string is shown # as tooltip in the developer toolbar to open/close the developer tools. # It's using toolboxToggleButton.errors as first and # toolboxToggleButton.warnings as second argument to show the number of errors # and warnings. toolboxToggleButton.tooltip=%1$S, %2$S\nClick to toggle the developer tools. + +# LOCALIZATION NOTE (toolbox.titleTemplate): This is the template +# used to format the title of the toolbox. +# The name of the selected tool: %1$S. +# The url of the page being tooled: %2$S. +toolbox.titleTemplate=%1$S - %2$S + +# LOCALIZATION NOTE (toolbox.defaultTitle): This is used as the tool +# name when no tool is selected. +toolbox.defaultTitle=Developer Tools
--- a/browser/metro/base/content/bindings/flyoutpanel.xml +++ b/browser/metro/base/content/bindings/flyoutpanel.xml @@ -43,29 +43,46 @@ <property name="isVisible" readonly="true"> <getter> <![CDATA[ return this.hasAttribute("visible"); ]]> </getter> </property> + <method name="_onAfterSlideOut"> + <body> + <![CDATA[ + this.removeAttribute("visible"); + this.removeEventListener("transitionend", this._onAfterSlideOut); + DialogUI.popPopup(this); + ]]> + </body> + </method> + <method name="hide"> <body> <![CDATA[ - this.removeAttribute("visible"); - DialogUI.popPopup(this); + if (!this.isVisible) + return; + + this.addEventListener("transitionend", this._onAfterSlideOut); + this.classList.remove("flyoutpanel-slide-in"); ]]> </body> </method> <method name="show"> <body> <![CDATA[ + if (this.isVisible) + return; + this.setAttribute("visible", "true"); + this.classList.add("flyoutpanel-slide-in"); DialogUI.pushPopup(this, this); ]]> </body> </method> <method name="handleEvent"> <parameter name="aEvent"/> <body>
--- a/browser/metro/base/content/browser.xul +++ b/browser/metro/base/content/browser.xul @@ -414,61 +414,68 @@ </hbox> </vbox> <richlistbox id="console-box" class="panel-list console-box" flex="1" onkeypress="ConsolePanelView.onConsoleBoxKeyPress(event)" oncontextmenu="ConsolePanelView.onContextMenu(event);"/> </vbox> </deck> </vbox> - <flyoutpanel id="about-flyoutpanel" headertext="&aboutHeader.label;"> - <label id="about-product-label" value="&aboutHeaderProduct.label;"/> - <label value="&aboutHeaderCompany.label;"/> + <flyoutpanel id="about-flyoutpanel" headertext="&aboutHeader.title;"> + <label id="about-product-label" value="&aboutHeader.product.label;"/> + <label value="&aboutHeader.company.label;"/> #expand <label id="about-version-label">__MOZ_APP_VERSION__</label> <label id="about-policy-label" onclick="if (event.button == 0) { Browser.onAboutPolicyClick(); }" - class="text-link" value="&aboutHeaderPolicy.label;"/> + class="text-link" value="&aboutHeader.policy.label;"/> </flyoutpanel> - <flyoutpanel id="prefs-flyoutpanel" headertext="&optionsHeader.label;"> - <settings id="prefs-startup" label="&startup.title;"> - <setting id="prefs-homepage" title="&homepage.title;" type="menulist" pref="browser.startup.sessionRestore" class="setting-expanded"> + <flyoutpanel id="prefs-flyoutpanel" headertext="&optionsHeader.title;"> + <settings id="prefs-startup" label="&optionsHeader.startup.title;"> <!-- note, this element has a custom margin-top --> + <setting id="prefs-homepage" title="&optionsHeader.homepage.title;" type="menulist" pref="browser.startup.sessionRestore" class="setting-expanded"> <menulist id="prefs-homepage-options"> - <menupopup position="after_end"> - <menuitem id="prefs-homepage-default" label="&homepage.startPage;" value="false"/> - <menuitem id="prefs-homepage-session" label="&homepage.sessionRestore;" value="true"/> + <menupopup id="prefs-homepage-popup" position="after_end"> + <menuitem id="prefs-homepage-default" label="&optionsHeader.homepage.startPage.button;" value="false"/> + <menuitem id="prefs-homepage-session" label="&optionsHeader.homepage.sessionRestore.button;" value="true"/> </menupopup> </menulist> </setting> </settings> - <setting pref="browser.tabs.tabsOnly" title="&toggleTabsOnly.label;" type="bool"/> + <setting pref="browser.tabs.tabsOnly" title="&optionsHeader.tabs.title;" type="bool"/> + <settings id="prefs-charencoding" label="&optionsHeader.char.title;"> + <setting pref="browser.menu.showCharacterEncoding" title="&optionsHeader.char.options.label;" type="bool"/> + </settings> + <settings id="prefs-privdata" label="&optionsHeader.privacy.clearPrivateData.title;"> + <setting title="&optionsHeader.privacy.clearPrivateData.label;" type="control"> + <button id="prefs-clear-data" label="&optionsHeader.privacy.clearPrivateData.button;" command="cmd_sanitize"/> + </setting> + </settings> + <setting pref="signon.rememberSignons" title="&optionsHeader.privacy.passwords.label;" type="bool"/> + <settings id="prefs-donottrack" label="&optionsHeader.privacy.doNotTrack.title;"> + <setting pref="privacy.donottrackheader.enabled" title="&optionsHeader.privacy.doNotTrack.label;" type="bool"/> + </settings> + + <setting id="prefs-master-password" title="&optionsHeader.privacy.masterPassword.label;" type="bool" oncommand="MasterPasswordUI.show(this.value);"/> + <settings id="prefs-sync" label="&sync.title;"> <setting id="sync-connect" title="&sync.notconnected;" type="control"> <button label="&sync.connect;" oncommand="WeaveGlue.tryConnect();" /> </setting> <setting id="sync-connected" class="setting-group" title="&sync.connected;" type="control" collapsed="true"> <button id="sync-pairdevice" label="&sync.pair.title;" oncommand="SyncPairDevice.open();" /> <button id="sync-details" label="&sync.details;" type="checkbox" autocheck="false" checked="false" oncommand="WeaveGlue.showDetails();" /> </setting> <setting id="sync-sync" class="setting-subgroup" type="control" collapsed="true"> <button id="sync-syncButton" label="&sync.syncNow;" oncommand="WeaveGlue.sync();"/> </setting> <setting id="sync-device" class="setting-subgroup" type="string" title="&sync.deviceName;" onchange="WeaveGlue.changeName(this);" collapsed="true"/> <setting id="sync-disconnect" class="setting-subgroup" type="control" collapsed="true"> <button label="&sync.disconnect;" oncommand="WeaveGlue.disconnect();" /> </setting> </settings> - <settings id="prefs-privacy" label="&privacy.title;"> - <setting pref="signon.rememberSignons" title="&rememberPasswords.title;" type="bool"/> - <setting pref="privacy.donottrackheader.enabled" title="&doNotTrack.title;" type="bool"/> - <setting id="prefs-master-password" title="&masterPassword.title;" type="bool" oncommand="MasterPasswordUI.show(this.value);"/> - <setting title="&clearPrivateData2.title;" type="control"> - <button id="prefs-clear-data" label="&clearPrivateData.button;" command="cmd_sanitize"/> - </setting> - </settings> </flyoutpanel> <!-- Form Helper form validation helper popup --> <arrowbox id="form-helper-validation-container" class="arrowbox-dark" flex="1" hidden="true" offset="0" top="0" left="0"> <label/> </arrowbox> #ifdef MOZ_SERVICES_SYNC
--- a/browser/metro/locales/en-US/chrome/browser.dtd +++ b/browser/metro/locales/en-US/chrome/browser.dtd @@ -2,17 +2,16 @@ - 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/. --> <!ENTITY urlbar.emptytext "Enter Search or Address"> <!ENTITY urlbar.accesskey "d"> <!ENTITY back.label "Back"> <!ENTITY forward.label "Forward"> -<!ENTITY toggleTabsOnly.label "Always show tabs"> <!ENTITY showTabs.label "Show Tabs"> <!ENTITY newtab.label "New Tab"> <!ENTITY closetab.label "Close Tab"> <!ENTITY undoclosetab.label "Undo Close Tab"> <!ENTITY appbarFindInPage.label "Find in Page"> <!ENTITY appbarViewOnDesktop.label "View on Desktop">
--- a/browser/metro/locales/en-US/chrome/browser.properties +++ b/browser/metro/locales/en-US/chrome/browser.properties @@ -94,22 +94,16 @@ tabs.closeWarningTitle=Confirm close # See: http://developer.mozilla.org/en/docs/Localization_and_Plurals # #1 number of tabs (must be greater than 1) tabs.closeWarning=NOT USED;You are about to close #1 tabs. Continue? tabs.closeButton=Close tabs tabs.closeWarningPromptMe=Warn me when I attempt to close multiple tabs tabs.emptyTabTitle=New Tab -# Homepage -# LOCALIZATION NOTE: homepage.custom2 is the text displayed on the selector button if -# the user selects a webpage to be the startpage. We can't display the entire URL -# or webpage title on the menulist -homepage.custom2=Custom Page - # "Clear Permissions" items pageactions.geolocation=Location pageactions.popup=Popups pageactions.offline-app=Offline Storage pageactions.password=Password pageactions.desktop-notification=Web Notifications pageactions.openWebappsManage=Manage Web Apps @@ -117,27 +111,15 @@ pageactions.openWebappsManage=Manage Web opensearch.search=Search: %S # Open in Another App # LOCALIZATION NOTE: openinapp.specific is the text displayed if there is a single external app # %S is the name of the app, like "YouTube" or "Picassa" openinapp.specific=Open in %S App openinapp.general=Open in Another App -# Clear Private Data -clearPrivateData.title=Clear Private Data -clearPrivateData.message=Delete your browsing history and settings, including passwords and cookies? - -# LOCALIZATION NOTE (browser.menu.showCharacterEncoding): Set to the string -# "true" (spelled and capitalized exactly that way) to show the "Character -# Encoding" menu in the site menu. Any other value will hide it. Without this -# setting, the "Character Encoding" menu must be enabled via Preferences. -# This is not a string to translate. If users frequently use the "Character Encoding" -# menu, set this to "true". Otherwise, you can leave it as "false". -browser.menu.showCharacterEncoding=false - # LOCALIZATION NOTE (intl.charsetmenu.browser.static): Set to a series of comma separated # values for charsets that the user can select from in the Character Encoding menu. intl.charsetmenu.browser.static=iso-8859-1,utf-8,x-gbk,big5,iso-2022-jp,shift_jis,euc-jp # Selection alerts selectionHelper.textCopied=Text copied to clipboard selectionHelper.linkCopied=Link copied to clipboard
--- a/browser/metro/locales/en-US/chrome/preferences.dtd +++ b/browser/metro/locales/en-US/chrome/preferences.dtd @@ -1,19 +1,29 @@ <!-- 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/. --> -<!ENTITY optionsHeader.label "Options"> -<!ENTITY aboutHeader.label "About"> -<!ENTITY aboutHeaderProduct.label "&brandShortName;"> -<!ENTITY aboutHeaderCompany.label "By &vendorShortName;"> -<!ENTITY aboutHeaderPolicy.label "Read the &brandShortName; privacy policy online"> -<!ENTITY privacy.title "Privacy & Security"> -<!ENTITY doNotTrack.title "Tell sites not to track me"> -<!ENTITY masterPassword.title "Use master password"> -<!ENTITY clearPrivateData2.title "Clear private data"> -<!ENTITY clearPrivateData.button "Clear"> -<!ENTITY rememberPasswords.title "Remember passwords"> -<!ENTITY startup.title "Startup"> -<!ENTITY homepage.title "When &brandShortName; starts, show"> -<!ENTITY homepage.startPage "Start page"> -<!ENTITY homepage.sessionRestore "Tabs from last time"> +<!-- ## About Flyout Panel ## --> +<!ENTITY aboutHeader.title "About"> +<!ENTITY aboutHeader.product.label "&brandShortName;"> +<!ENTITY aboutHeader.company.label "By &vendorShortName;"> +<!ENTITY aboutHeader.policy.label "Read the &brandShortName; privacy policy online"> + +<!-- ## Options Flyout Panel ## --> +<!ENTITY optionsHeader.title "Options"> +<!ENTITY optionsHeader.startup.title "Startup"> +<!ENTITY optionsHeader.homepage.title "When &brandShortName; starts, show"> +<!ENTITY optionsHeader.homepage.startPage.button "start page"> +<!ENTITY optionsHeader.homepage.sessionRestore.button "tabs from last time"> +<!ENTITY optionsHeader.tabs.title "Always Show Tabs"> +<!ENTITY optionsHeader.char.title "Character Encoding"> +<!ENTITY optionsHeader.char.autodetect.label "Auto-detect"> +<!ENTITY optionsHeader.char.options.label "Show encoding options on the App Bar"> +<!ENTITY optionsHeader.privacy.clearPrivateData.title "Clear Private Data"> +<!ENTITY optionsHeader.privacy.clearPrivateData.label "Clear your browsing history, passwords, cookies, and form data on this device"> +<!ENTITY optionsHeader.privacy.clearPrivateData.button "Clear"> +<!ENTITY optionsHeader.privacy.passwords.label "Remember Passwords"> +<!ENTITY optionsHeader.privacy.doNotTrack.title "Tracking"> +<!ENTITY optionsHeader.privacy.doNotTrack.label "Tell websites not to track me"> +<!ENTITY optionsHeader.privacy.masterPassword.label "Use Master Password"> +<!-- see sync.dtd --> +
--- a/browser/metro/profile/metro.js +++ b/browser/metro/profile/metro.js @@ -218,19 +218,18 @@ pref("accessibility.typeaheadfind.casese // Trun on F7 caret browsing hot key pref("accessibility.browsewithcaret_shortcut.enabled", true); pref("accessibility.browsewithcaret", false); // Whether or not we show a dialog box informing the user that the update was // successfully applied. pref("app.update.showInstalledUI", false); -// Whether the character encoding menu is under the main Firefox button. This -// preference is a string so that localizers can alter it. -pref("browser.menu.showCharacterEncoding", "chrome://browser/locale/browser.properties"); +// Whether the character encoding options are displayed in the app bar. +pref("browser.menu.showCharacterEncoding", false); pref("intl.charsetmenu.browser.static", "chrome://browser/locale/browser.properties"); // pointer to the default engine name pref("browser.search.defaultenginename", "chrome://browser/locale/browser.properties"); // SSL error page behaviour pref("browser.ssl_override_behavior", 2); pref("browser.xul.error_pages.expert_bad_cert", false);
--- a/browser/metro/theme/browser.css +++ b/browser/metro/theme/browser.css @@ -550,43 +550,16 @@ appbar toolbarbutton[disabled="true"] { } #appbar toolbarbutton:hover { -moz-image-region: rect(40px, 200px, 80px, 160px); } #appbar toolbarbutton:active { -moz-image-region: rect(80px, 200px, 120px, 160px); } -/* About flyout pane */ - -#about-flyoutpanel { - width: 350px; - background-image:url('chrome://browser/skin/images/about-footer.png'); - background-repeat: no-repeat; - background-attachment: fixed; - background-position: right bottom; -} - -#about-flyoutpanel label.text-link { - text-decoration: none; - color: #1167bd; -} - -#about-product-label { - font-weight: bold; -} - -#about-version-label { - margin-top: 11pt; -} - -#about-policy-label { - margin-top: 24pt; -} - /* Application-Specific */ #download-button { -moz-image-region: rect(0px, 40px, 40px, 0px) !important; } #download-button:hover { -moz-image-region: rect(40px, 40px, 80px, 0px) !important; } #download-button:active { @@ -643,16 +616,120 @@ appbar toolbarbutton[disabled="true"] { #star-button:hover { -moz-image-region: rect(40px, 360px, 80px, 320px) !important; } #star-button:active, #star-button[checked="true"] { -moz-image-region: rect(80px, 360px, 120px, 320px) !important; } +/* Flyouts ---------------------------------------------------------------- */ + +/* don't add a margin to the very top settings entry in flyouts */ +flyoutpanel > settings:first-child { + margin-top: 0px; +} + +/* About flyout pane */ + +#about-flyoutpanel { + width: 350px; + background-image:url('chrome://browser/skin/images/about-footer.png'); + background-repeat: no-repeat; + background-attachment: fixed; + background-position: right bottom; +} + +#about-flyoutpanel label.text-link { + text-decoration: none; + color: #1167bd; +} + +#about-product-label { + font-weight: bold; +} + +#about-version-label { + margin-top: 11pt; +} + +#about-policy-label { + margin-top: 24pt; +} + +/* Preferences flyout */ + +#prefs-flyoutpanel { + width: 400px; +} + +/* Lay out each <setting> in a single row */ +setting { + min-height: @touch_row@; /* row size */ + -moz-box-align: center; + -moz-box-orient: horizontal; +} + +/* ...except for some exceptions */ +.setting-expanded { + -moz-box-align: start; + -moz-box-orient: vertical; +} + +setting > vbox { + -moz-box-flex: 1; +} + +settings { + margin-top: 32px; +} + +.settings-title { + font-weight: bold; +} + +/* <setting> elements that are not in a <settings> group get special treatment */ +#prefs-flyoutpanel > setting { + margin-top: 16px; +} +#prefs-flyoutpanel > setting .preferences-title { + font-weight: bold +} + +setting[type="integer"] > .preferences-alignment, +setting[type="string"] > .preferences-alignment { + -moz-box-flex: 3; +} + +setting[type="file"] > .preferences-alignment, +setting[type="directory"] > .preferences-alignment { + -moz-box-align: center; +} + +#prefs-homepage-options, #prefs-homepage-popup { + min-width: 200px; +} + +.options-box { + -moz-margin-start: 28px; /* sized based on the 32px addon image */ +} + +.options-box > setting:last-child { + border-bottom: 0; +} + +.preferences-description { + font-size: @font_small@ !important; + color: grey; +} + +.preferences-description:empty { + display: none; +} + /* Start UI (Autocomplete + New Tab Page) ----------------------------------- */ #start-container { display: none; } #start-container[startpage], #start-container[filtering] { @@ -672,17 +749,17 @@ appbar toolbarbutton[disabled="true"] { /* if snapped, hide the fullscreen awesome screen, if viewstate is anything * other than snapped, hide the snapped awesome screen */ #start[viewstate="snapped"], #snapped-start:not([viewstate="snapped"]) { visibility: collapse; } -/* Browser Content Ares ----------------------------------------------------- */ +/* Browser Content Areas ----------------------------------------------------- */ /* Hide the browser while the start UI is visible */ #content-viewport[startpage], #content-viewport[filtering] { visibility: collapse; } #browsers { @@ -723,82 +800,16 @@ appbar toolbarbutton[disabled="true"] { margin: 0; } #panel-items { padding-top: 20px; -moz-padding-start: 88px; } -/* Preferences Section - Panel UI ------------------------------------------ */ - -#prefs-flyoutpanel { - width: 400px; -} - -/* Lay out each <setting> in a single row */ -setting { - min-height: @touch_row@; /* row size */ - -moz-box-align: center; - -moz-box-orient: horizontal; -} - -/* ...except for some exceptions */ -.setting-expanded { - -moz-box-align: start; - -moz-box-orient: vertical; -} - -setting > vbox { - -moz-box-flex: 1; -} - -settings { - margin-top: 32px; -} - -.settings-title { - font-weight: bold; -} - -/* <setting> elements that are not in a <settings> group get special treatment */ -#prefs-flyoutpanel > setting { - margin-top: 16px; -} -#prefs-flyoutpanel > setting .preferences-title { - font-weight: bold -} - -setting[type="integer"] > .preferences-alignment, -setting[type="string"] > .preferences-alignment { - -moz-box-flex: 3; -} - -setting[type="file"] > .preferences-alignment, -setting[type="directory"] > .preferences-alignment { - -moz-box-align: center; -} - -.options-box { - -moz-margin-start: 28px; /* sized based on the 32px addon image */ -} - -.options-box > setting:last-child { - border-bottom: 0; -} - -.preferences-description { - font-size: @font_small@ !important; - color: grey; -} - -.preferences-description:empty { - display: none; -} - /* Console Section - Panel UI ---------------------------------------------- */ #console-filter-warnings, #console-filter-messages { visibility: visible; } @media (max-width: 499px) {
--- a/browser/metro/theme/flyoutpanel.css +++ b/browser/metro/theme/flyoutpanel.css @@ -5,24 +5,31 @@ flyoutpanel { height: 100%; border-width: 2px; border-color: #d7d6d6; background-color: #ffffff; -moz-border-start-style: solid; visibility: collapse; position: fixed; - transition: transform 0.2s ease-out; + /* bezier function and duration taken from winJS showPanel method */ + transition: transform 550ms cubic-bezier(0.1, 0.9, 0.2, 1); + transform: translateX(100%); font-size: 11pt; right: 0; } flyoutpanel:-moz-dir(rtl) { left: 0; right: auto; + transform: translateX(-100%); +} + +.flyoutpanel-slide-in { + transform: translateX(0); } flyoutpanel[visible] { visibility: visible; } /* XUL flexbox layout doesn't work in a position:fixed container, so we have * this normally-positioned inside for layout purposes. */
--- a/browser/metro/theme/platform.css +++ b/browser/metro/theme/platform.css @@ -181,16 +181,17 @@ toolbarbutton[open="true"] { border-color: transparent; } /* Toggleswitch ------------------------------------------------------------ */ checkbox.toggleswitch { margin: @metro_spacing_small@; min-height: @metro_spacing_normal@; + font-weight: bold; } checkbox.toggleswitch hbox { -moz-box-align: center; } checkbox.toggleswitch:not([checked]) .onlabel, checkbox.toggleswitch[checked] .offlabel {
--- a/build/autoconf/config.status.m4 +++ b/build/autoconf/config.status.m4 @@ -108,16 +108,22 @@ substs = [(name[1:-1], value[1:-1]) for EOF dnl The MOZ_DIVERSION_SUBST output diversion contains AC_SUBSTs, in the dnl expected format, but lacks the final comma (see above). sed 's/$/,/' >> $CONFIG_STATUS <<EOF undivert(MOZ_DIVERSION_SUBST)dnl EOF +dnl Add in the output from the subconfigure script +for ac_subst_arg in $_subconfigure_ac_subst_args; do + variable='$'$ac_subst_arg + echo " (''' $ac_subst_arg ''', r''' `eval echo $variable` ''')," >> $CONFIG_STATUS +done + cat >> $CONFIG_STATUS <<\EOF ] ] dnl List of files to apply AC_SUBSTs to. This is the list of files given dnl as an argument to AC_OUTPUT ($1) files = [ EOF
new file mode 100644 --- /dev/null +++ b/build/autoconf/subconfigure.m4 @@ -0,0 +1,46 @@ +dnl We are not running in a real autoconf environment. So we're using real m4 +dnl here, not the crazier environment that autoconf provides. + +dnl Autoconf expects [] for quotes; give it to them +changequote([, ]) + +dnl AC_DEFUN is provided to use instead of define in autoconf. Provide it too. +define([AC_DEFUN], [define($1, [$2])]) + +dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, IF-TRUE[, IF-FALSE]) +dnl We have to ignore the help string due to how help works in autoconf... +AC_DEFUN([AC_ARG_ENABLE], +[#] Check whether --enable-[$1] or --disable-[$1] was given. +[if test "[${enable_]patsubst([$1], -, _)+set}" = set; then + enableval="[$enable_]patsubst([$1], -, _)" + $3 +ifelse([$4], , , [else + $4 +])dnl +fi +]) + +dnl AC_MSG_ERROR(error-description) +AC_DEFUN([AC_MSG_ERROR], [{ echo "configure: error: $1" 1>&2; exit 1; }]) + +AC_DEFUN([AC_MSG_WARN], [ echo "configure: warning: $1" 1>&2 ]) + +dnl Add the variable to the list of substitution variables +AC_DEFUN([AC_SUBST], +[ +_subconfigure_ac_subst_args="$_subconfigure_ac_subst_args $1" +]) + +dnl Override for AC_DEFINE. +AC_DEFUN([AC_DEFINE], +[ +cat >>confdefs.h <<\EOF +[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1) +EOF +cat >> confdefs.pytmp <<\EOF + (''' $1 ''', ifelse($#, 2, [r''' $2 '''], $#, 3, [r''' $2 '''], ' 1 ')) +EOF +]) + +dnl AC_OUTPUT_SUBDIRS(subdirectory) +AC_DEFUN([AC_OUTPUT_SUBDIRS], [do_output_subdirs "$1"])
--- a/build/mobile/remoteautomation.py +++ b/build/mobile/remoteautomation.py @@ -118,25 +118,25 @@ class RemoteAutomation(Automation): return found_exception def checkForCrashes(self, directory, symbolsPath): logcat = self._devicemanager.getLogcat(filterOutRegexps=fennecLogcatFilters) javaException = self.checkForJavaException(logcat) if javaException: return True try: + dumpDir = tempfile.mkdtemp() remoteCrashDir = self._remoteProfile + '/minidumps/' if not self._devicemanager.dirExists(remoteCrashDir): # As of this writing, the minidumps directory is automatically # created when fennec (first) starts, so its lack of presence # is a hint that something went wrong. print "Automation Error: No crash directory (%s) found on remote device" % remoteCrashDir # Whilst no crash was found, the run should still display as a failure return True - dumpDir = tempfile.mkdtemp() self._devicemanager.getDirectory(remoteCrashDir, dumpDir) crashed = automationutils.checkForCrashes(dumpDir, symbolsPath, self.lastTestSeen) finally: try: shutil.rmtree(dumpDir) except: print "WARNING: unable to remove directory: %s" % dumpDir
--- a/caps/src/nsPrincipal.cpp +++ b/caps/src/nsPrincipal.cpp @@ -487,18 +487,17 @@ nsPrincipal::SetDomain(nsIURI* aDomain) mDomain = NS_TryToMakeImmutable(aDomain); mDomainImmutable = URIIsImmutable(mDomain); // Domain has changed, forget cached security policy SetSecurityPolicy(nullptr); // Recompute all wrappers between compartments using this principal and other // non-chrome compartments. - JSContext *cx = nsContentUtils::GetSafeJSContext(); - NS_ENSURE_TRUE(cx, NS_ERROR_FAILURE); + SafeAutoJSContext cx; JSPrincipals *principals = nsJSPrincipals::get(static_cast<nsIPrincipal*>(this)); bool success = js::RecomputeWrappers(cx, js::ContentCompartmentsOnly(), js::CompartmentsWithPrincipals(principals)); NS_ENSURE_TRUE(success, NS_ERROR_FAILURE); success = js::RecomputeWrappers(cx, js::CompartmentsWithPrincipals(principals), js::ContentCompartmentsOnly()); NS_ENSURE_TRUE(success, NS_ERROR_FAILURE);
--- a/caps/src/nsSecurityManagerFactory.cpp +++ b/caps/src/nsSecurityManagerFactory.cpp @@ -21,16 +21,17 @@ #include "nsNetCID.h" #include "nsIClassInfoImpl.h" #include "nsJSUtils.h" #include "nsPIDOMWindow.h" #include "nsIScriptGlobalObject.h" #include "nsIDocument.h" #include "jsfriendapi.h" #include "xpcprivate.h" +#include "nsContentUtils.h" #include "mozilla/Preferences.h" #include "mozilla/Telemetry.h" using namespace mozilla; /////////////////////// // nsSecurityNameSet // /////////////////////// @@ -59,17 +60,17 @@ static JSFunctionSpec PrivilegeManager_s /* * "Steal" calls to netscape.security.PrivilegeManager.enablePrivilege, * et al. so that code that worked with 4.0 can still work. */ NS_IMETHODIMP nsSecurityNameSet::InitializeNameSet(nsIScriptContext* aScriptContext) { - JSContext* cx = aScriptContext->GetNativeContext(); + AutoPushJSContext cx(aScriptContext->GetNativeContext()); JSObject *global = JS_ObjectToInnerObject(cx, JS_GetGlobalObject(cx)); /* * Find Object.prototype's class by walking up the global object's * prototype chain. */ JSObject *obj = global; JSObject *proto;
--- a/caps/tests/mochitest/test_principal_extendedorigin_appid_appstatus.html +++ b/caps/tests/mochitest/test_principal_extendedorigin_appid_appstatus.html @@ -17,17 +17,17 @@ https://bugzilla.mozilla.org/show_bug.cg </div> <pre id="test"> <script type="application/javascript;version=1.7"> /** Test for Bug 758258 **/ var Ci = Components.interfaces; -if (navigator.platform.indexOf("Linux") == 0) { +if (navigator.platform.startsWith("Linux")) { SimpleTest.expectAssertions(2); } SimpleTest.waitForExplicitFinish(); /* * gData is an array of objects. Each object represents a test case. * - app: gives the app manifest URL, will set mozapp to it on the iframe;
--- a/configure.in +++ b/configure.in @@ -4356,16 +4356,33 @@ AC_SUBST(MOZ_UPDATE_CHANNEL) AC_MSG_CHECKING([if app-specific confvars.sh exists]) if test -f "${srcdir}/${MOZ_BUILD_APP}/confvars.sh" ; then AC_MSG_RESULT([${srcdir}/${MOZ_BUILD_APP}/confvars.sh]) . "${srcdir}/${MOZ_BUILD_APP}/confvars.sh" else AC_MSG_RESULT([no]) fi +# Allow the application to provide a subconfigure script +if test -f "${srcdir}/${MOZ_BUILD_APP}/configure.in" ; then + do_output_subdirs() { + if test -n "$_subconfigure_subdirs"; then + AC_MSG_ERROR([Cannot specify more than one sub-sub-configure]) + fi + _subconfigure_subdir="$1" + _subconfigure_config_args="$ac_configure_args" + } + tmpscript=`mktemp -t subscript.XXXXXX` || exit 1 + m4 "${srcdir}/build/autoconf/subconfigure.m4" \ + "${srcdir}/build/autoconf/altoptions.m4" \ + "${srcdir}/${MOZ_BUILD_APP}/configure.in" > $tmpscript + . $tmpscript + rm -f $tmpscript +fi + # Allow someone to change MOZ_APP_NAME and MOZ_APP_BASENAME in mozconfig MOZ_ARG_WITH_STRING(app-name, [--with-app-name=APPNAME sets MOZ_APP_NAME to APPNAME], WITH_APP_NAME=$withval, ) if test -n "$WITH_APP_NAME" ; then MOZ_APP_NAME="$WITH_APP_NAME" @@ -9205,16 +9222,24 @@ if test -z "$direct_nspr_config"; then HOST_CFLAGS="$_SUBDIR_HOST_CFLAGS" HOST_LDFLAGS="$_SUBDIR_HOST_LDFLAGS" RC= fi unset MAKEFILES unset CONFIG_FILES +# Run all configure scripts specified by a subconfigure +if test -n "$_subconfigure_subdir"; then + _save_ac_configure_args="$ac_configure_args" + ac_configure_args="$_subconfigure_config_args" + AC_OUTPUT_SUBDIRS("$_subconfigure_subdir") + ac_configure_args="$_save_ac_configure_args" +fi + # No need to run subconfigures when building with LIBXUL_SDK_DIR if test "$COMPILE_ENVIRONMENT" -a -z "$LIBXUL_SDK_DIR"; then export WRAP_LDFLAGS if test -n "$_WRAP_MALLOC"; then # Avoid doubling wrap malloc arguments _SUBDIR_CONFIG_ARGS="`echo $_SUBDIR_CONFIG_ARGS | sed -e 's/--enable-wrap-malloc *//'`"
new file mode 100644 --- /dev/null +++ b/content/base/crashtests/841205.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html> +<head> +<script> + +function boom() +{ + var b = document.createElement('bdi'); + var c = document.createElement('div'); + var d = document.createElement('div'); + + b.appendChild(c); + c.appendChild(d); + b.removeChild(c); + d.appendChild(b); + document.createElement('div').appendChild(c); + b.appendChild(document.createElement('div')); + + b.setAttribute('dir', "auto"); +} + +</script> +</head> +<body onload="boom();"></body> +</html>
new file mode 100644 --- /dev/null +++ b/content/base/crashtests/844404.html @@ -0,0 +1,23 @@ +<!DOCTYPE html> +<html> +<head> +<script> + +function boom() +{ + d.setAttribute('dir', "auto"); + c.setAttribute('dir', "auto"); + d.removeAttribute('dir'); + c.removeAttribute('dir'); + b.setAttribute('dir', "auto"); +} + +</script> +</head> + +<body onload="boom();"> + +<div id="a" dir="auto"><div id="b"><div id="c"><div id="d"></div></div></div></div> + +</body> +</html>
--- a/content/base/crashtests/crashtests.list +++ b/content/base/crashtests/crashtests.list @@ -124,8 +124,10 @@ load 815500.html load 816253.html load 822691.html load 822723.html load 824719.html load 827190.html load 828054.html load 829428.html load 836890.html +load 841205.html +load 844404.html
--- a/content/base/public/nsContentUtils.h +++ b/content/base/public/nsContentUtils.h @@ -2200,27 +2200,27 @@ public: // Returns false if something erroneous happened. bool Push(nsIDOMEventTarget *aCurrentTarget); // If nothing has been pushed to stack, this works like Push. // Otherwise if context will change, Pop and Push will be called. bool RePush(nsIDOMEventTarget *aCurrentTarget); // If a null JSContext is passed to Push(), that will cause no // push to happen and false to be returned. - bool Push(JSContext *cx, bool aRequiresScriptContext = true); + void Push(JSContext *cx); // Explicitly push a null JSContext on the the stack - bool PushNull(); + void PushNull(); // Pop() will be a no-op if Push() or PushNull() fail void Pop(); nsIScriptContext* GetCurrentScriptContext() { return mScx; } private: // Combined code for PushNull() and Push(JSContext*) - bool DoPush(JSContext* cx); + void DoPush(JSContext* cx); nsCOMPtr<nsIScriptContext> mScx; bool mScriptIsRunning; bool mPushedSomething; #ifdef DEBUG JSContext* mPushedContext; unsigned mCompartmentDepthOnEntry; #endif @@ -2297,16 +2297,43 @@ private: * SafeAutoJSContext is similar to AutoJSContext but will only return the safe * JS context. That means it will never call ::GetCurrentJSContext(). */ class NS_STACK_CLASS SafeAutoJSContext : public AutoJSContext { public: SafeAutoJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM); }; +/** + * Use AutoPushJSContext when you want to use a specific JSContext that may or + * may not be already on the stack. This differs from nsCxPusher in that it only + * pushes in the case that the given cx is not the active cx on the JSContext + * stack, which avoids an expensive JS_SaveFrameChain in the common case. + * + * Most consumers of this should probably just use AutoJSContext. But the goal + * here is to preserve the existing behavior while ensure proper cx-stack + * semantics in edge cases where the context being used doesn't match the active + * context. + * + * NB: This will not push a null cx even if aCx is null. Make sure you know what + * you're doing. + */ +class NS_STACK_CLASS AutoPushJSContext { + nsCxPusher mPusher; + JSContext* mCx; + +public: + AutoPushJSContext(JSContext* aCx) : mCx(aCx) { + if (mCx && mCx != nsContentUtils::GetCurrentJSContext()) { + mPusher.Push(mCx); + } + } + operator JSContext*() { return mCx; } +}; + } // namespace mozilla #define NS_INTERFACE_MAP_ENTRY_TEAROFF(_interface, _allocator) \ if (aIID.Equals(NS_GET_IID(_interface))) { \ foundInterface = static_cast<_interface *>(_allocator); \ if (!foundInterface) { \ *aInstancePtr = nullptr; \ return NS_ERROR_OUT_OF_MEMORY; \
--- a/content/base/public/nsIDocument.h +++ b/content/base/public/nsIDocument.h @@ -90,19 +90,23 @@ class CDATASection; class Comment; class DocumentFragment; class DocumentType; class DOMImplementation; class Element; class GlobalObject; class HTMLBodyElement; class Link; +class NodeFilter; class ProcessingInstruction; class UndoManager; template<typename> class Sequence; + +template<typename, typename> class CallbackObjectHolder; +typedef CallbackObjectHolder<NodeFilter, nsIDOMNodeFilter> NodeFilterHolder; } // namespace dom } // namespace mozilla #define NS_IDOCUMENT_IID \ { 0x45ce048f, 0x5970, 0x411e, \ { 0xaa, 0x99, 0x12, 0xed, 0x3a, 0x55, 0xc9, 0xc3 } } // Flag for AddStyleSheet(). @@ -1914,20 +1918,29 @@ public: already_AddRefed<nsINode> ImportNode(nsINode& aNode, bool aDeep, mozilla::ErrorResult& rv) const; nsINode* AdoptNode(nsINode& aNode, mozilla::ErrorResult& rv); already_AddRefed<nsIDOMEvent> CreateEvent(const nsAString& aEventType, mozilla::ErrorResult& rv) const; already_AddRefed<nsRange> CreateRange(mozilla::ErrorResult& rv); already_AddRefed<nsIDOMNodeIterator> CreateNodeIterator(nsINode& aRoot, uint32_t aWhatToShow, - nsIDOMNodeFilter* aFilter, mozilla::ErrorResult& rv) const; + mozilla::dom::NodeFilter* aFilter, + mozilla::ErrorResult& rv) const; + already_AddRefed<nsIDOMNodeIterator> + CreateNodeIterator(nsINode& aRoot, uint32_t aWhatToShow, + const mozilla::dom::NodeFilterHolder& aFilter, + mozilla::ErrorResult& rv) const; already_AddRefed<nsIDOMTreeWalker> CreateTreeWalker(nsINode& aRoot, uint32_t aWhatToShow, - nsIDOMNodeFilter* aFilter, mozilla::ErrorResult& rv) const; + mozilla::dom::NodeFilter* aFilter, mozilla::ErrorResult& rv) const; + already_AddRefed<nsIDOMTreeWalker> + CreateTreeWalker(nsINode& aRoot, uint32_t aWhatToShow, + const mozilla::dom::NodeFilterHolder& aFilter, + mozilla::ErrorResult& rv) const; // Deprecated WebIDL bits already_AddRefed<mozilla::dom::CDATASection> CreateCDATASection(const nsAString& aData, mozilla::ErrorResult& rv); already_AddRefed<nsIDOMAttr> CreateAttribute(const nsAString& aName, mozilla::ErrorResult& rv); already_AddRefed<nsIDOMAttr> CreateAttributeNS(const nsAString& aNamespaceURI,
--- a/content/base/src/EventSource.cpp +++ b/content/base/src/EventSource.cpp @@ -1222,17 +1222,17 @@ EventSource::DispatchAllMessageEvents() // Let's play get the JSContext nsCOMPtr<nsIScriptGlobalObject> sgo = do_QueryInterface(GetOwner()); NS_ENSURE_TRUE_VOID(sgo); nsIScriptContext* scriptContext = sgo->GetContext(); NS_ENSURE_TRUE_VOID(scriptContext); - JSContext* cx = scriptContext->GetNativeContext(); + AutoPushJSContext cx(scriptContext->GetNativeContext()); NS_ENSURE_TRUE_VOID(cx); while (mMessagesToDispatch.GetSize() > 0) { nsAutoPtr<Message> message(static_cast<Message*>(mMessagesToDispatch.PopFront())); // Now we can turn our string into a jsval jsval jsData;
--- a/content/base/src/WebSocket.cpp +++ b/content/base/src/WebSocket.cpp @@ -876,17 +876,17 @@ WebSocket::CreateAndDispatchMessageEvent // Get the JSContext nsCOMPtr<nsIScriptGlobalObject> sgo = do_QueryInterface(GetOwner()); NS_ENSURE_TRUE(sgo, NS_ERROR_FAILURE); nsIScriptContext* scriptContext = sgo->GetContext(); NS_ENSURE_TRUE(scriptContext, NS_ERROR_FAILURE); - JSContext* cx = scriptContext->GetNativeContext(); + AutoPushJSContext cx(scriptContext->GetNativeContext()); NS_ENSURE_TRUE(cx, NS_ERROR_FAILURE); // Create appropriate JS object for message jsval jsData; { JSAutoRequest ar(cx); if (isBinary) { if (mBinaryType == BinaryTypeValues::Blob) {
--- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -3010,29 +3010,24 @@ nsCxPusher::Push(nsIDOMEventTarget *aCur DoPush(cx); } // Nothing to do here, I guess. Have to return true so that event firing // will still work correctly even if there is no associated JSContext return true; } - JSContext* cx = nullptr; - - if (scx) { - cx = scx->GetNativeContext(); - // Bad, no JSContext from script context! - NS_ENSURE_TRUE(cx, false); - } + JSContext* cx = scx ? scx->GetNativeContext() : nullptr; // If there's no native context in the script context it must be // in the process or being torn down. We don't want to notify the // script context about scripts having been evaluated in such a // case, calling with a null cx is fine in that case. - return Push(cx); + Push(cx); + return true; } bool nsCxPusher::RePush(nsIDOMEventTarget *aCurrentTarget) { if (!mPushedSomething) { return Push(aCurrentTarget); } @@ -3053,74 +3048,60 @@ nsCxPusher::RePush(nsIDOMEventTarget *aC return true; } } Pop(); return Push(aCurrentTarget); } -bool -nsCxPusher::Push(JSContext *cx, bool aRequiresScriptContext) -{ - if (mPushedSomething) { - NS_ERROR("Whaaa! No double pushing with nsCxPusher::Push()!"); - - return false; - } - - if (!cx) { - return false; - } +void +nsCxPusher::Push(JSContext *cx) +{ + MOZ_ASSERT(!mPushedSomething, "No double pushing with nsCxPusher::Push()!"); + MOZ_ASSERT(cx); // Hold a strong ref to the nsIScriptContext, just in case // XXXbz do we really need to? If we don't get one of these in Pop(), is // that really a problem? Or do we need to do this to effectively root |cx|? mScx = GetScriptContextFromJSContext(cx); - if (!mScx && aRequiresScriptContext) { - // Should probably return false. See bug 416916. - return true; - } - - return DoPush(cx); -} - -bool + + DoPush(cx); +} + +void nsCxPusher::DoPush(JSContext* cx) { nsIThreadJSContextStack* stack = nsContentUtils::ThreadJSContextStack(); if (!stack) { - return true; + return; } if (cx && IsContextOnStack(stack, cx)) { // If the context is on the stack, that means that a script // is running at the moment in the context. mScriptIsRunning = true; } if (NS_FAILED(stack->Push(cx))) { - mScriptIsRunning = false; - mScx = nullptr; - return false; + MOZ_CRASH(); } mPushedSomething = true; #ifdef DEBUG mPushedContext = cx; if (cx) mCompartmentDepthOnEntry = js::GetEnterCompartmentDepth(cx); #endif - return true; -} - -bool +} + +void nsCxPusher::PushNull() { - return DoPush(nullptr); + DoPush(nullptr); } void nsCxPusher::Pop() { nsIThreadJSContextStack* stack = nsContentUtils::ThreadJSContextStack(); if (!mPushedSomething || !stack) { mScx = nullptr; @@ -6426,18 +6407,18 @@ nsContentUtils::FindInternalContentViewe // static bool nsContentUtils::IsPatternMatching(nsAString& aValue, nsAString& aPattern, nsIDocument* aDocument) { NS_ASSERTION(aDocument, "aDocument should be a valid pointer (not null)"); NS_ENSURE_TRUE(aDocument->GetScriptGlobalObject(), true); - JSContext* cx = aDocument->GetScriptGlobalObject()-> - GetContext()->GetNativeContext(); + AutoPushJSContext cx(aDocument->GetScriptGlobalObject()-> + GetContext()->GetNativeContext()); NS_ENSURE_TRUE(cx, true); JSAutoRequest ar(cx); // The pattern has to match the entire value. aPattern.Insert(NS_LITERAL_STRING("^(?:"), 0); aPattern.Append(NS_LITERAL_STRING(")$")); @@ -6833,20 +6814,17 @@ AutoJSContext::Init(bool aSafe MOZ_GUARD MOZ_GUARD_OBJECT_NOTIFIER_INIT; if (!aSafe) { mCx = nsContentUtils::GetCurrentJSContext(); } if (!mCx) { mCx = nsContentUtils::GetSafeJSContext(); - bool result = mPusher.Push(mCx); - if (!result || !mCx) { - MOZ_CRASH(); - } + mPusher.Push(mCx); } } AutoJSContext::operator JSContext*() { return mCx; }
--- a/content/base/src/nsDOMDataChannel.cpp +++ b/content/base/src/nsDOMDataChannel.cpp @@ -40,16 +40,18 @@ extern PRLogModuleInfo* GetDataChannelLo #include "DataChannel.h" #ifdef GetBinaryType // Windows apparently has a #define for GetBinaryType... #undef GetBinaryType #endif +using namespace mozilla; + class nsDOMDataChannel : public nsDOMEventTargetHelper, public nsIDOMDataChannel, public mozilla::DataChannelListener { public: nsDOMDataChannel(already_AddRefed<mozilla::DataChannel> aDataChannel) : mDataChannel(aDataChannel) , mBinaryType(DC_BINARY_TYPE_BLOB) @@ -388,17 +390,17 @@ nsDOMDataChannel::DoOnMessageAvailable(c return NS_OK; } nsCOMPtr<nsIScriptGlobalObject> sgo = do_QueryInterface(GetOwner()); NS_ENSURE_TRUE(sgo, NS_ERROR_FAILURE); nsIScriptContext* sc = sgo->GetContext(); NS_ENSURE_TRUE(sc, NS_ERROR_FAILURE); - JSContext* cx = sc->GetNativeContext(); + AutoPushJSContext cx(sc->GetNativeContext()); NS_ENSURE_TRUE(cx, NS_ERROR_FAILURE); JSAutoRequest ar(cx); jsval jsData; if (aBinary) { if (mBinaryType == DC_BINARY_TYPE_BLOB) { rv = nsContentUtils::CreateBlobBuffer(cx, aData, jsData);
--- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -179,16 +179,17 @@ #include "imgILoader.h" #include "imgRequestProxy.h" #include "nsWrapperCacheInlines.h" #include "nsSandboxFlags.h" #include "nsIAppsService.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/dom/DocumentFragment.h" #include "mozilla/dom/HTMLBodyElement.h" +#include "mozilla/dom/NodeFilterBinding.h" #include "mozilla/dom/UndoManager.h" #include "nsFrame.h" #include "nsDOMCaretPosition.h" #include "nsIDOMHTMLTextAreaElement.h" #include "nsViewportInfo.h" using namespace mozilla; using namespace mozilla::dom; @@ -3978,29 +3979,18 @@ nsDocument::SetScriptGlobalObject(nsIScr #ifdef DEBUG if (!mWillReparent) { // We really shouldn't have a wrapper here but if we do we need to make sure // it has the correct parent. JSObject *obj = GetWrapperPreserveColor(); if (obj) { JSObject *newScope = aScriptGlobalObject->GetGlobalJSObject(); - nsIScriptContext *scx = aScriptGlobalObject->GetContext(); - JSContext *cx = scx ? scx->GetNativeContext() : nullptr; - if (!cx) { - nsContentUtils::ThreadJSContextStack()->Peek(&cx); - if (!cx) { - cx = nsContentUtils::ThreadJSContextStack()->GetSafeJSContext(); - NS_ASSERTION(cx, "Uhoh, no context, this is bad!"); - } - } - if (cx) { - NS_ASSERTION(JS_GetGlobalForObject(cx, obj) == newScope, - "Wrong scope, this is really bad!"); - } + NS_ASSERTION(js::GetGlobalForObjectCrossCompartment(obj) == newScope, + "Wrong scope, this is really bad!"); } } #endif if (mAllowDNSPrefetch) { nsCOMPtr<nsIDocShell> docShell = do_QueryReferent(mDocumentContainer); if (docShell) { #ifdef DEBUG @@ -5360,24 +5350,38 @@ nsDocument::CreateNodeIterator(nsIDOMNod if (!aRoot) { return NS_ERROR_DOM_NOT_SUPPORTED_ERR; } nsCOMPtr<nsINode> root = do_QueryInterface(aRoot); NS_ENSURE_TRUE(root, NS_ERROR_UNEXPECTED); ErrorResult rv; - *_retval = nsIDocument::CreateNodeIterator(*root, aWhatToShow, aFilter, + NodeFilterHolder holder(aFilter); + *_retval = nsIDocument::CreateNodeIterator(*root, aWhatToShow, holder, rv).get(); return rv.ErrorCode(); } already_AddRefed<nsIDOMNodeIterator> nsIDocument::CreateNodeIterator(nsINode& aRoot, uint32_t aWhatToShow, - nsIDOMNodeFilter* aFilter, + NodeFilter* aFilter, + mozilla::ErrorResult& rv) const +{ + NodeFilterHolder holder(aFilter); + // We don't really know how to handle WebIDL callbacks yet, in + // nsTraversal, so just go ahead and convert to an XPCOM callback. + nsCOMPtr<nsIDOMNodeFilter> filter = holder.ToXPCOMCallback(); + NodeFilterHolder holder2(filter); + return CreateNodeIterator(aRoot, aWhatToShow, holder2, rv); +} + +already_AddRefed<nsIDOMNodeIterator> +nsIDocument::CreateNodeIterator(nsINode& aRoot, uint32_t aWhatToShow, + const NodeFilterHolder& aFilter, mozilla::ErrorResult& rv) const { nsINode* root = &aRoot; nsresult res = nsContentUtils::CheckSameOrigin(this, root); if (NS_FAILED(res)) { rv.Throw(res); return nullptr; } @@ -5399,24 +5403,38 @@ nsDocument::CreateTreeWalker(nsIDOMNode if (!aOptionalArgc) { aWhatToShow = nsIDOMNodeFilter::SHOW_ALL; } nsCOMPtr<nsINode> root = do_QueryInterface(aRoot); NS_ENSURE_TRUE(root, NS_ERROR_DOM_NOT_SUPPORTED_ERR); ErrorResult rv; - *_retval = nsIDocument::CreateTreeWalker(*root, aWhatToShow, aFilter, + NodeFilterHolder holder(aFilter); + *_retval = nsIDocument::CreateTreeWalker(*root, aWhatToShow, holder, rv).get(); return rv.ErrorCode(); } already_AddRefed<nsIDOMTreeWalker> nsIDocument::CreateTreeWalker(nsINode& aRoot, uint32_t aWhatToShow, - nsIDOMNodeFilter* aFilter, + NodeFilter* aFilter, + mozilla::ErrorResult& rv) const +{ + NodeFilterHolder holder(aFilter); + // We don't really know how to handle WebIDL callbacks yet, in + // nsTraversal, so just go ahead and convert to an XPCOM callback. + nsCOMPtr<nsIDOMNodeFilter> filter = holder.ToXPCOMCallback(); + NodeFilterHolder holder2(filter); + return CreateTreeWalker(aRoot, aWhatToShow, holder2, rv); +} + +already_AddRefed<nsIDOMTreeWalker> +nsIDocument::CreateTreeWalker(nsINode& aRoot, uint32_t aWhatToShow, + const NodeFilterHolder& aFilter, mozilla::ErrorResult& rv) const { nsINode* root = &aRoot; nsresult res = nsContentUtils::CheckSameOrigin(this, root); if (NS_FAILED(res)) { rv.Throw(res); return nullptr; } @@ -6169,16 +6187,17 @@ private: * @param aOldDocument The document to try to get a context from. * @param aNewDocument The document to get aNewScope from. * @param aCx [out] Context gotten through one of the scopes, from the stack * or the safe context. * @param aNewScope [out] Scope gotten from aNewDocument. */ static nsresult GetContextAndScope(nsIDocument* aOldDocument, nsIDocument* aNewDocument, + nsCxPusher& aPusher, JSContext** aCx, JSObject** aNewScope) { MOZ_ASSERT(aOldDocument); MOZ_ASSERT(aNewDocument); *aCx = nullptr; *aNewScope = nullptr; @@ -6211,16 +6230,19 @@ GetContextAndScope(nsIDocument* aOldDocu NS_WARNING("No context reachable in GetContextAndScopes()!"); return NS_ERROR_NOT_AVAILABLE; } } } } + if (cx) { + aPusher.Push(cx); + } if (!newScope && cx) { JS::Value v; nsresult rv = nsContentUtils::WrapNative(cx, global, aNewDocument, aNewDocument, &v); NS_ENSURE_SUCCESS(rv, rv); newScope = JSVAL_TO_OBJECT(v); } @@ -6344,18 +6366,19 @@ nsIDocument::AdoptNode(nsINode& aAdopted } } nsCOMPtr<nsIDocument> oldDocument = adoptedNode->OwnerDoc(); bool sameDocument = oldDocument == this; JSContext *cx = nullptr; JSObject *newScope = nullptr; + nsCxPusher pusher; if (!sameDocument) { - rv = GetContextAndScope(oldDocument, this, &cx, &newScope); + rv = GetContextAndScope(oldDocument, this, pusher, &cx, &newScope); if (rv.Failed()) { return nullptr; } } nsCOMArray<nsINode> nodesWithProperties; rv = nsNodeUtils::Adopt(adoptedNode, sameDocument ? nullptr : mNodeInfoManager, cx, newScope, nodesWithProperties); @@ -6819,17 +6842,17 @@ nsDocument::IsScriptEnabled() NS_ENSURE_TRUE(sm, false); nsIScriptGlobalObject* globalObject = GetScriptGlobalObject(); NS_ENSURE_TRUE(globalObject, false); nsIScriptContext *scriptContext = globalObject->GetContext(); NS_ENSURE_TRUE(scriptContext, false); - JSContext* cx = scriptContext->GetNativeContext(); + AutoPushJSContext cx(scriptContext->GetNativeContext()); NS_ENSURE_TRUE(cx, false); bool enabled; nsresult rv = sm->CanExecuteScripts(cx, NodePrincipal(), &enabled); NS_ENSURE_SUCCESS(rv, false); return enabled; } @@ -8537,17 +8560,17 @@ nsDocument::GetStateObject(nsIVariant** // Get the document's current state object. This is the object backing both // history.state and popStateEvent.state. // // mStateObjectContainer may be null; this just means that there's no // current state object. nsCOMPtr<nsIVariant> stateObj; if (!mStateObjectCached && mStateObjectContainer) { - JSContext *cx = nsContentUtils::GetContextFromDocument(this); + AutoPushJSContext cx(nsContentUtils::GetContextFromDocument(this)); mStateObjectContainer-> DeserializeToVariant(cx, getter_AddRefs(mStateObjectCached)); } NS_IF_ADDREF(*aState = mStateObjectCached); return NS_OK; }
--- a/content/base/src/nsFrameLoader.cpp +++ b/content/base/src/nsFrameLoader.cpp @@ -2358,17 +2358,17 @@ nsFrameLoader::EnsureMessageManager() mMessageManager->SetCallback(mRemoteBrowserShown ? this : nullptr); } return NS_OK; } nsIScriptContext* sctx = mOwnerContent->GetContextForEventHandlers(&rv); NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_STATE(sctx); - JSContext* cx = sctx->GetNativeContext(); + AutoPushJSContext cx(sctx->GetNativeContext()); NS_ENSURE_STATE(cx); nsCOMPtr<nsIDOMChromeWindow> chromeWindow = do_QueryInterface(GetOwnerDoc()->GetWindow()); nsCOMPtr<nsIMessageBroadcaster> parentManager; if (chromeWindow) { chromeWindow->GetMessageManager(getter_AddRefs(parentManager)); }
--- a/content/base/src/nsFrameMessageManager.cpp +++ b/content/base/src/nsFrameMessageManager.cpp @@ -646,17 +646,17 @@ nsFrameMessageManager::ReceiveMessage(ns continue; } JSObject* object = nullptr; wrappedJS->GetJSObject(&object); if (!object) { continue; } nsCxPusher pusher; - NS_ENSURE_STATE(pusher.Push(ctx, false)); + pusher.Push(ctx); JSAutoRequest ar(ctx); JSAutoCompartment ac(ctx, object); // The parameter for the listener function. JSObject* param = JS_NewObject(ctx, NULL, NULL, NULL); NS_ENSURE_TRUE(param, NS_ERROR_OUT_OF_MEMORY);
--- a/content/base/src/nsNodeIterator.cpp +++ b/content/base/src/nsNodeIterator.cpp @@ -14,16 +14,19 @@ #include "nsIDOMNodeFilter.h" #include "nsError.h" #include "nsIContent.h" #include "nsIDocument.h" #include "nsDOMClassInfoID.h" #include "nsContentUtils.h" #include "nsCOMPtr.h" +#include "mozilla/dom/NodeFilterBinding.h" + +using namespace mozilla::dom; /* * NodePointer implementation */ nsNodeIterator::NodePointer::NodePointer(nsINode *aNode, bool aBeforeNode) : mNode(aNode), mBeforeNode(aBeforeNode) @@ -132,17 +135,17 @@ void nsNodeIterator::NodePointer::MoveBa } /* * Factories, constructors and destructors */ nsNodeIterator::nsNodeIterator(nsINode *aRoot, uint32_t aWhatToShow, - nsIDOMNodeFilter *aFilter) : + const NodeFilterHolder &aFilter) : nsTraversal(aRoot, aWhatToShow, aFilter), mDetached(false), mPointer(mRoot, true) { aRoot->AddMutationObserver(this); } nsNodeIterator::~nsNodeIterator() @@ -198,17 +201,17 @@ NS_IMETHODIMP nsNodeIterator::GetWhatToS return NS_OK; } /* readonly attribute nsIDOMNodeFilter filter; */ NS_IMETHODIMP nsNodeIterator::GetFilter(nsIDOMNodeFilter **aFilter) { NS_ENSURE_ARG_POINTER(aFilter); - NS_IF_ADDREF(*aFilter = mFilter); + *aFilter = mFilter.ToXPCOMCallback().get(); return NS_OK; } /* nsIDOMNode nextNode () raises (DOMException); */ NS_IMETHODIMP nsNodeIterator::NextNode(nsIDOMNode **_retval) { return NextOrPrevNode(&NodePointer::MoveToNext, _retval);
--- a/content/base/src/nsNodeIterator.h +++ b/content/base/src/nsNodeIterator.h @@ -25,17 +25,17 @@ class nsNodeIterator : public nsIDOMNode public nsStubMutationObserver { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_NSIDOMNODEITERATOR nsNodeIterator(nsINode *aRoot, uint32_t aWhatToShow, - nsIDOMNodeFilter *aFilter); + const mozilla::dom::NodeFilterHolder &aFilter); virtual ~nsNodeIterator(); NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsNodeIterator, nsIDOMNodeIterator) private: struct NodePointer {
--- a/content/base/src/nsObjectLoadingContent.cpp +++ b/content/base/src/nsObjectLoadingContent.cpp @@ -2565,16 +2565,18 @@ nsObjectLoadingContent::NotifyContentObj if (!sgo) return; nsIScriptContext *scx = sgo->GetContext(); if (!scx) return; JSContext *cx = scx->GetNativeContext(); + nsCxPusher pusher; + pusher.Push(cx); nsCOMPtr<nsIXPConnectWrappedNative> wrapper; nsContentUtils::XPConnect()-> GetWrappedNativeOfNativeObject(cx, sgo->GetGlobalJSObject(), thisContent, NS_GET_IID(nsISupports), getter_AddRefs(wrapper)); if (!wrapper) {
--- a/content/base/src/nsScriptLoader.cpp +++ b/content/base/src/nsScriptLoader.cpp @@ -817,46 +817,45 @@ nsScriptLoader::EvaluateScript(nsScriptL // Make sure context is a strong reference since we access it after // we've executed a script, which may cause all other references to // the context to go away. nsCOMPtr<nsIScriptContext> context = globalObject->GetScriptContext(); if (!context) { return NS_ERROR_FAILURE; } + AutoPushJSContext cx(context->GetNativeContext()); bool oldProcessingScriptTag = context->GetProcessingScriptTag(); context->SetProcessingScriptTag(true); // Update our current script. nsCOMPtr<nsIScriptElement> oldCurrent = mCurrentScript; mCurrentScript = aRequest->mElement; // It's very important to use aRequest->mURI, not the final URI of the channel // aRequest ended up getting script data from, as the script filename. nsAutoCString url; nsContentUtils::GetWrapperSafeScriptFilename(mDocument, aRequest->mURI, url); JSVersion version = JSVersion(aRequest->mJSVersion); if (version != JSVERSION_UNKNOWN) { - JS::CompileOptions options(context->GetNativeContext()); + JS::CompileOptions options(cx); options.setFileAndLine(url.get(), aRequest->mLineNo) .setVersion(JSVersion(aRequest->mJSVersion)); if (aRequest->mOriginPrincipal) { options.setOriginPrincipals(nsJSPrincipals::get(aRequest->mOriginPrincipal)); } rv = context->EvaluateString(aScript, *globalObject->GetGlobalJSObject(), options, /* aCoerceToString = */ false, nullptr); } // Put the old script back in case it wants to do anything else. mCurrentScript = oldCurrent; - JSContext *cx = nullptr; // Initialize this to keep GCC happy. - cx = context->GetNativeContext(); JSAutoRequest ar(cx); context->SetProcessingScriptTag(oldProcessingScriptTag); return rv; } void nsScriptLoader::ProcessPendingRequestsAsync() {
--- a/content/base/src/nsTraversal.cpp +++ b/content/base/src/nsTraversal.cpp @@ -5,22 +5,27 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsTraversal.h" #include "nsIDOMNode.h" #include "nsIDOMNodeFilter.h" #include "nsError.h" #include "nsINode.h" +#include "mozilla/dom/NodeFilterBinding.h" +#include "mozilla/AutoRestore.h" #include "nsGkAtoms.h" +using namespace mozilla; +using namespace mozilla::dom; + nsTraversal::nsTraversal(nsINode *aRoot, uint32_t aWhatToShow, - nsIDOMNodeFilter *aFilter) : + const NodeFilterHolder &aFilter) : mRoot(aRoot), mWhatToShow(aWhatToShow), mFilter(aFilter), mInAcceptNode(false) { NS_ASSERTION(aRoot, "invalid root in call to nsTraversal constructor"); } @@ -35,29 +40,35 @@ nsTraversal::~nsTraversal() * @param aNode Node to test * @param _filtered Returned filtervalue. See nsIDOMNodeFilter.idl * @returns Errorcode */ nsresult nsTraversal::TestNode(nsINode* aNode, int16_t* _filtered) { NS_ENSURE_TRUE(!mInAcceptNode, NS_ERROR_DOM_INVALID_STATE_ERR); - nsresult rv; - *_filtered = nsIDOMNodeFilter::FILTER_SKIP; uint16_t nodeType = aNode->NodeType(); if (nodeType <= 12 && !((1 << (nodeType-1)) & mWhatToShow)) { return NS_OK; } - if (mFilter) { - nsCOMPtr<nsIDOMNode> domNode = do_QueryInterface(aNode); - mInAcceptNode = true; - rv = mFilter->AcceptNode(domNode, _filtered); - mInAcceptNode = false; - return rv; + if (!mFilter.GetISupports()) { + // No filter, just accept + *_filtered = nsIDOMNodeFilter::FILTER_ACCEPT; + return NS_OK; } - *_filtered = nsIDOMNodeFilter::FILTER_ACCEPT; - return NS_OK; + if (mFilter.HasWebIDLCallback()) { + AutoRestore<bool> inAcceptNode(mInAcceptNode); + mInAcceptNode = true; + ErrorResult res; + *_filtered = mFilter.GetWebIDLCallback()->AcceptNode(*aNode, res); + return res.ErrorCode(); + } + + nsCOMPtr<nsIDOMNode> domNode = do_QueryInterface(aNode); + AutoRestore<bool> inAcceptNode(mInAcceptNode); + mInAcceptNode = true; + return mFilter.GetXPCOMCallback()->AcceptNode(domNode, _filtered); }
--- a/content/base/src/nsTraversal.h +++ b/content/base/src/nsTraversal.h @@ -7,32 +7,34 @@ /* * Implementation of DOM Traversal's nsIDOMTreeWalker */ #ifndef nsTraversal_h___ #define nsTraversal_h___ #include "nsCOMPtr.h" +#include "nsIDocument.h" +#include "mozilla/dom/CallbackObject.h" class nsINode; class nsIDOMNodeFilter; class nsTraversal { public: nsTraversal(nsINode *aRoot, uint32_t aWhatToShow, - nsIDOMNodeFilter *aFilter); + const mozilla::dom::NodeFilterHolder &aFilter); virtual ~nsTraversal(); protected: nsCOMPtr<nsINode> mRoot; uint32_t mWhatToShow; - nsCOMPtr<nsIDOMNodeFilter> mFilter; + mozilla::dom::NodeFilterHolder mFilter; bool mInAcceptNode; /* * Tests if and how a node should be filtered. Uses mWhatToShow and * mFilter to test the node. * @param aNode Node to test * @param _filtered Returned filtervalue. See nsIDOMNodeFilter.idl * @returns Errorcode
--- a/content/base/src/nsTreeWalker.cpp +++ b/content/base/src/nsTreeWalker.cpp @@ -11,24 +11,27 @@ #include "nsTreeWalker.h" #include "nsIDOMNode.h" #include "nsIDOMNodeFilter.h" #include "nsError.h" #include "nsINode.h" #include "nsDOMClassInfoID.h" #include "nsContentUtils.h" +#include "mozilla/dom/NodeFilterBinding.h" + +using namespace mozilla::dom; /* * Factories, constructors and destructors */ nsTreeWalker::nsTreeWalker(nsINode *aRoot, uint32_t aWhatToShow, - nsIDOMNodeFilter *aFilter) : + const NodeFilterHolder &aFilter) : nsTraversal(aRoot, aWhatToShow, aFilter), mCurrentNode(aRoot) { } nsTreeWalker::~nsTreeWalker() { /* destructor code */ @@ -77,17 +80,17 @@ NS_IMETHODIMP nsTreeWalker::GetWhatToSho return NS_OK; } /* readonly attribute nsIDOMNodeFilter filter; */ NS_IMETHODIMP nsTreeWalker::GetFilter(nsIDOMNodeFilter * *aFilter) { NS_ENSURE_ARG_POINTER(aFilter); - NS_IF_ADDREF(*aFilter = mFilter); + *aFilter = mFilter.ToXPCOMCallback().get(); return NS_OK; } /* attribute nsIDOMNode currentNode; */ NS_IMETHODIMP nsTreeWalker::GetCurrentNode(nsIDOMNode * *aCurrentNode) { if (mCurrentNode) {
--- a/content/base/src/nsTreeWalker.h +++ b/content/base/src/nsTreeWalker.h @@ -24,17 +24,17 @@ class nsIDOMNodeFilter; class nsTreeWalker : public nsIDOMTreeWalker, public nsTraversal { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_NSIDOMTREEWALKER nsTreeWalker(nsINode *aRoot, uint32_t aWhatToShow, - nsIDOMNodeFilter *aFilter); + const mozilla::dom::NodeFilterHolder &aFilter); virtual ~nsTreeWalker(); NS_DECL_CYCLE_COLLECTION_CLASS(nsTreeWalker) private: nsCOMPtr<nsINode> mCurrentNode; /*
--- a/content/base/test/Makefile.in +++ b/content/base/test/Makefile.in @@ -546,19 +546,16 @@ MOCHITEST_FILES_C= \ test_bug707142.html \ file_bug707142_baseline.json \ file_bug707142_bom.json \ file_bug707142_utf-16.json \ test_reentrant_flush.html \ test_bug708620.html \ file_bug708620.html \ file_bug708620-2.html \ - test_XHR_timeout.html \ - test_XHR_timeout.js \ - file_XHR_timeout.sjs \ test_bug717511.html \ file_bug717511.html \ file_bug717511.html^headers^ \ file_bug717511_2.html \ file_bug717511_2.html^headers^ \ test_bug726364.html \ test_bug698381.html \ test_bug711047.html \ @@ -658,14 +655,19 @@ MOCHITEST_FILES_PARTS = $(foreach s,A B # Disabled for now. Mochitest isn't reliable enough for these. # test_bug444546.html \ # bug444546.sjs \ # Disabled due to making the harness time out # test_bug503473.html \ # file_bug503473-frame.sjs \ +# Disabled for frequent failures (bug 841505, bug 842344, etc) +# test_XHR_timeout.html \ +# test_XHR_timeout.js \ +# file_XHR_timeout.sjs \ + MOCHITEST_BROWSER_FILES = \ browser_bug593387.js \ $(NULL) include $(topsrcdir)/config/rules.mk
--- a/content/base/test/test_mutationobservers.html +++ b/content/base/test/test_mutationobservers.html @@ -13,17 +13,17 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=641821">Mozilla Bug 641821</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Win") != 0) { +if (!navigator.platform.startsWith("Win")) { // for non-Windows SimpleTest.expectAssertions(1); } /** Test for Bug 641821 **/ var div = document.createElement("div"); @@ -568,16 +568,23 @@ function testExpandos() { observer.disconnect(); then(); }); m2.expandoProperty = true; m2.observe(div, { attributes: true }); m2 = null; if (SpecialPowers) { // Run GC several times to see if the expando property disappears. + + // Also, garbage collecting the windows created in this test can + // cause assertions, so we must GC now to blame those assertions to + // this test. + // ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow, + // bug 600703) + SpecialPowers.gc(); SpecialPowers.gc(); SpecialPowers.gc(); SpecialPowers.gc(); } div.setAttribute("foo", "bar2"); }
--- a/content/events/src/nsEventListenerManager.cpp +++ b/content/events/src/nsEventListenerManager.cpp @@ -813,18 +813,18 @@ nsEventListenerManager::CompileEventHand nsIURI *uri = doc->GetDocumentURI(); if (uri) { uri->GetSpec(url); lineNo = 1; } } nsCxPusher pusher; - if (aNeedsCxPush && !pusher.Push(cx)) { - return NS_ERROR_FAILURE; + if (aNeedsCxPush) { + pusher.Push(cx); } uint32_t argCount; const char **argNames; // If no content, then just use kNameSpaceID_None for the // namespace ID. In practice, it doesn't matter since SVG is // the only thing with weird arg names and SVG doesn't map event // listeners to the window.
new file mode 100644 --- /dev/null +++ b/content/html/content/src/HTMLDataElement.cpp @@ -0,0 +1,56 @@ +/* -*- Mode: C++; 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 "HTMLDataElement.h" +#include "mozilla/dom/HTMLDataElementBinding.h" +#include "nsGenericHTMLElement.h" + +NS_IMPL_NS_NEW_HTML_ELEMENT(Data) + +namespace mozilla { +namespace dom { + +HTMLDataElement::HTMLDataElement(already_AddRefed<nsINodeInfo> aNodeInfo) + : nsGenericHTMLElement(aNodeInfo) +{ + SetIsDOMBinding(); +} + +HTMLDataElement::~HTMLDataElement() +{ +} + +NS_IMPL_ADDREF_INHERITED(HTMLDataElement, Element) +NS_IMPL_RELEASE_INHERITED(HTMLDataElement, Element) + +NS_INTERFACE_TABLE_HEAD(HTMLDataElement) + NS_HTML_CONTENT_INTERFACE_TABLE0(HTMLDataElement) + NS_HTML_CONTENT_INTERFACE_TABLE_TO_MAP_SEGUE(HTMLDataElement, + nsGenericHTMLElement) +NS_HTML_CONTENT_INTERFACE_MAP_END + +NS_IMPL_ELEMENT_CLONE(HTMLDataElement) + +JSObject* +HTMLDataElement::WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) +{ + return HTMLDataElementBinding::Wrap(aCx, aScope, this, aTriedToWrap); +} + +void +HTMLDataElement::GetItemValueText(nsAString& text) +{ + GetValue(text); +} + +void +HTMLDataElement::SetItemValueText(const nsAString& text) +{ + ErrorResult rv; + SetValue(text, rv); +} + +} // namespace dom +} // namespace mozilla
new file mode 100644 --- /dev/null +++ b/content/html/content/src/HTMLDataElement.h @@ -0,0 +1,59 @@ +/* -*- Mode: C++; 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/. */ + +#ifndef mozilla_dom_HTMLDataElement_h +#define mozilla_dom_HTMLDataElement_h + +#include "nsIDOMHTMLElement.h" +#include "nsGenericHTMLElement.h" +#include "nsGkAtoms.h" + +namespace mozilla { +namespace dom { + +class HTMLDataElement MOZ_FINAL : public nsGenericHTMLElement, + public nsIDOMHTMLElement +{ +public: + HTMLDataElement(already_AddRefed<nsINodeInfo> aNodeInfo); + virtual ~HTMLDataElement(); + + // nsISupports + NS_DECL_ISUPPORTS_INHERITED + + // nsIDOMNode + NS_FORWARD_NSIDOMNODE_TO_NSINODE + + // nsIDOMElement + NS_FORWARD_NSIDOMELEMENT_TO_GENERIC + + // nsIDOMHTMLElement + NS_FORWARD_NSIDOMHTMLELEMENT_TO_GENERIC + + // HTMLDataElement WebIDL + void GetValue(nsAString& aValue) + { + GetHTMLAttr(nsGkAtoms::value, aValue); + } + + void SetValue(const nsAString& aValue, ErrorResult& aError) + { + SetHTMLAttr(nsGkAtoms::value, aValue, aError); + } + + virtual void GetItemValueText(nsAString& text); + virtual void SetItemValueText(const nsAString& text); + virtual nsresult Clone(nsINodeInfo* aNodeInfo, nsINode** aResult) const; + virtual nsIDOMNode* AsDOMNode() { return this; } + +protected: + virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope, + bool* aTriedToWrap) MOZ_OVERRIDE; +}; + +} // namespace dom +} // namespace mozilla + +#endif // mozilla_dom_HTMLDataElement_h
--- a/content/html/content/src/HTMLFrameElement.h +++ b/content/html/content/src/HTMLFrameElement.h @@ -14,16 +14,18 @@ class nsIDOMDocument; namespace mozilla { namespace dom { class HTMLFrameElement : public nsGenericHTMLFrameElement, public nsIDOMHTMLFrameElement { public: + using nsGenericHTMLFrameElement::SwapFrameLoaders; + HTMLFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo, FromParser aFromParser = NOT_FROM_PARSER); virtual ~HTMLFrameElement(); // nsISupports NS_DECL_ISUPPORTS_INHERITED // nsIDOMNode
--- a/content/html/content/src/Makefile.in +++ b/content/html/content/src/Makefile.in @@ -29,16 +29,17 @@ EXPORTS = \ EXPORTS_NAMESPACES = mozilla/dom EXPORTS_mozilla/dom = \ HTMLAnchorElement.h \ HTMLAreaElement.h \ HTMLBodyElement.h \ HTMLBRElement.h \ HTMLButtonElement.h \ + HTMLDataElement.h \ HTMLDataListElement.h \ HTMLDivElement.h \ HTMLFieldSetElement.h \ HTMLFontElement.h \ HTMLFrameElement.h \ HTMLFrameSetElement.h \ HTMLHeadingElement.h \ HTMLHRElement.h \ @@ -89,16 +90,17 @@ CPPSRCS = \ nsTextEditorState.cpp \ HTMLElement.cpp \ HTMLAnchorElement.cpp \ HTMLAreaElement.cpp \ HTMLBRElement.cpp \ HTMLBodyElement.cpp \ HTMLButtonElement.cpp \ HTMLCanvasElement.cpp \ + HTMLDataElement.cpp \ HTMLDataListElement.cpp \ HTMLDivElement.cpp \ HTMLFieldSetElement.cpp \ HTMLFontElement.cpp \ nsHTMLFormElement.cpp \ HTMLFrameElement.cpp \ HTMLFrameSetElement.cpp \ HTMLHRElement.cpp \
--- a/content/html/content/src/nsGenericHTMLElement.cpp +++ b/content/html/content/src/nsGenericHTMLElement.cpp @@ -776,18 +776,20 @@ nsGenericHTMLElement::GetHrefURIForAncho nsresult nsGenericHTMLElement::BeforeSetAttr(int32_t aNamespaceID, nsIAtom* aName, const nsAttrValueOrString* aValue, bool aNotify) { if (aNamespaceID == kNameSpaceID_None && aName == nsGkAtoms::dir && - HasDirAuto()) { - // setting dir on an element that currently has dir=auto + HasDirAuto() && !AncestorHasDirAuto()) { + // When setting dir on an element that currently has dir=auto, we walk the + // descendant tree and clear the AncestorHasDirAuto flag; unless this + // element itself has the AncestorHasDirAuto flag WalkDescendantsClearAncestorDirAuto(this); SetHasDirAuto(); } return nsGenericHTMLElementBase::BeforeSetAttr(aNamespaceID, aName, aValue, aNotify); }
--- a/content/html/content/src/nsGenericHTMLElement.h +++ b/content/html/content/src/nsGenericHTMLElement.h @@ -1910,16 +1910,17 @@ NS_DECLARE_NS_NEW_HTML_ELEMENT(Area) #if defined(MOZ_MEDIA) NS_DECLARE_NS_NEW_HTML_ELEMENT(Audio) #endif NS_DECLARE_NS_NEW_HTML_ELEMENT(BR) NS_DECLARE_NS_NEW_HTML_ELEMENT(Body) NS_DECLARE_NS_NEW_HTML_ELEMENT(Button) NS_DECLARE_NS_NEW_HTML_ELEMENT(Canvas) NS_DECLARE_NS_NEW_HTML_ELEMENT(Mod) +NS_DECLARE_NS_NEW_HTML_ELEMENT(Data) NS_DECLARE_NS_NEW_HTML_ELEMENT(DataList) NS_DECLARE_NS_NEW_HTML_ELEMENT(Div) NS_DECLARE_NS_NEW_HTML_ELEMENT(FieldSet) NS_DECLARE_NS_NEW_HTML_ELEMENT(Font) NS_DECLARE_NS_NEW_HTML_ELEMENT(Form) NS_DECLARE_NS_NEW_HTML_ELEMENT(Frame) NS_DECLARE_NS_NEW_HTML_ELEMENT(FrameSet) NS_DECLARE_NS_NEW_HTML_ELEMENT(HR)
--- a/content/html/content/src/nsGenericHTMLFrameElement.cpp +++ b/content/html/content/src/nsGenericHTMLFrameElement.cpp @@ -4,16 +4,17 @@ /* 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 "nsGenericHTMLFrameElement.h" #include "nsIInterfaceRequestorUtils.h" #include "nsContentUtils.h" #include "mozilla/Preferences.h" +#include "mozilla/ErrorResult.h" #include "nsIAppsService.h" #include "nsServiceManagerUtils.h" #include "nsIDOMApplicationRegistry.h" #include "nsIPermissionManager.h" #include "sampler.h" using namespace mozilla; using namespace mozilla::dom; @@ -389,8 +390,16 @@ nsGenericHTMLFrameElement::DisallowCreat NS_IMETHODIMP nsGenericHTMLFrameElement::AllowCreateFrameLoader() { MOZ_ASSERT(!mFrameLoader); MOZ_ASSERT(mFrameLoaderCreationDisallowed); mFrameLoaderCreationDisallowed = false; return NS_OK; } + +void +nsGenericHTMLFrameElement::SwapFrameLoaders(nsXULElement& aOtherOwner, + ErrorResult& aError) +{ + aError.Throw(NS_ERROR_NOT_IMPLEMENTED); +} +
--- a/content/html/content/src/nsGenericHTMLFrameElement.h +++ b/content/html/content/src/nsGenericHTMLFrameElement.h @@ -4,19 +4,22 @@ /* 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 "nsGenericHTMLElement.h" #include "nsIFrameLoader.h" #include "nsIMozBrowserFrame.h" #include "nsIDOMEventListener.h" +#include "mozilla/ErrorResult.h" #include "nsFrameLoader.h" +class nsXULElement; + /** * A helper class for frame elements */ class nsGenericHTMLFrameElement : public nsGenericHTMLElement, public nsIFrameLoaderOwner, public nsIMozBrowserFrame { public: @@ -55,16 +58,18 @@ public: nsresult CopyInnerTo(mozilla::dom::Element* aDest); virtual int32_t TabIndexDefault() MOZ_OVERRIDE; NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(nsGenericHTMLFrameElement, nsGenericHTMLElement) + void SwapFrameLoaders(nsXULElement& aOtherOwner, mozilla::ErrorResult& aError); + protected: /** * Listens to titlechanged events from the document inside the iframe and * forwards them along to the iframe so it can fire a mozbrowsertitlechange * event if appropriate. */ class TitleChangedListener MOZ_FINAL : public nsIDOMEventListener {
--- a/content/html/content/src/nsHTMLAudioElement.cpp +++ b/content/html/content/src/nsHTMLAudioElement.cpp @@ -10,20 +10,27 @@ #include "nsGkAtoms.h" #include "nsIDocument.h" #include "jsfriendapi.h" #include "nsContentUtils.h" #include "nsJSUtils.h" #include "AudioSampleFormat.h" #include "AudioChannelCommon.h" #include <algorithm> +#include "mozilla/Preferences.h" using namespace mozilla; using namespace mozilla::dom; +static bool +IsAudioAPIEnabled() +{ + return Preferences::GetBool("media.audio_data.enabled", true); +} + nsGenericHTMLElement* NS_NewHTMLAudioElement(already_AddRefed<nsINodeInfo> aNodeInfo, FromParser aFromParser) { /* * nsHTMLAudioElement's will be created without a nsINodeInfo passed in * if someone says "var audio = new Audio();" in JavaScript, in a case like * that we request the nsINodeInfo from the document's nodeinfo list. @@ -96,16 +103,20 @@ nsHTMLAudioElement::Initialize(nsISuppor // The only (optional) argument is the src of the audio (which must // be a URL string), used to initialize the 'src' attribute. return SetSrc(str); } NS_IMETHODIMP nsHTMLAudioElement::MozSetup(uint32_t aChannels, uint32_t aRate) { + if (!IsAudioAPIEnabled()) { + return NS_ERROR_DOM_NOT_SUPPORTED_ERR; + } + // If there is already a src provided, don't setup another stream if (mDecoder) { return NS_ERROR_FAILURE; } // MozWriteAudio divides by mChannels, so validate now. if (0 == aChannels) { return NS_ERROR_FAILURE; @@ -127,16 +138,20 @@ nsHTMLAudioElement::MozSetup(uint32_t aC mAudioStream->SetVolume(mVolume); return NS_OK; } NS_IMETHODIMP nsHTMLAudioElement::MozWriteAudio(const JS::Value& aData, JSContext* aCx, uint32_t* aRetVal) { + if (!IsAudioAPIEnabled()) { + return NS_ERROR_DOM_NOT_SUPPORTED_ERR; + } + if (!mAudioStream) { return NS_ERROR_DOM_INVALID_STATE_ERR; } if (!aData.isObject()) { return NS_ERROR_DOM_TYPE_MISMATCH_ERR; } @@ -185,16 +200,20 @@ nsHTMLAudioElement::MozWriteAudio(const // Return the actual amount written. *aRetVal = writeLen * mChannels; return rv; } NS_IMETHODIMP nsHTMLAudioElement::MozCurrentSampleOffset(uint64_t *aRetVal) { + if (!IsAudioAPIEnabled()) { + return NS_ERROR_DOM_NOT_SUPPORTED_ERR; + } + if (!mAudioStream) { return NS_ERROR_DOM_INVALID_STATE_ERR; } int64_t position = mAudioStream->GetPositionInFrames(); if (position < 0) { *aRetVal = 0; } else {
--- a/content/html/content/src/nsHTMLMediaElement.cpp +++ b/content/html/content/src/nsHTMLMediaElement.cpp @@ -2182,16 +2182,21 @@ nsHTMLMediaElement::CanPlayType(const ns case CANPLAY_YES: aResult.AssignLiteral("probably"); break; default: case CANPLAY_MAYBE: aResult.AssignLiteral("maybe"); break; } + + LOG(PR_LOG_DEBUG, ("%p CanPlayType(%s) = \"%s\"", this, + NS_ConvertUTF16toUTF8(aType).get(), + NS_ConvertUTF16toUTF8(aResult).get())); + return NS_OK; } already_AddRefed<MediaDecoder> nsHTMLMediaElement::CreateDecoder(const nsACString& aType) { // If you change this list to add support for new decoders for codecs that // can be used by <audio>, please consider updating MediaDecodeTask::CreateDecoder
--- a/content/html/content/test/Makefile.in +++ b/content/html/content/test/Makefile.in @@ -336,16 +336,17 @@ MOCHITEST_FILES = \ test_formelements.html \ test_rowscollection.html \ test_map_attributes_reflection.html \ test_meta_attributes_reflection.html \ test_mod_attributes_reflection.html \ test_mozaudiochannel.html \ test_style_attributes_reflection.html \ test_bug629801.html \ + test_bug839371.html \ $(NULL) MOCHITEST_BROWSER_FILES = \ browser_bug649778.js \ file_bug649778.html \ file_bug649778.html^headers^ \ $(NULL)
--- a/content/html/content/test/forms/test_meter_element.html +++ b/content/html/content/test/forms/test_meter_element.html @@ -16,17 +16,17 @@ https://bugzilla.mozilla.org/show_bug.cg <div id="content" style="visibility: hidden;"> <form id='f' method='get' target='submit_frame' action='foo'> <meter id='m' value=0.5></meter> </form> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 1); } else { SimpleTest.expectAssertions(1); } /** Test for <meter> **/ function checkFormIDLAttribute(aElement)
--- a/content/html/content/test/test_bug389797.html +++ b/content/html/content/test/test_bug389797.html @@ -121,16 +121,17 @@ HTML_TAG("br", "BR"); HTML_TAG("button", "Button"); HTML_TAG("canvas", "Canvas"); HTML_TAG("caption", "TableCaption"); HTML_TAG("center", ""); HTML_TAG("cite", ""); HTML_TAG("code", ""); HTML_TAG("col", "TableCol"); HTML_TAG("colgroup", "TableCol"); +HTML_TAG("data", "Data"); HTML_TAG("datalist", "DataList"); HTML_TAG("dd", ""); HTML_TAG("del", "Mod"); HTML_TAG("dfn", ""); HTML_TAG("dir", "Directory"); HTML_TAG("div", "Div"); HTML_TAG("dl", "DList"); HTML_TAG("dt", "");
--- a/content/html/content/test/test_bug523771.html +++ b/content/html/content/test/test_bug523771.html @@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg <form action="form_submit_server.sjs" target="target_iframe" id="form" method="POST" enctype="multipart/form-data"> <input id=singleFile name=singleFile type=file> <input id=multiFile name=multiFile type=file multiple> </form> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 1); } else { SimpleTest.expectAssertions(1); } var filesToKill = []; singleFileInput = document.getElementById('singleFile'); multiFileInput = document.getElementById('multiFile');
new file mode 100644 --- /dev/null +++ b/content/html/content/test/test_bug839371.html @@ -0,0 +1,53 @@ +<!DOCTYPE HTML> +<html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=839371 +--> +<head> + <title>Test for Bug 839371</title> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <script type="application/javascript" src="reflect.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> +</head> +<body> +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=839371">Mozilla Bug 839371</a> +<p id="display"></p> +<div id="content" style="display: none"> + +<div itemscope> + <data id="d1" itemprop="product-id" value="9678AOU879">The Instigator 2000</data> +</div> + +</div> +<pre id="test"> +<script type="application/javascript"> + +/** Test for Bug 839371 **/ + +var d1 = document.getElementById("d1"), + d2 = document.createElement("data"); + +// .value IDL +is(d1.value, "9678AOU879", "value property reflects content attribute"); +d1.value = "123"; +is(d1.value, "123", "value property can be set via setter"); + +// .itemValue getter for <data>'s microdata +var data = document.getItems()[0]; +is(data.properties["product-id"][0].itemValue, "123", "itemValue getter reflects value attribute"); + +// .itemValue setter uses value +data.properties["product-id"][0].itemValue = "456"; +is(data.properties["product-id"][0].value, "456", "setting itemValue updates value"); +is(data.properties["product-id"][0].itemValue, "456", "setting itemValue updates itemValue"); + +// .value reflects value attribute +reflectString({ + element: d2, + attribute: "value" +}); + +</script> +</pre> +</body> +</html>
--- a/content/html/content/test/test_fullscreen-api.html +++ b/content/html/content/test/test_fullscreen-api.html @@ -16,16 +16,18 @@ <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=545812">Mozilla Bug 545812</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script type="application/javascript"> +SimpleTest.expectAssertions(1); // bug 845552 + /** Tests for Bug 545812 **/ // Ensure the full-screen api is enabled, and will be disabled on test exit. SpecialPowers.setBoolPref("full-screen-api.enabled", true); // Disable the requirement for trusted contexts only, so the tests are easier // to write. SpecialPowers.setBoolPref("full-screen-api.allow-trusted-requests-only", false);
--- a/content/html/document/src/nsHTMLContentSink.cpp +++ b/content/html/document/src/nsHTMLContentSink.cpp @@ -1336,18 +1336,17 @@ IsScriptEnabled(nsIDocument *aDoc, nsIDo NS_ENSURE_TRUE(owner, true); globalObject = owner->GetScriptGlobalObject(); NS_ENSURE_TRUE(globalObject, true); } nsIScriptContext *scriptContext = globalObject->GetContext(); NS_ENSURE_TRUE(scriptContext, true); - - JSContext* cx = scriptContext->GetNativeContext(); + JSContext *cx = scriptContext->GetNativeContext(); NS_ENSURE_TRUE(cx, true); bool enabled = true; nsContentUtils::GetSecurityManager()-> CanExecuteScripts(cx, aDoc->NodePrincipal(), &enabled); return enabled; }
--- a/content/html/document/test/test_bug391777.html +++ b/content/html/document/test/test_bug391777.html @@ -8,22 +8,28 @@ https://bugzilla.mozilla.org/show_bug.cg <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> </head> <body> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=391777">Mozilla Bug 391777</a> <p id="display"></p> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Win") != 0) { +if (!navigator.platform.startsWith("Win")) { // not Windows - SimpleTest.expectAssertions(0, 1); + SimpleTest.expectAssertions(1); } /** Test for Bug 391777 **/ var arg = {}; arg.testVal = "foo"; var result = window.showModalDialog("javascript:window.returnValue = window.dialogArguments.testVal; window.close(); 'This window should close on its own.';", arg); ok(true, "We should get here without user interaction"); is(result, "foo", "Unexpected result from showModalDialog"); + +// Garbage collecting the windows created in this test can cause +// assertions, so GC now to blame those assertions to this test. +// ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow, +// bug 600703) +SpecialPowers.gc(); </script> </body> </html>
--- a/content/html/document/test/test_bug402680.html +++ b/content/html/document/test/test_bug402680.html @@ -16,20 +16,16 @@ https://bugzilla.mozilla.org/show_bug.cg <p id="display"></p> <div id="content"> <input type="text"> <textarea></textarea> </div> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Mac") == 0) { - SimpleTest.expectAssertions(0, 1); -} - /** Test for Bug 402680 **/ ok(activeElementIsNull, "Before document has body, active element should be null"); function testActiveElement() { ok(document.body == document.activeElement, "After page load body element should be the active element!");
--- a/content/html/document/test/test_bug403868.html +++ b/content/html/document/test/test_bug403868.html @@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=403868">Mozilla Bug 403868</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Mac") == 0) { - SimpleTest.expectAssertions(0, 1); -} - /** Test for Bug 403868 **/ function createSpan(id, insertionPoint) { var s = document.createElement("span"); s.id = id; $("content").insertBefore(s, insertionPoint); return s; }
--- a/content/html/document/test/test_bug446483.html +++ b/content/html/document/test/test_bug446483.html @@ -12,21 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=446483">Mozilla Bug 446483</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Win") != 0) { - // not Windows - SimpleTest.expectAssertions(0, 1); -} - /** Test for Bug 446483 **/ function gc() { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIDOMWindowUtils) .garbageCollect(); }
--- a/content/html/document/test/test_document-element-inserted.html +++ b/content/html/document/test/test_document-element-inserted.html @@ -6,17 +6,17 @@ <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> </head> <body> <iframe id = 'media'> </iframe> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 4); } SimpleTest.waitForExplicitFinish(); var loc; var observe = function(doc){ if (doc == media.contentDocument) {
--- a/content/media/BufferMediaResource.h +++ b/content/media/BufferMediaResource.h @@ -131,17 +131,17 @@ public: virtual nsresult GetCachedRanges(nsTArray<MediaByteRange>& aRanges) { aRanges.AppendElement(MediaByteRange(0, mLength)); return NS_OK; } bool IsTransportSeekable() MOZ_OVERRIDE { return true; } - virtual const nsACString& GetContentType() const MOZ_OVERRIDE + virtual const nsCString& GetContentType() const MOZ_OVERRIDE { return mContentType; } private: const uint8_t * mBuffer; uint32_t mLength; uint32_t mOffset;
--- a/content/media/MediaResource.h +++ b/content/media/MediaResource.h @@ -366,17 +366,17 @@ public: virtual void FlushCache() { } // Notify that the last data byte range was loaded. virtual void NotifyLastByteRange() { } // Returns the content type of the resource. This is copied from the // nsIChannel when the MediaResource is created. Safe to call from // any thread. - virtual const nsACString& GetContentType() const = 0; + virtual const nsCString& GetContentType() const = 0; }; class BaseMediaResource : public MediaResource { public: virtual nsIURI* URI() const { return mURI; } virtual void MoveLoadsToBackground(); protected: @@ -393,17 +393,17 @@ protected: MOZ_COUNT_CTOR(BaseMediaResource); NS_ASSERTION(!mContentType.IsEmpty(), "Must know content type"); } virtual ~BaseMediaResource() { MOZ_COUNT_DTOR(BaseMediaResource); } - virtual const nsACString& GetContentType() const MOZ_OVERRIDE + virtual const nsCString& GetContentType() const MOZ_OVERRIDE { return mContentType; } // Set the request's load flags to aFlags. If the request is part of a // load group, the request is removed from the group, the flags are set, and // then the request is added back to the load group. void ModifyLoadFlags(nsLoadFlags aFlags);
--- a/content/media/test/can_play_type_mpeg.js +++ b/content/media/test/can_play_type_mpeg.js @@ -2,26 +2,42 @@ function check_mp4(v, enabled) { function check(type, expected) { var ex = enabled ? expected : ""; is(v.canPlayType(type), ex, type + "='" + ex + "'"); } check("video/mp4", "maybe"); check("audio/mp4", "maybe"); check("audio/mpeg", "maybe"); + check("audio/mp3", "maybe"); + check("audio/x-m4a", "maybe"); + + // Not the MIME type that other browsers respond to, so we won't either. + check("audio/m4a", ""); + // Only Safari responds affirmatively to "audio/aac", + // so we'll let x-m4a cover aac support. + check("audio/aac", ""); check("video/mp4; codecs=\"avc1.42E01E, mp4a.40.2\"", "probably"); check("video/mp4; codecs=\"avc1.42001E, mp4a.40.2\"", "probably"); check("video/mp4; codecs=\"avc1.58A01E, mp4a.40.2\"", "probably"); check("video/mp4; codecs=\"avc1.4D401E, mp4a.40.2\"", "probably"); check("video/mp4; codecs=\"avc1.64001E, mp4a.40.2\"", "probably"); check("video/mp4; codecs=\"avc1.64001F, mp4a.40.2\"", "probably"); check("video/mp4; codecs=\"avc1.42E01E\"", "probably"); check("video/mp4; codecs=\"avc1.42001E\"", "probably"); check("video/mp4; codecs=\"avc1.58A01E\"", "probably"); check("video/mp4; codecs=\"avc1.4D401E\"", "probably"); check("video/mp4; codecs=\"avc1.64001E\"", "probably"); check("video/mp4; codecs=\"avc1.64001F\"", "probably"); + check("audio/mpeg; codecs=\"mp3\"", "probably"); + check("audio/mpeg; codecs=mp3", "probably"); + + check("audio/mp3; codecs=\"mp3\"", "probably"); + check("audio/mp3; codecs=mp3", "probably"); + check("audio/mp4; codecs=\"mp4a.40.2\"", "probably"); check("audio/mp4; codecs=mp4a.40.2", "probably"); + check("audio/x-m4a; codecs=\"mp4a.40.2\"", "probably"); + check("audio/x-m4a; codecs=mp4a.40.2", "probably"); }
--- a/content/media/test/test_bug495300.html +++ b/content/media/test/test_bug495300.html @@ -10,17 +10,17 @@ https://bugzilla.mozilla.org/show_bug.cg <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> <script type="text/javascript" src="manifest.js"></script> </head> <body> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=495300">Mozilla Bug 495300</a> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Mac") != 0) { +if (!navigator.platform.startsWith("Mac")) { // not Mac SimpleTest.expectAssertions(0, 1); } var manager = new MediaTestManager; function filename(uri) { return uri.substr(uri.lastIndexOf("/")+1);
--- a/content/media/test/test_bug686942.html +++ b/content/media/test/test_bug686942.html @@ -10,17 +10,17 @@ https://bugzilla.mozilla.org/show_bug.cg <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> <script type="text/javascript" src="manifest.js"></script> </head> <body> <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=686942">Mozilla Bug 686942</a> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 1); } var manager = new MediaTestManager; function onloaded(event) { var v = event.target; v.currentTime = v.duration;
--- a/content/media/test/test_playback_rate.html +++ b/content/media/test/test_playback_rate.html @@ -5,17 +5,17 @@ <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> <script type="text/javascript" src="manifest.js"></script> </head> <body> <pre id="test"> <script class="testbody" type='application/javascript;version=1.8'> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 1); } let manager = new MediaTestManager; function rangeCheck(lhs, rhs, threshold) { var diff = Math.abs(lhs - rhs); if (diff < threshold) {
--- a/content/media/test/test_seek_out_of_range.html +++ b/content/media/test/test_seek_out_of_range.html @@ -5,17 +5,17 @@ <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> <script type="text/javascript" src="manifest.js"></script> </head> <body> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 1); } var manager = new MediaTestManager; // Test if the ended event works correctly. function startTest(e) {
--- a/content/media/webaudio/MediaBufferDecoder.cpp +++ b/content/media/webaudio/MediaBufferDecoder.cpp @@ -658,17 +658,17 @@ MediaDecodeTask::CallbackTheResult() bool WebAudioDecodeJob::FinalizeBufferData() { MOZ_ASSERT(NS_IsMainThread()); MOZ_ASSERT(mOutput); MOZ_ASSERT(mChannels == mChannelBuffers.Length()); - JSContext* cx = GetJSContext(); + AutoPushJSContext cx(GetJSContext()); if (!cx) { return false; } for (uint32_t i = 0; i < mChannels; ++i) { mOutput->SetChannelDataFromArrayBufferContents(cx, i, mChannelBuffers[i].first); } @@ -691,17 +691,17 @@ WebAudioDecodeJob::GetJSContext() const bool WebAudioDecodeJob::AllocateBuffer() { MOZ_ASSERT(!mOutput); MOZ_ASSERT(NS_IsMainThread()); // First, get a JSContext - JSContext* cx = GetJSContext(); + AutoPushJSContext cx(GetJSContext()); if (!cx) { return false; } // Now create the AudioBuffer mOutput = new AudioBuffer(mContext, mResampledFrames, mContext->SampleRate()); if (!mOutput->InitializeBuffers(mChannels, cx)) { return false;
--- a/content/media/wmf/WMFByteStream.cpp +++ b/content/media/wmf/WMFByteStream.cpp @@ -157,17 +157,17 @@ WMFByteStream::Init() if (!contentTypeUTF16.IsEmpty()) { HRESULT hr = wmf::MFCreateAttributes(byRef(mAttributes), 1); NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); hr = mAttributes->SetString(MF_BYTESTREAM_CONTENT_TYPE, contentTypeUTF16.get()); NS_ENSURE_TRUE(SUCCEEDED(hr), NS_ERROR_FAILURE); - LOG("WMFByteStream has Content-Type=%s", mResource->GetContentType()); + LOG("WMFByteStream has Content-Type=%s", mResource->GetContentType().get()); } return NS_OK; } nsresult WMFByteStream::Shutdown() { {
--- a/content/media/wmf/WMFDecoder.cpp +++ b/content/media/wmf/WMFDecoder.cpp @@ -21,38 +21,37 @@ MediaDecoderStateMachine* WMFDecoder::Cr bool WMFDecoder::GetSupportedCodecs(const nsACString& aType, char const *const ** aCodecList) { if (!MediaDecoder::IsWMFEnabled() || NS_FAILED(LoadDLLs())) return false; - // MP3 is specified to have no codecs in its "type" param: - // http://wiki.whatwg.org/wiki/Video_type_parameters#MPEG - // So specify an empty codecs list, so that if script specifies - // a "type" param with codecs, it will be reported as not supported - // as per the spec. + // Assume that if LoadDLLs() didn't fail, we can playback the types that + // we know should be supported on Windows 7+ using WMF. static char const *const mp3AudioCodecs[] = { + "mp3", nullptr }; - if (aType.EqualsASCII("audio/mpeg")) { + if (aType.EqualsASCII("audio/mpeg") || + aType.EqualsASCII("audio/mp3")) { if (aCodecList) { *aCodecList = mp3AudioCodecs; } - // Assume that if LoadDLLs() didn't fail, we can decode MP3. return true; } // AAC in M4A. static char const *const aacAudioCodecs[] = { "mp4a.40.2", // AAC-LC nullptr }; - if (aType.EqualsASCII("audio/mp4")) { + if (aType.EqualsASCII("audio/mp4") || + aType.EqualsASCII("audio/x-m4a")) { if (aCodecList) { *aCodecList = aacAudioCodecs; } return true; } // H.264 + AAC in MP4. static char const *const H264Codecs[] = {
--- a/content/svg/content/src/SVGMarkerElement.cpp +++ b/content/svg/content/src/SVGMarkerElement.cpp @@ -316,17 +316,17 @@ SVGMarkerElement::GetMarkerTransform(flo return gfxMatrix(cos(angle) * scale, sin(angle) * scale, -sin(angle) * scale, cos(angle) * scale, aX, aY); } nsSVGViewBoxRect SVGMarkerElement::GetViewBoxRect() { - if (mViewBox.IsExplicitlySet()) { + if (mViewBox.HasRect()) { return mViewBox.GetAnimValue(); } return nsSVGViewBoxRect( 0, 0, mLengthAttributes[MARKERWIDTH].GetAnimValue(mCoordCtx), mLengthAttributes[MARKERHEIGHT].GetAnimValue(mCoordCtx)); }
--- a/content/svg/content/src/SVGSVGElement.cpp +++ b/content/svg/content/src/SVGSVGElement.cpp @@ -842,22 +842,22 @@ SVGSVGElement::GetCurrentViewElement() c } return nullptr; } nsSVGViewBoxRect SVGSVGElement::GetViewBoxWithSynthesis( float aViewportWidth, float aViewportHeight) const { - // The logic here should match HasViewBox(). + // The logic here should match HasViewBoxRect(). SVGViewElement* viewElement = GetCurrentViewElement(); - if (viewElement && viewElement->mViewBox.IsExplicitlySet()) { + if (viewElement && viewElement->mViewBox.HasRect()) { return viewElement->mViewBox.GetAnimValue(); } - if (mViewBox.IsExplicitlySet()) { + if (mViewBox.HasRect()) { return mViewBox.GetAnimValue(); } if (ShouldSynthesizeViewBox()) { // Special case -- fake a viewBox, using height & width attrs. // (Use |this| as context, since if we get here, we're outermost <svg>.) return nsSVGViewBoxRect(0, 0, ComputeSynthesizedViewBoxDimension(mLengthAttributes[ATTR_WIDTH], @@ -880,21 +880,21 @@ SVGSVGElement::GetPreserveAspectRatioWit const SVGPreserveAspectRatio *pAROverridePtr = GetPreserveAspectRatioProperty(); if (pAROverridePtr) { return *pAROverridePtr; } } SVGViewElement* viewElement = GetCurrentViewElement(); - // This check is equivalent to "!HasViewBox() && ShouldSynthesizeViewBox()". - // We're just holding onto the viewElement that HasViewBox() would look up, + // This check is equivalent to "!HasViewBoxRect() && ShouldSynthesizeViewBox()". + // We're just holding onto the viewElement that HasViewBoxRect() would look up, // so that we don't have to look it up again later. - if (!((viewElement && viewElement->mViewBox.IsExplicitlySet()) || - mViewBox.IsExplicitlySet()) && + if (!((viewElement && viewElement->mViewBox.HasRect()) || + mViewBox.HasRect()) && ShouldSynthesizeViewBox()) { // If we're synthesizing a viewBox, use preserveAspectRatio="none"; return SVGPreserveAspectRatio(SVG_PRESERVEASPECTRATIO_NONE, SVG_MEETORSLICE_SLICE); } if (viewElement && viewElement->mPreserveAspectRatio.IsExplicitlySet()) { return viewElement->mPreserveAspectRatio.GetAnimValue(); } @@ -907,20 +907,20 @@ SVGSVGElement::GetPreserveAspectRatioWit float SVGSVGElement::GetLength(uint8_t aCtxType) { float h, w; SVGViewElement* viewElement = GetCurrentViewElement(); const nsSVGViewBoxRect* viewbox = nullptr; - // The logic here should match HasViewBox(). - if (viewElement && viewElement->mViewBox.IsExplicitlySet()) { + // The logic here should match HasViewBoxRect(). + if (viewElement && viewElement->mViewBox.HasRect()) { viewbox = &viewElement->mViewBox.GetAnimValue(); - } else if (mViewBox.IsExplicitlySet()) { + } else if (mViewBox.HasRect()) { viewbox = &mViewBox.GetAnimValue(); } if (viewbox) { w = viewbox->width; h = viewbox->height; } else if (IsInner()) { SVGSVGElement *ctx = GetCtx(); @@ -1024,29 +1024,29 @@ SVGSVGElement::GetViewBox() SVGAnimatedPreserveAspectRatio * SVGSVGElement::GetPreserveAspectRatio() { return &mPreserveAspectRatio; } bool -SVGSVGElement::HasViewBox() const +SVGSVGElement::HasViewBoxRect() const { SVGViewElement* viewElement = GetCurrentViewElement(); - if (viewElement && viewElement->mViewBox.IsExplicitlySet()) { + if (viewElement && viewElement->mViewBox.HasRect()) { return true; } - return mViewBox.IsExplicitlySet(); + return mViewBox.HasRect(); } bool SVGSVGElement::ShouldSynthesizeViewBox() const { - NS_ABORT_IF_FALSE(!HasViewBox(), + NS_ABORT_IF_FALSE(!HasViewBoxRect(), "Should only be called if we lack a viewBox"); nsIDocument* doc = GetCurrentDoc(); return doc && doc->IsBeingUsedAsImage() && !mIsPaintingSVGImageElement && !GetParent(); } @@ -1105,26 +1105,26 @@ void SVGSVGElement:: SetImageOverridePreserveAspectRatio(const SVGPreserveAspectRatio& aPAR) { #ifdef DEBUG NS_ABORT_IF_FALSE(GetCurrentDoc()->IsBeingUsedAsImage(), "should only override preserveAspectRatio in images"); #endif - bool hasViewBox = HasViewBox(); - if (!hasViewBox && ShouldSynthesizeViewBox()) { + bool hasViewBoxRect = HasViewBoxRect(); + if (!hasViewBoxRect && ShouldSynthesizeViewBox()) { // My non-<svg:image> clients will have been painting me with a synthesized // viewBox, but my <svg:image> client that's about to paint me now does NOT // want that. Need to tell ourselves to flush our transform. mImageNeedsTransformInvalidation = true; } mIsPaintingSVGImageElement = true; - if (!hasViewBox) { + if (!hasViewBoxRect) { return; // preserveAspectRatio irrelevant (only matters if we have viewBox) } if (aPAR.GetDefer() && HasPreserveAspectRatio()) { return; // Referring element defers to my own preserveAspectRatio value. } if (SetPreserveAspectRatioProperty(aPAR)) { @@ -1136,17 +1136,17 @@ void SVGSVGElement::ClearImageOverridePreserveAspectRatio() { #ifdef DEBUG NS_ABORT_IF_FALSE(GetCurrentDoc()->IsBeingUsedAsImage(), "should only override image preserveAspectRatio in images"); #endif mIsPaintingSVGImageElement = false; - if (!HasViewBox() && ShouldSynthesizeViewBox()) { + if (!HasViewBoxRect() && ShouldSynthesizeViewBox()) { // My non-<svg:image> clients will want to paint me with a synthesized // viewBox, but my <svg:image> client that just painted me did NOT // use that. Need to tell ourselves to flush our transform. mImageNeedsTransformInvalidation = true; } if (ClearPreserveAspectRatioProperty()) { mImageNeedsTransformInvalidation = true;
--- a/content/svg/content/src/SVGSVGElement.h +++ b/content/svg/content/src/SVGSVGElement.h @@ -149,29 +149,29 @@ public: * has a valid viewBox. * * Note that this does not check whether we need to synthesize a viewBox, * so you must call ShouldSynthesizeViewBox() if you need to check that too. * * Note also that this method does not pay attention to whether the width or * height values of the viewBox rect are positive! */ - bool HasViewBox() const; + bool HasViewBoxRect() const; /** * Returns true if we should synthesize a viewBox for ourselves (that is, if * we're the root element in an image document, and we're not currently being * painted for an <svg:image> element). * - * Only call this method if HasViewBox() returns false. + * Only call this method if HasViewBoxRect() returns false. */ bool ShouldSynthesizeViewBox() const; bool HasViewBoxOrSyntheticViewBox() const { - return HasViewBox() || ShouldSynthesizeViewBox(); + return HasViewBoxRect() || ShouldSynthesizeViewBox(); } gfxMatrix GetViewBoxTransform() const; bool HasChildrenOnlyTransform() const { return mHasChildrenOnlyTransform; }
--- a/content/svg/content/src/SVGViewBoxSMILType.cpp +++ b/content/svg/content/src/SVGViewBoxSMILType.cpp @@ -13,18 +13,17 @@ namespace mozilla { /*static*/ SVGViewBoxSMILType SVGViewBoxSMILType::sSingleton; void SVGViewBoxSMILType::Init(nsSMILValue& aValue) const { NS_ABORT_IF_FALSE(aValue.IsNull(), "Unexpected value type"); - nsSVGViewBoxRect* viewBox = new nsSVGViewBoxRect(); - aValue.mU.mPtr = viewBox; + aValue.mU.mPtr = new nsSVGViewBoxRect(); aValue.mType = this; } void SVGViewBoxSMILType::Destroy(nsSMILValue& aValue) const { NS_PRECONDITION(aValue.mType == this, "Unexpected SMIL value"); delete static_cast<nsSVGViewBoxRect*>(aValue.mU.mPtr); @@ -79,16 +78,20 @@ SVGViewBoxSMILType::ComputeDistance(cons double& aDistance) const { NS_PRECONDITION(aFrom.mType == aTo.mType,"Trying to compare different types"); NS_PRECONDITION(aFrom.mType == this, "Unexpected source type"); const nsSVGViewBoxRect* from = static_cast<const nsSVGViewBoxRect*>(aFrom.mU.mPtr); const nsSVGViewBoxRect* to = static_cast<const nsSVGViewBoxRect*>(aTo.mU.mPtr); + if (from->none || to->none) { + return NS_ERROR_FAILURE; + } + // We use the distances between the edges rather than the difference between // the x, y, width and height for the "distance". This is necessary in // order for the "distance" result that we calculate to be the same for a // given change in the left side as it is for an equal change in the opposite // side. See https://bugzilla.mozilla.org/show_bug.cgi?id=541884#c12 float dLeft = to->x - from->x; float dTop = to->y - from->y; @@ -106,19 +109,24 @@ SVGViewBoxSMILType::Interpolate(const ns double aUnitDistance, nsSMILValue& aResult) const { NS_PRECONDITION(aStartVal.mType == aEndVal.mType, "Trying to interpolate different types"); NS_PRECONDITION(aStartVal.mType == this, "Unexpected types for interpolation"); NS_PRECONDITION(aResult.mType == this, "Unexpected result type"); - + const nsSVGViewBoxRect* start = static_cast<const nsSVGViewBoxRect*>(aStartVal.mU.mPtr); const nsSVGViewBoxRect* end = static_cast<const nsSVGViewBoxRect*>(aEndVal.mU.mPtr); + + if (start->none || end->none) { + return NS_ERROR_FAILURE; + } + nsSVGViewBoxRect* current = static_cast<nsSVGViewBoxRect*>(aResult.mU.mPtr); float x = (start->x + (end->x - start->x) * aUnitDistance); float y = (start->y + (end->y - start->y) * aUnitDistance); float width = (start->width + (end->width - start->width) * aUnitDistance); float height = (start->height + (end->height - start->height) * aUnitDistance); *current = nsSVGViewBoxRect(x, y, width, height);
--- a/content/svg/content/src/nsSVGViewBox.cpp +++ b/content/svg/content/src/nsSVGViewBox.cpp @@ -20,20 +20,22 @@ using namespace mozilla; /* Implementation of nsSVGViewBoxRect methods */ bool nsSVGViewBoxRect::operator==(const nsSVGViewBoxRect& aOther) const { if (&aOther == this) return true; - return x == aOther.x && - y == aOther.y && - width == aOther.width && - height == aOther.height; + return (none && aOther.none) || + (!none && !aOther.none && + x == aOther.x && + y == aOther.y && + width == aOther.width && + height == aOther.height); } /* Cycle collection macros for nsSVGViewBox */ NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGViewBox::DOMBaseVal, mSVGElement) NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGViewBox::DOMAnimVal, mSVGElement) NS_SVG_VAL_IMPL_CYCLE_COLLECTION(nsSVGViewBox::DOMAnimatedRect, mSVGElement) @@ -74,43 +76,46 @@ static nsSVGAttrTearoffTable<nsSVGViewBo sAnimSVGViewBoxTearoffTable; /* Implementation of nsSVGViewBox methods */ void nsSVGViewBox::Init() { - mBaseVal = nsSVGViewBoxRect(); + mHasBaseVal = false; mAnimVal = nullptr; - mHasBaseVal = false; } void -nsSVGViewBox::SetAnimValue(float aX, float aY, float aWidth, float aHeight, +nsSVGViewBox::SetAnimValue(const nsSVGViewBoxRect& aRect, nsSVGElement *aSVGElement) { if (!mAnimVal) { // it's okay if allocation fails - and no point in reporting that - mAnimVal = new nsSVGViewBoxRect(aX, aY, aWidth, aHeight); + mAnimVal = new nsSVGViewBoxRect(aRect); } else { - nsSVGViewBoxRect rect(aX, aY, aWidth, aHeight); - if (rect == *mAnimVal) { + if (aRect == *mAnimVal) { return; } - *mAnimVal = rect; + *mAnimVal = aRect; } aSVGElement->DidAnimateViewBox(); } void nsSVGViewBox::SetBaseValue(const nsSVGViewBoxRect& aRect, nsSVGElement *aSVGElement) { - if (mHasBaseVal && mBaseVal == aRect) { + if (!mHasBaseVal || mBaseVal == aRect) { + // This method is used to set a single x, y, width + // or height value. It can't create a base value + // as the other components may be undefined. We record + // the new value though, so as not to lose data. + mBaseVal = aRect; return; } nsAttrValue emptyOrOldValue = aSVGElement->WillChangeViewBox(); mBaseVal = aRect; mHasBaseVal = true; @@ -118,16 +123,21 @@ nsSVGViewBox::SetBaseValue(const nsSVGVi if (mAnimVal) { aSVGElement->AnimationNeedsResample(); } } static nsresult ToSVGViewBoxRect(const nsAString& aStr, nsSVGViewBoxRect *aViewBox) { + if (aStr.EqualsLiteral("none")) { + aViewBox->none = true; + return NS_OK; + } + nsCharSeparatedTokenizerTemplate<IsSVGWhitespace> tokenizer(aStr, ',', nsCharSeparatedTokenizer::SEPARATOR_OPTIONAL); float vals[NUM_VIEWBOX_COMPONENTS]; uint32_t i; for (i = 0; i < NUM_VIEWBOX_COMPONENTS && tokenizer.hasMoreTokens(); ++i) { NS_ConvertUTF16toUTF8 utf8Token(tokenizer.nextToken()); const char *token = utf8Token.get(); @@ -147,48 +157,59 @@ ToSVGViewBoxRect(const nsAString& aStr, tokenizer.lastTokenEndedWithSeparator()) { // Trailing comma. return NS_ERROR_DOM_SYNTAX_ERR; } aViewBox->x = vals[0]; aViewBox->y = vals[1]; aViewBox->width = vals[2]; aViewBox->height = vals[3]; + aViewBox->none = false; return NS_OK; } nsresult nsSVGViewBox::SetBaseValueString(const nsAString& aValue, nsSVGElement *aSVGElement, bool aDoSetAttr) { nsSVGViewBoxRect viewBox; - nsresult res = ToSVGViewBoxRect(aValue, &viewBox); - if (NS_SUCCEEDED(res)) { - nsAttrValue emptyOrOldValue; - if (aDoSetAttr) { - emptyOrOldValue = aSVGElement->WillChangeViewBox(); - } - mBaseVal = nsSVGViewBoxRect(viewBox.x, viewBox.y, viewBox.width, viewBox.height); - mHasBaseVal = true; + + nsresult rv = ToSVGViewBoxRect(aValue, &viewBox); + if (NS_FAILED(rv)) { + return rv; + } + if (viewBox == mBaseVal) { + return NS_OK; + } - if (aDoSetAttr) { - aSVGElement->DidChangeViewBox(emptyOrOldValue); - } - if (mAnimVal) { - aSVGElement->AnimationNeedsResample(); - } + nsAttrValue emptyOrOldValue; + if (aDoSetAttr) { + emptyOrOldValue = aSVGElement->WillChangeViewBox(); } - return res; + mHasBaseVal = true; + mBaseVal = viewBox; + + if (aDoSetAttr) { + aSVGElement->DidChangeViewBox(emptyOrOldValue); + } + if (mAnimVal) { + aSVGElement->AnimationNeedsResample(); + } + return NS_OK; } void nsSVGViewBox::GetBaseValueString(nsAString& aValue) const { + if (mBaseVal.none) { + aValue.AssignLiteral("none"); + return; + } PRUnichar buf[200]; nsTextFormatter::snprintf(buf, sizeof(buf)/sizeof(PRUnichar), NS_LITERAL_STRING("%g %g %g %g").get(), (double)mBaseVal.x, (double)mBaseVal.y, (double)mBaseVal.width, (double)mBaseVal.height); aValue.Assign(buf); } @@ -210,16 +231,20 @@ nsSVGViewBox::ToDOMAnimatedRect(nsIDOMSV nsSVGViewBox::DOMAnimatedRect::~DOMAnimatedRect() { sSVGAnimatedRectTearoffTable.RemoveTearoff(mVal); } nsresult nsSVGViewBox::ToDOMBaseVal(nsIDOMSVGRect **aResult, nsSVGElement *aSVGElement) { + if (!mHasBaseVal || mBaseVal.none) { + *aResult = nullptr; + return NS_OK; + } nsRefPtr<DOMBaseVal> domBaseVal = sBaseSVGViewBoxTearoffTable.GetTearoff(this); if (!domBaseVal) { domBaseVal = new DOMBaseVal(this, aSVGElement); sBaseSVGViewBoxTearoffTable.AddTearoff(this, domBaseVal); } domBaseVal.forget(aResult); @@ -229,16 +254,21 @@ nsSVGViewBox::ToDOMBaseVal(nsIDOMSVGRect nsSVGViewBox::DOMBaseVal::~DOMBaseVal() { sBaseSVGViewBoxTearoffTable.RemoveTearoff(mVal); } nsresult nsSVGViewBox::ToDOMAnimVal(nsIDOMSVGRect **aResult, nsSVGElement *aSVGElement) { + if ((mAnimVal && mAnimVal->none) || + (!mAnimVal && (!mHasBaseVal || mBaseVal.none))) { + *aResult = nullptr; + return NS_OK; + } nsRefPtr<DOMAnimVal> domAnimVal = sAnimSVGViewBoxTearoffTable.GetTearoff(this); if (!domAnimVal) { domAnimVal = new DOMAnimVal(this, aSVGElement); sAnimSVGViewBoxTearoffTable.AddTearoff(this, domAnimVal); } domAnimVal.forget(aResult); @@ -250,48 +280,44 @@ nsSVGViewBox::DOMAnimVal::~DOMAnimVal() sAnimSVGViewBoxTearoffTable.RemoveTearoff(mVal); } NS_IMETHODIMP nsSVGViewBox::DOMBaseVal::SetX(float aX) { nsSVGViewBoxRect rect = mVal->GetBaseValue(); rect.x = aX; - mVal->SetBaseValue(rect.x, rect.y, rect.width, rect.height, - mSVGElement); + mVal->SetBaseValue(rect, mSVGElement); return NS_OK; } NS_IMETHODIMP nsSVGViewBox::DOMBaseVal::SetY(float aY) { nsSVGViewBoxRect rect = mVal->GetBaseValue(); rect.y = aY; - mVal->SetBaseValue(rect.x, rect.y, rect.width, rect.height, - mSVGElement); + mVal->SetBaseValue(rect, mSVGElement); return NS_OK; } NS_IMETHODIMP nsSVGViewBox::DOMBaseVal::SetWidth(float aWidth) { nsSVGViewBoxRect rect = mVal->GetBaseValue(); rect.width = aWidth; - mVal->SetBaseValue(rect.x, rect.y, rect.width, rect.height, - mSVGElement); + mVal->SetBaseValue(rect, mSVGElement); return NS_OK; } NS_IMETHODIMP nsSVGViewBox::DOMBaseVal::SetHeight(float aHeight) { nsSVGViewBoxRect rect = mVal->GetBaseValue(); rect.height = aHeight; - mVal->SetBaseValue(rect.x, rect.y, rect.width, rect.height, - mSVGElement); + mVal->SetBaseValue(rect, mSVGElement); return NS_OK; } nsISMILAttr* nsSVGViewBox::ToSMILAttr(nsSVGElement *aSVGElement) { return new SMILViewBox(this, aSVGElement); } @@ -335,12 +361,12 @@ nsSVGViewBox::SMILViewBox::ClearAnimValu nsresult nsSVGViewBox::SMILViewBox::SetAnimValue(const nsSMILValue& aValue) { NS_ASSERTION(aValue.mType == &SVGViewBoxSMILType::sSingleton, "Unexpected type to assign animated value"); if (aValue.mType == &SVGViewBoxSMILType::sSingleton) { nsSVGViewBoxRect &vb = *static_cast<nsSVGViewBoxRect*>(aValue.mU.mPtr); - mVal->SetAnimValue(vb.x, vb.y, vb.width, vb.height, mSVGElement); + mVal->SetAnimValue(vb, mSVGElement); } return NS_OK; }
--- a/content/svg/content/src/nsSVGViewBox.h +++ b/content/svg/content/src/nsSVGViewBox.h @@ -17,22 +17,23 @@ class nsISMILAnimationElement; class nsSMILValue; struct nsSVGViewBoxRect { float x, y; float width, height; + bool none; - nsSVGViewBoxRect() : x(0), y(0), width(0), height(0) {} + nsSVGViewBoxRect() : none(true) {} nsSVGViewBoxRect(float aX, float aY, float aWidth, float aHeight) : - x(aX), y(aY), width(aWidth), height(aHeight) {} + x(aX), y(aY), width(aWidth), height(aHeight), none(false) {} nsSVGViewBoxRect(const nsSVGViewBoxRect& rhs) : - x(rhs.x), y(rhs.y), width(rhs.width), height(rhs.height) {} + x(rhs.x), y(rhs.y), width(rhs.width), height(rhs.height), none(rhs.none) {} bool operator==(const nsSVGViewBoxRect& aOther) const; }; class nsSVGViewBox { public: @@ -43,29 +44,34 @@ public: * with finite values. Returns false if the viewBox was set to an invalid * string, or if any of the four rect values were too big to store in a * float. * * This method does not check whether the width or height values are * positive, so callers must check whether the viewBox rect is valid where * necessary! */ + bool HasRect() const + { return (mAnimVal && !mAnimVal->none) || + (!mAnimVal && mHasBaseVal && !mBaseVal.none); } + + /** + * Returns true if the corresponding "viewBox" attribute either defined a + * rectangle with finite values or the special "none" value. + */ bool IsExplicitlySet() const - { return (mHasBaseVal || mAnimVal); } + { return mAnimVal || mHasBaseVal; } const nsSVGViewBoxRect& GetBaseValue() const { return mBaseVal; } void SetBaseValue(const nsSVGViewBoxRect& aRect, nsSVGElement *aSVGElement); - void SetBaseValue(float aX, float aY, float aWidth, float aHeight, - nsSVGElement *aSVGElement) - { SetBaseValue(nsSVGViewBoxRect(aX, aY, aWidth, aHeight), aSVGElement); } const nsSVGViewBoxRect& GetAnimValue() const { return mAnimVal ? *mAnimVal : mBaseVal; } - void SetAnimValue(float aX, float aY, float aWidth, float aHeight, + void SetAnimValue(const nsSVGViewBoxRect& aRect, nsSVGElement *aSVGElement); nsresult SetBaseValueString(const nsAString& aValue, nsSVGElement *aSVGElement, bool aDoSetAttr); void GetBaseValueString(nsAString& aValue) const; nsresult ToDOMAnimatedRect(nsIDOMSVGAnimatedRect **aResult,
--- a/content/svg/content/test/test_dataTypes.html +++ b/content/svg/content/test/test_dataTypes.html @@ -243,29 +243,18 @@ function runTests() "empty preserveAspectRatio attribute"); marker.removeAttribute("preserveAspectRatio"); ok(marker.getAttribute("preserveAspectRatio") === null, "removed preserveAspectRatio attribute"); // viewBox attribute var baseViewBox = marker.viewBox.baseVal; var animViewBox = marker.viewBox.animVal; - is(baseViewBox.x, 0, "viewBox baseVal"); - is(animViewBox.x, 0, "viewBox baseVal"); - is(baseViewBox.y, 0, "viewBox baseVal"); - is(animViewBox.y, 0, "viewBox baseVal"); - is(baseViewBox.width, 0, "viewBox baseVal"); - is(animViewBox.width, 0, "viewBox baseVal"); - is(baseViewBox.height, 0, "viewBox baseVal"); - is(animViewBox.height, 0, "viewBox baseVal"); - baseViewBox.x = 10; - baseViewBox.y = 11; - baseViewBox.width = 12; - baseViewBox.height = 13; - is(marker.getAttribute("viewBox"), "10 11 12 13", "viewBox attribute"); + is(baseViewBox, null, "viewBox baseVal"); + is(animViewBox, null, "viewBox animVal"); marker.setAttribute("viewBox", "1 2 3 4"); is(marker.viewBox.baseVal.x, 1, "viewBox.x baseVal"); is(marker.viewBox.animVal.x, 1, "viewBox.x animVal"); is(marker.viewBox.baseVal.y, 2, "viewbox.y baseVal"); is(marker.viewBox.animVal.y, 2, "viewbox.y animVal"); is(marker.viewBox.baseVal.width, 3, "viewbox.width baseVal"); is(marker.viewBox.animVal.width, 3, "viewbox.width animVal"); @@ -275,21 +264,38 @@ function runTests() is(marker.viewBox.animVal.x, 5, "viewBox.x animVal"); marker.viewBox.baseVal.y = 6; is(marker.viewBox.animVal.y, 6, "viewBox.y animVal"); marker.viewBox.baseVal.width = 7; is(marker.viewBox.animVal.width, 7, "viewBox.width animVal"); marker.viewBox.baseVal.height = 8; is(marker.viewBox.animVal.height, 8, "viewBox.height animVal"); is(marker.getAttribute("viewBox"), "5 6 7 8", "viewBox attribute"); + var storedViewBox = marker.viewBox.baseVal; marker.removeAttribute("viewBox"); is(marker.hasAttribute("viewBox"), false, "viewBox hasAttribute"); ok(marker.getAttribute("viewBox") === null, "removed viewBox attribute"); + is(marker.viewBox.baseVal, null, "viewBox baseVal"); + is(marker.viewBox.animVal, null, "viewBox animVal"); + + is(storedViewBox.width, 7, "Should not lose values"); + storedViewBox.width = 200; + is(storedViewBox.width, 200, "Should be able to change detached viewBox rect"); + is(marker.hasAttribute("viewBox"), false, "viewBox hasAttribute should still be false"); + ok(marker.getAttribute("viewBox") === null, "viewBox attribute should still be null"); + is(marker.viewBox.baseVal, null, "viewBox baseVal"); + is(marker.viewBox.animVal, null, "viewBox animVal"); + + marker.setAttribute("viewBox", "none"); + is(marker.hasAttribute("viewBox"), true, "viewBox hasAttribute"); + is(marker.viewBox.baseVal, null, "viewBox baseVal"); + is(marker.viewBox.animVal, null, "viewBox animVal"); marker.setAttribute("viewBox", ""); + is(marker.hasAttribute("viewBox"), true, "viewBox hasAttribute"); ok(marker.getAttribute("viewBox") === "", "empty viewBox attribute"); SimpleTest.finish(); } window.addEventListener("load", runTests, false); </script> </pre>
--- a/content/svg/content/test/test_dataTypesModEvents.html +++ b/content/svg/content/test/test_dataTypesModEvents.html @@ -231,17 +231,18 @@ function runTests() // viewBox attribute eventChecker.watchAttr(marker, "viewBox"); eventChecker.expect("add modify remove add"); marker.setAttribute("viewBox", "1 2 3 4"); marker.viewBox.baseVal.height = 5; marker.removeAttribute("viewBox"); marker.removeAttributeNS(null, "viewBox"); - marker.viewBox.baseVal.height = 4; + marker.setAttribute("viewBox", "none"); + marker.setAttribute("viewBox", "none"); eventChecker.ignoreEvents(); marker.setAttribute("viewBox", "1 2 3 4"); eventChecker.expect(""); marker.viewBox.baseVal.height = 4; marker.viewBox.baseVal.x = 1; marker.setAttribute("viewBox", "1 2 3 4");
--- a/content/svg/content/test/test_fragments.html +++ b/content/svg/content/test/test_fragments.html @@ -34,16 +34,17 @@ function runTests() var svg = $("svg"); var doc = svg.contentWindow.document; var tests = [ new Test("unknown", false, null, null, null), new Test("svgView(viewBox(0,0,200,200))", true, "0 0 200 200", null, null), new Test("svgView(preserveAspectRatio(xMaxYMin slice))", true, null, "xMaxYMin slice", null), new Test("svgView(viewBox(1,2,3,4);preserveAspectRatio(xMinYMax))", true, "1 2 3 4", "xMinYMax meet", null), + new Test("svgView(viewBox(none))", true, "none", null, null), new Test("svgView(zoomAndPan(disable))", true, null, null, "disable"), new Test("svgView(transform(translate(-10,-20) scale(2) rotate(45) translate(5,10)))", true, null, null, null), // No duplicates allowed new Test("svgView(zoomAndPan(disable);zoomAndPan(disable))", false, null, null, null), new Test("svgView(viewBox(0,0,200,200);viewBox(0,0,200,200))", false, null, null, null), new Test("svgView(preserveAspectRatio(xMaxYMin);preserveAspectRatio(xMaxYMin))", false, null, null, null), new Test("svgView(transform(translate(0,200));transform(translate(0,200)))", false, null, null, null), // No invalid values allowed
--- a/content/xbl/src/nsBindingManager.cpp +++ b/content/xbl/src/nsBindingManager.cpp @@ -40,16 +40,18 @@ #include "nsTHashtable.h" #include "nsIScriptContext.h" #include "nsBindingManager.h" #include "nsThreadUtils.h" #include "mozilla/dom/NodeListBinding.h" +using namespace mozilla; + // ================================================================== // = nsAnonymousContentList // ================================================================== #define NS_ANONYMOUS_CONTENT_LIST_IID \ { 0xbfb5d8e7, 0xf718, 0x4a46, \ { 0xb2, 0x2b, 0x22, 0x4a, 0x44, 0x4c, 0xb9, 0x77 } } @@ -1172,17 +1174,17 @@ nsBindingManager::GetBindingImplementati nsIScriptGlobalObject *global = doc->GetScriptGlobalObject(); if (!global) return NS_NOINTERFACE; nsIScriptContext *context = global->GetContext(); if (!context) return NS_NOINTERFACE; - JSContext* jscontext = context->GetNativeContext(); + AutoPushJSContext jscontext(context->GetNativeContext()); if (!jscontext) return NS_NOINTERFACE; nsIXPConnect *xpConnect = nsContentUtils::XPConnect(); JSObject* jsobj = aContent->GetWrapper(); NS_ENSURE_TRUE(jsobj, NS_NOINTERFACE);
--- a/content/xbl/src/nsXBLBinding.cpp +++ b/content/xbl/src/nsXBLBinding.cpp @@ -1258,17 +1258,17 @@ nsXBLBinding::AllowScripts() return false; } nsCOMPtr<nsIScriptContext> context = global->GetContext(); if (!context) { return false; } - JSContext* cx = context->GetNativeContext(); + AutoPushJSContext cx(context->GetNativeContext()); nsCOMPtr<nsIDocument> ourDocument = mPrototypeBinding->XBLDocumentInfo()->GetDocument(); bool canExecute; nsresult rv = mgr->CanExecuteScripts(cx, ourDocument->NodePrincipal(), &canExecute); return NS_SUCCEEDED(rv) && canExecute; }
--- a/content/xbl/src/nsXBLDocumentInfo.cpp +++ b/content/xbl/src/nsXBLDocumentInfo.cpp @@ -267,17 +267,17 @@ nsXBLDocGlobalObject::EnsureScriptEnviro // hook up to the existing nsIScriptGlobalObject global setup by // nsGlobalWindow. DebugOnly<nsresult> rv = newCtx->InitContext(); NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Script Language's InitContext failed"); newCtx->DidInitializeContext(); mScriptContext = newCtx; - JSContext *cx = mScriptContext->GetNativeContext(); + AutoPushJSContext cx(mScriptContext->GetNativeContext()); JSAutoRequest ar(cx); // nsJSEnvironment set the error reporter to NS_ScriptErrorReporter so // we must apparently override that with our own (although it isn't clear // why - see bug 339647) JS_SetErrorReporter(cx, XBL_ProtoErrorReporter); mJSObject = JS_NewGlobalObject(cx, &gSharedGlobalClass,
--- a/content/xbl/src/nsXBLProtoImpl.cpp +++ b/content/xbl/src/nsXBLProtoImpl.cpp @@ -81,17 +81,17 @@ nsXBLProtoImpl::InstallImplementation(ns // If the prototype already existed, we don't need to install anything. return early. if (!targetObjectIsNew) return NS_OK; JSObject * targetScriptObject; holder->GetJSObject(&targetScriptObject); - JSContext *cx = context->GetNativeContext(); + AutoPushJSContext cx(context->GetNativeContext()); JSAutoRequest ar(cx); JSAutoCompartment ac(cx, targetClassObject); AutoVersionChecker avc(cx); // Walk our member list and install each one in turn. for (nsXBLProtoImplMember* curr = mMembers; curr; curr = curr->GetNext()) @@ -167,17 +167,17 @@ nsXBLProtoImpl::InitTargetObjects(nsXBLP nsIScriptGlobalObject *sgo; if (!(sgo = ownerDoc->GetScopeObject())) { return NS_ERROR_UNEXPECTED; } // Because our prototype implementation has a class, we need to build up a corresponding // class for the concrete implementation in the bound document. - JSContext* jscontext = aContext->GetNativeContext(); + AutoPushJSContext jscontext(aContext->GetNativeContext()); JSObject* global = sgo->GetGlobalJSObject(); nsCOMPtr<nsIXPConnectJSObjectHolder> wrapper; jsval v; rv = nsContentUtils::WrapNative(jscontext, global, aBoundElement, &v, getter_AddRefs(wrapper)); NS_ENSURE_SUCCESS(rv, rv); // All of the above code was just obtaining the bound element's script object and its immediate @@ -206,17 +206,17 @@ nsXBLProtoImpl::CompilePrototypeMembers( nsCOMPtr<nsIScriptGlobalObjectOwner> globalOwner( do_QueryObject(aBinding->XBLDocumentInfo())); nsIScriptGlobalObject* globalObject = globalOwner->GetScriptGlobalObject(); NS_ENSURE_TRUE(globalObject, NS_ERROR_UNEXPECTED); nsIScriptContext *context = globalObject->GetContext(); NS_ENSURE_TRUE(context, NS_ERROR_OUT_OF_MEMORY); - JSContext *cx = context->GetNativeContext(); + AutoPushJSContext cx(context->GetNativeContext()); JSObject *global = globalObject->GetGlobalJSObject(); JSObject* classObject; bool classObjectIsNew = false; nsresult rv = aBinding->InitClass(mClassName, cx, global, global, &classObject, &classObjectIsNew); if (NS_FAILED(rv)) @@ -343,17 +343,17 @@ nsXBLProtoImpl::DestroyMembers() nsresult nsXBLProtoImpl::Read(nsIScriptContext* aContext, nsIObjectInputStream* aStream, nsXBLPrototypeBinding* aBinding, nsIScriptGlobalObject* aGlobal) { // Set up a class object first so that deserialization is possible - JSContext *cx = aContext->GetNativeContext(); + AutoPushJSContext cx(aContext->GetNativeContext()); JSObject *global = aGlobal->GetGlobalJSObject(); JSObject* classObject; bool classObjectIsNew = false; nsresult rv = aBinding->InitClass(mClassName, cx, global, global, &classObject, &classObjectIsNew); NS_ENSURE_SUCCESS(rv, rv); MOZ_ASSERT(classObject);
--- a/content/xbl/src/nsXBLProtoImplField.cpp +++ b/content/xbl/src/nsXBLProtoImplField.cpp @@ -395,17 +395,17 @@ nsXBLProtoImplField::InstallField(nsIScr // EvaluateString and JS_DefineUCProperty can both trigger GC, so // protect |result| here. nsresult rv; nsAutoCString uriSpec; aBindingDocURI->GetSpec(uriSpec); - JSContext* cx = aContext->GetNativeContext(); + AutoPushJSContext cx(aContext->GetNativeContext()); NS_ASSERTION(!::JS_IsExceptionPending(cx), "Shouldn't get here when an exception is pending!"); // compile the literal string nsCOMPtr<nsIScriptContext> context = aContext; JSAutoRequest ar(cx);
--- a/content/xbl/src/nsXBLProtoImplMethod.cpp +++ b/content/xbl/src/nsXBLProtoImplMethod.cpp @@ -15,16 +15,18 @@ #include "nsIScriptContext.h" #include "nsJSUtils.h" #include "nsContentUtils.h" #include "nsIScriptSecurityManager.h" #include "nsIXPConnect.h" #include "xpcpublic.h" #include "nsXBLPrototypeBinding.h" +using namespace mozilla; + nsXBLProtoImplMethod::nsXBLProtoImplMethod(const PRUnichar* aName) : nsXBLProtoImplMember(aName), mUncompiledMethod(BIT_UNCOMPILED) { MOZ_COUNT_CTOR(nsXBLProtoImplMethod); } nsXBLProtoImplMethod::~nsXBLProtoImplMethod() @@ -187,17 +189,17 @@ nsXBLProtoImplMethod::CompileMember(nsIS NS_ConvertUTF16toUTF8 cname(mName); nsAutoCString functionUri(aClassStr); int32_t hash = functionUri.RFindChar('#'); if (hash != kNotFound) { functionUri.Truncate(hash); } JSObject* methodObject = nullptr; - JSContext* cx = aContext->GetNativeContext(); + AutoPushJSContext cx(aContext->GetNativeContext()); JSAutoRequest ar(cx); JSAutoCompartment ac(cx, aClassObject); JS::CompileOptions options(cx); options.setFileAndLine(functionUri.get(), uncompiledMethod->mBodyText.GetLineNumber()) .setVersion(JSVERSION_LATEST) .setUserBit(true); // Flag us as XBL js::RootedObject rootedNull(cx, nullptr); // See bug 781070. @@ -282,17 +284,17 @@ nsXBLProtoImplAnonymousMethod::Execute(n nsCOMPtr<nsIScriptContext> context = global->GetContext(); if (!context) { return NS_OK; } nsAutoMicroTask mt; - JSContext* cx = context->GetNativeContext(); + AutoPushJSContext cx(context->GetNativeContext()); JSObject* globalObject = global->GetGlobalJSObject(); nsCOMPtr<nsIXPConnectJSObjectHolder> wrapper; jsval v; nsresult rv = nsContentUtils::WrapNative(cx, globalObject, aBoundElement, &v, getter_AddRefs(wrapper));
--- a/content/xbl/src/nsXBLProtoImplProperty.cpp +++ b/content/xbl/src/nsXBLProtoImplProperty.cpp @@ -4,24 +4,27 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "nsIAtom.h" #include "nsString.h" #include "jsapi.h" #include "nsIContent.h" #include "nsXBLProtoImplProperty.h" #include "nsUnicharUtils.h" +#include "nsContentUtils.h" #include "nsReadableUtils.h" #include "nsIScriptContext.h" #include "nsJSUtils.h" #include "nsIScriptGlobalObject.h" #include "nsXBLPrototypeBinding.h" #include "nsXBLSerialize.h" #include "xpcpublic.h" +using namespace mozilla; + nsXBLProtoImplProperty::nsXBLProtoImplProperty(const PRUnichar* aName, const PRUnichar* aGetter, const PRUnichar* aSetter, const PRUnichar* aReadOnly, uint32_t aLineNumber) : nsXBLProtoImplMember(aName), mGetterText(nullptr), mSetterText(nullptr), @@ -202,17 +205,17 @@ nsXBLProtoImplProperty::CompileMember(ns } bool deletedGetter = false; if (mGetterText && mGetterText->GetText()) { nsDependentString getter(mGetterText->GetText()); if (!getter.IsEmpty()) { // Compile into a temp object so we don't wipe out mGetterText JSObject* getterObject = nullptr; - JSContext* cx = aContext->GetNativeContext(); + AutoPushJSContext cx(aContext->GetNativeContext()); JSAutoRequest ar(cx); JSAutoCompartment ac(cx, aClassObject); JS::CompileOptions options(cx); options.setFileAndLine(functionUri.get(), mGetterText->GetLineNumber()) .setVersion(JSVERSION_LATEST) .setUserBit(true); // Flag us as XBL nsCString name = NS_LITERAL_CSTRING("get_") + NS_ConvertUTF16toUTF8(mName); js::RootedObject rootedNull(cx, nullptr); // See bug 781070. @@ -252,17 +255,17 @@ nsXBLProtoImplProperty::CompileMember(ns } bool deletedSetter = false; if (mSetterText && mSetterText->GetText()) { nsDependentString setter(mSetterText->GetText()); if (!setter.IsEmpty()) { // Compile into a temp object so we don't wipe out mSetterText JSObject* setterObject = nullptr; - JSContext* cx = aContext->GetNativeContext(); + AutoPushJSContext cx(aContext->GetNativeContext()); JSAutoRequest ar(cx); JSAutoCompartment ac(cx, aClassObject); JS::CompileOptions options(cx); options.setFileAndLine(functionUri.get(), mSetterText->GetLineNumber()) .setVersion(JSVERSION_LATEST) .setUserBit(true); // Flag us as XBL nsCString name = NS_LITERAL_CSTRING("set_") + NS_ConvertUTF16toUTF8(mName); js::RootedObject rootedNull(cx, nullptr); // See bug 781070.
--- a/content/xbl/src/nsXBLPrototypeHandler.cpp +++ b/content/xbl/src/nsXBLPrototypeHandler.cpp @@ -285,17 +285,17 @@ nsXBLPrototypeHandler::ExecuteHandler(ns // responsible for pushing the context of the event target. See the similar // comment in nsEventManagerListener.cpp. nsCxPusher pusher; NS_ENSURE_STATE(pusher.Push(aTarget)); rv = EnsureEventHandler(boundGlobal, boundContext, onEventAtom, handler); NS_ENSURE_SUCCESS(rv, rv); - JSContext* cx = boundContext->GetNativeContext(); + AutoPushJSContext cx(boundContext->GetNativeContext()); JSAutoRequest ar(cx); JSObject* globalObject = boundGlobal->GetGlobalJSObject(); JSObject* scopeObject = xpc::GetXBLScope(cx, globalObject); // Bind it to the bound element. Note that if we're using a separate XBL scope, // we'll actually be binding the event handler to a cross-compartment wrapper // to the bound element's reflector. @@ -365,17 +365,17 @@ nsXBLPrototypeHandler::EnsureEventHandle return NS_OK; } } // Ensure that we have something to compile nsDependentString handlerText(mHandlerText); NS_ENSURE_TRUE(!handlerText.IsEmpty(), NS_ERROR_FAILURE); - JSContext* cx = aBoundContext->GetNativeContext(); + AutoPushJSContext cx(aBoundContext->GetNativeContext()); JSObject* globalObject = aGlobal->GetGlobalJSObject(); JSObject* scopeObject = xpc::GetXBLScope(cx, globalObject); nsAutoCString bindingURI; mPrototypeBinding->DocURI()->GetSpec(bindingURI); uint32_t argCount; const char **argNames;
--- a/content/xbl/src/nsXBLSerialize.cpp +++ b/content/xbl/src/nsXBLSerialize.cpp @@ -3,31 +3,33 @@ * 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 "nsXBLSerialize.h" #include "nsDOMScriptObjectHolder.h" #include "nsContentUtils.h" #include "jsdbgapi.h" +using namespace mozilla; + nsresult XBL_SerializeFunction(nsIScriptContext* aContext, nsIObjectOutputStream* aStream, JSObject* aFunctionObject) { - JSContext* cx = aContext->GetNativeContext(); + AutoPushJSContext cx(aContext->GetNativeContext()); return nsContentUtils::XPConnect()->WriteFunction(aStream, cx, aFunctionObject); } nsresult XBL_DeserializeFunction(nsIScriptContext* aContext, nsIObjectInputStream* aStream, JSObject** aFunctionObjectp) { - JSContext* cx = aContext->GetNativeContext(); + AutoPushJSContext cx(aContext->GetNativeContext()); nsresult rv = nsContentUtils::XPConnect()->ReadFunction(aStream, cx, aFunctionObjectp); NS_ENSURE_SUCCESS(rv, rv); // Mark the script as XBL. // // This might be more elegantly handled as a flag via the XPConnect serialization // code, but that would involve profile compat issues between different builds. // Given that we know this code is XBL, just flag it as such.
--- a/content/xul/document/src/nsXULPrototypeDocument.cpp +++ b/content/xul/document/src/nsXULPrototypeDocument.cpp @@ -28,16 +28,17 @@ #include "nsNodeInfoManager.h" #include "nsContentUtils.h" #include "nsCCUncollectableMarker.h" #include "nsDOMJSUtils.h" // for GetScriptContextFromJSContext #include "xpcpublic.h" #include "mozilla/dom/BindingUtils.h" using mozilla::dom::DestroyProtoAndIfaceCache; +using mozilla::AutoPushJSContext; static NS_DEFINE_CID(kDOMScriptObjectFactoryCID, NS_DOM_SCRIPT_OBJECT_FACTORY_CID); class nsXULPDGlobalObject : public nsIScriptGlobalObject, public nsIScriptObjectPrincipal { @@ -752,17 +753,17 @@ nsXULPDGlobalObject::EnsureScriptEnviron nsCOMPtr<nsIScriptContext> ctxNew = languageRuntime->CreateContext(false, nullptr); MOZ_ASSERT(ctxNew); // We have to setup a special global object. We do this then // attach it as the global for this context. Then, we // will re-fetch the global and set it up in our language globals array. { - JSContext *cx = ctxNew->GetNativeContext(); + AutoPushJSContext cx(ctxNew->GetNativeContext()); JSAutoRequest ar(cx); JSObject *newGlob = JS_NewGlobalObject(cx, &gSharedGlobalClass, nsJSPrincipals::get(GetPrincipal())); if (!newGlob) return NS_OK; ::JS_SetGlobalObject(cx, newGlob);
--- a/content/xul/templates/src/nsXULTemplateBuilder.cpp +++ b/content/xul/templates/src/nsXULTemplateBuilder.cpp @@ -66,16 +66,17 @@ #include "nsNetUtil.h" #include "nsXULTemplateBuilder.h" #include "nsXULTemplateQueryProcessorRDF.h" #include "nsXULTemplateQueryProcessorXML.h" #include "nsXULTemplateQueryProcessorStorage.h" #include "nsContentUtils.h" using namespace mozilla::dom; +using namespace mozilla; //---------------------------------------------------------------------- static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID); static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID); //---------------------------------------------------------------------- // @@ -1382,17 +1383,17 @@ nsXULTemplateBuilder::InitHTMLTemplateRo return NS_ERROR_UNEXPECTED; JSObject *scope = global->GetGlobalJSObject(); nsIScriptContext *context = global->GetContext(); if (! context) return NS_ERROR_UNEXPECTED; - JSContext* jscontext = context->GetNativeContext(); + AutoPushJSContext jscontext(context->GetNativeContext()); NS_ASSERTION(context != nullptr, "no jscontext"); if (! jscontext) return NS_ERROR_UNEXPECTED; JSAutoRequest ar(jscontext); jsval v; nsCOMPtr<nsIXPConnectJSObjectHolder> wrapper;
--- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -3592,18 +3592,17 @@ nsDocShell::RemoveChild(nsIDocShellTreeI NS_IMETHODIMP nsDocShell::GetChildAt(int32_t aIndex, nsIDocShellTreeItem ** aChild) { NS_ENSURE_ARG_POINTER(aChild); #ifdef DEBUG if (aIndex < 0) { NS_WARNING("Negative index passed to GetChildAt"); - } - else if (aIndex >= mChildList.Length()) { + } else if (static_cast<uint32_t>(aIndex) >= mChildList.Length()) { NS_WARNING("Too large an index passed to GetChildAt"); } #endif nsIDocumentLoader* child = SafeChildAt(aIndex); NS_ENSURE_TRUE(child, NS_ERROR_UNEXPECTED); return CallQueryInterface(child, aChild); @@ -10194,18 +10193,20 @@ nsDocShell::AddState(nsIVariant *aData, nsCOMPtr<nsIDocument> origDocument = do_GetInterface(GetAsSupports(this)); if (!origDocument) return NS_ERROR_DOM_SECURITY_ERR; nsCOMPtr<nsIPrincipal> origPrincipal = origDocument->NodePrincipal(); scContainer = new nsStructuredCloneContainer(); JSContext *cx = aCx; + nsCxPusher pusher; if (!cx) { cx = nsContentUtils::GetContextFromDocument(document); + pusher.Push(cx); } rv = scContainer->InitFromVariant(aData, cx); // If we're running in the document's context and the structured clone // failed, clear the context's pending exception. See bug 637116. if (NS_FAILED(rv) && !aCx) { JS_ClearPendingException(aCx); }
--- a/docshell/test/chrome/test_mozFrameType.xul +++ b/docshell/test/chrome/test_mozFrameType.xul @@ -22,17 +22,17 @@ https://bugzilla.mozilla.org/show_bug.cg </div> <pre id="test"> </pre> </body> <script class="testbody" type="application/javascript"> <![CDATA[ -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 1); } /** Test for Bug 769771 **/ SimpleTest.waitForExplicitFinish(); addLoadEvent(function () { window.open("mozFrameType_window.xul", "mozFrameType",
--- a/docshell/test/navigation/test_child.html +++ b/docshell/test/navigation/test_child.html @@ -4,17 +4,17 @@ <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> <script type="text/javascript" src="NavigationUtils.js"></script> <style type="text/css"> iframe { width: 90%; height: 50px; } </style> <script> -if (navigator.platform.indexOf("Mac") == 0) { +if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 1); } window.onload = function() { navigateByLocation(frames[0]); navigateByOpen("child1"); navigateByForm("child2"); navigateByHyperlink("child3");
--- a/docshell/test/navigation/test_grandchild.html +++ b/docshell/test/navigation/test_grandchild.html @@ -4,17 +4,17 @@ <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> <script type="text/javascript" src="NavigationUtils.js"></script> <style type="text/css"> iframe { width: 90%; height: 200px; } </style> <script> -if (navigator.platform.indexOf("Mac") == 0) { +if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 1); } window.onload = function () { navigateByLocation(frames[0].frames[0]); navigateByOpen("child1_child0"); navigateByForm("child2_child0"); navigateByHyperlink("child3_child0");
--- a/docshell/test/navigation/test_reserved.html +++ b/docshell/test/navigation/test_reserved.html @@ -4,17 +4,17 @@ <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> <script type="text/javascript" src="NavigationUtils.js"></script> <style type="text/css"> iframe { width: 90%; height: 200px; } </style> <script> -if (navigator.platform.indexOf("Mac") == 0) { +if (navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(0, 2); } function testTop() { window0 = window.open("iframe.html#http://test1.example.org:80/tests/docshell/test/navigation/navigate.html#top,location", "_blank", "width=10,height=10"); xpcWaitForFinishedFrames(function() { isInaccessible(window0, "Should be able to navigate off-domain top by setting location.");
--- a/docshell/test/test_bug668513.html +++ b/docshell/test/test_bug668513.html @@ -3,17 +3,17 @@ <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=668513 --> <head> <title>Test for Bug 668513</title> <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> <script> -if (navigator.platform.indexOf("Linux") == 0) { +if (navigator.platform.startsWith("Linux")) { SimpleTest.expectAssertions(0, 1); } function onload_test() { var win = frames[0]; ok(win.performance, 'Window.performance should be defined'); ok(win.performance.navigation, 'Window.performance.navigation should be defined');
--- a/dom/apps/src/Webapps.jsm +++ b/dom/apps/src/Webapps.jsm @@ -2310,19 +2310,26 @@ this.DOMApplicationRegistry = { let manifest = JSON.parse(converter.ConvertToUnicode(NetUtil.readInputStreamToString(istream, istream.available()) || "")); if (!AppsUtils.checkManifest(manifest, app)) { throw "INVALID_MANIFEST"; } - // Call ensureSameAppName before compareManifests, as `manifest`, - // has been normalized to avoid app rename. - AppsUtils.ensureSameAppName(aManifest._manifest, manifest, app); + // For app updates we don't forbid apps to rename themselves but + // we still retain the old name of the app. In the future we + // will use UI to allow updates to rename an app after we check + // with the user that the rename is ok. + if (aIsUpdate) { + // Call ensureSameAppName before compareManifests as `manifest` + // has been normalized to avoid app rename. + AppsUtils.ensureSameAppName(aManifest._manifest, manifest, + app); + } if (!AppsUtils.compareManifests(manifest, aManifest._manifest)) { throw "MANIFEST_MISMATCH"; } if (!AppsUtils.checkInstallAllowed(manifest, aApp.installOrigin)) { throw "INSTALL_FROM_DENIED";
--- a/dom/audiochannel/AudioChannelService.cpp +++ b/dom/audiochannel/AudioChannelService.cpp @@ -11,18 +11,16 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" #include "mozilla/Util.h" #include "mozilla/dom/ContentParent.h" -#include "base/basictypes.h" - #include "nsThreadUtils.h" #ifdef MOZ_WIDGET_GONK #include "nsIAudioManager.h" #endif using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::hal; @@ -125,16 +123,17 @@ AudioChannelService::UnregisterAudioChan void AudioChannelService::UnregisterType(AudioChannelType aType, bool aElementHidden, uint64_t aChildID) { // The array may contain multiple occurrence of this appId but // this should remove only the first one. AudioChannelInternalType type = GetInternalType(aType, aElementHidden); + MOZ_ASSERT(!mChannelCounters[type].IsEmpty()); mChannelCounters[type].RemoveElement(aChildID); // In order to avoid race conditions, it's safer to notify any existing // agent any time a new one is registered. if (XRE_GetProcessType() == GeckoProcessType_Default) { // We only remove ChildID when it is in the foreground. // If in the background, we kept ChildID for allowing it to play next song. if (aType == AUDIO_CHANNEL_CONTENT && @@ -143,16 +142,32 @@ AudioChannelService::UnregisterType(Audi !mChannelCounters[AUDIO_CHANNEL_INT_CONTENT].Contains(aChildID))) { mActiveContentChildIDs.RemoveElement(aChildID); } SendAudioChannelChangedNotification(); Notify(); } } +void +AudioChannelService::UpdateChannelType(AudioChannelType aType, + uint64_t aChildID, + bool aElementHidden, + bool aElementWasHidden) +{ + // Calculate the new and old internal type and update the hashtable if needed. + AudioChannelInternalType newType = GetInternalType(aType, aElementHidden); + AudioChannelInternalType oldType = GetInternalType(aType, aElementWasHidden); + + if (newType != oldType) { + mChannelCounters[newType].AppendElement(aChildID); + mChannelCounters[oldType].RemoveElement(aChildID); + } +} + bool AudioChannelService::GetMuted(AudioChannelAgent* aAgent, bool aElementHidden) { AudioChannelAgentData* data; if (!mAgents.Get(aAgent, &data)) { return true; } @@ -167,25 +182,22 @@ AudioChannelService::GetMuted(AudioChann SendAudioChannelChangedNotification(); return muted; } bool AudioChannelService::GetMutedInternal(AudioChannelType aType, uint64_t aChildID, bool aElementHidden, bool aElementWasHidden) { + UpdateChannelType(aType, aChildID, aElementHidden, aElementWasHidden); + // Calculating the new and old type and update the hashtable if needed. AudioChannelInternalType newType = GetInternalType(aType, aElementHidden); AudioChannelInternalType oldType = GetInternalType(aType, aElementWasHidden); - if (newType != oldType) { - mChannelCounters[newType].AppendElement(aChildID); - mChannelCounters[oldType].RemoveElement(aChildID); - } - // If the audio content channel is visible, let's remember this ChildID. if (newType == AUDIO_CHANNEL_INT_CONTENT && oldType == AUDIO_CHANNEL_INT_CONTENT_HIDDEN) { if (mActiveContentChildIDsFrozen) { mActiveContentChildIDsFrozen = false; mActiveContentChildIDs.Clear(); }
--- a/dom/audiochannel/AudioChannelService.h +++ b/dom/audiochannel/AudioChannelService.h @@ -70,16 +70,20 @@ protected: /* Register/Unregister IPC types: */ void RegisterType(AudioChannelType aType, uint64_t aChildID); void UnregisterType(AudioChannelType aType, bool aElementHidden, uint64_t aChildID); bool GetMutedInternal(AudioChannelType aType, uint64_t aChildID, bool aElementHidden, bool aElementWasHidden); + /* Update the internal type value following the visibility changes */ + void UpdateChannelType(AudioChannelType aType, uint64_t aChildID, + bool aElementHidden, bool aElementWasHidden); + AudioChannelService(); virtual ~AudioChannelService(); enum AudioChannelInternalType { AUDIO_CHANNEL_INT_NORMAL = 0, AUDIO_CHANNEL_INT_NORMAL_HIDDEN, AUDIO_CHANNEL_INT_CONTENT, AUDIO_CHANNEL_INT_CONTENT_HIDDEN,
--- a/dom/audiochannel/AudioChannelServiceChild.cpp +++ b/dom/audiochannel/AudioChannelServiceChild.cpp @@ -8,21 +8,23 @@ #include "base/basictypes.h" #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" #include "mozilla/Util.h" #include "mozilla/dom/ContentChild.h" +#include "mozilla/dom/ContentParent.h" #include "nsIObserverService.h" #include "nsThreadUtils.h" using namespace mozilla; using namespace mozilla::dom; +using namespace mozilla::hal; StaticRefPtr<AudioChannelServiceChild> gAudioChannelServiceChild; // static AudioChannelService* AudioChannelServiceChild::GetAudioChannelService() { MOZ_ASSERT(NS_IsMainThread()); @@ -63,16 +65,18 @@ AudioChannelServiceChild::GetMuted(Audio if (!mAgents.Get(aAgent, &data)) { return true; } ContentChild *cc = ContentChild::GetSingleton(); bool muted = true; bool oldElementHidden = data->mElementHidden; + UpdateChannelType(data->mType, CONTENT_PROCESS_ID_MAIN, aElementHidden, oldElementHidden); + // Update visibility. data->mElementHidden = aElementHidden; if (cc) { cc->SendAudioChannelGetMuted(data->mType, aElementHidden, oldElementHidden, &muted); } data->mMuted = muted;
--- a/dom/base/DOMRequest.cpp +++ b/dom/base/DOMRequest.cpp @@ -13,16 +13,17 @@ #include "nsDOMEvent.h" #include "nsContentUtils.h" #include "nsThreadUtils.h" #include "DOMCursor.h" using mozilla::dom::DOMRequest; using mozilla::dom::DOMRequestService; using mozilla::dom::DOMCursor; +using mozilla::AutoPushJSContext; DOMRequest::DOMRequest(nsIDOMWindow* aWindow) : mResult(JSVAL_VOID) , mDone(false) , mRooted(false) { Init(aWindow); } @@ -235,39 +236,41 @@ public: FireSuccessAsyncTask(DOMRequest* aRequest, const jsval& aResult) : mReq(aRequest), mResult(aResult) { NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); nsresult rv; nsIScriptContext* sc = mReq->GetContextForEventHandlers(&rv); - MOZ_ASSERT(NS_SUCCEEDED(rv) && sc->GetNativeContext()); - JSAutoRequest ar(sc->GetNativeContext()); - JS_AddValueRoot(sc->GetNativeContext(), &mResult); + AutoPushJSContext cx(sc->GetNativeContext()); + MOZ_ASSERT(NS_SUCCEEDED(rv) && cx); + JSAutoRequest ar(cx); + JS_AddValueRoot(cx, &mResult); } NS_IMETHODIMP Run() { mReq->FireSuccess(mResult); return NS_OK; } ~FireSuccessAsyncTask() { NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); nsresult rv; nsIScriptContext* sc = mReq->GetContextForEventHandlers(&rv); - MOZ_ASSERT(NS_SUCCEEDED(rv) && sc->GetNativeContext()); + AutoPushJSContext cx(sc->GetNativeContext()); + MOZ_ASSERT(NS_SUCCEEDED(rv) && cx); // We need to build a new request, otherwise we assert since there won't be // a request available yet. - JSAutoRequest ar(sc->GetNativeContext()); - JS_RemoveValueRoot(sc->GetNativeContext(), &mResult); + JSAutoRequest ar(cx); + JS_RemoveValueRoot(cx, &mResult); } private: nsRefPtr<DOMRequest> mReq; jsval mResult; }; class FireErrorAsyncTask : public nsRunnable {
--- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -4077,17 +4077,17 @@ BaseStubConstructor(nsIWeakReference* aW JSObject* object = nullptr; wrappedJS->GetJSObject(&object); if (!object) { return NS_ERROR_UNEXPECTED; } nsCxPusher pusher; - NS_ENSURE_STATE(pusher.Push(cx, false)); + pusher.Push(cx); JSAutoRequest ar(cx); JSAutoCompartment ac(cx, object); JS::Value thisValue = JSVAL_VOID; JS::Value funval; if (!JS_GetProperty(cx, object, "constructor", &funval) || !funval.isObject()) { return NS_ERROR_UNEXPECTED; @@ -4569,34 +4569,29 @@ nsDOMConstructor::HasInstance(nsIXPConne *bp = false; if (JSVAL_IS_PRIMITIVE(v)) { return NS_OK; } JSObject *dom_obj = JSVAL_TO_OBJECT(v); NS_ASSERTION(dom_obj, "nsDOMConstructor::HasInstance couldn't get object"); - // This might not be the right object, if XPCNativeWrapping - // happened. Get the wrapped native for this object, then get its - // JS object. - JSObject *wrapped_obj; - nsresult rv = nsContentUtils::XPConnect()->GetJSObjectOfWrapper(cx, dom_obj, - &wrapped_obj); - if (NS_SUCCEEDED(rv)) { - dom_obj = wrapped_obj; - } + // This might not be the right object, if there are wrappers. Unwrap if we can. + JSObject *wrapped_obj = js::UnwrapObjectChecked(dom_obj, /* stopAtOuter = */ false); + if (wrapped_obj) + dom_obj = wrapped_obj; JSClass *dom_class = JS_GetClass(dom_obj); if (!dom_class) { NS_ERROR("nsDOMConstructor::HasInstance can't get class."); return NS_ERROR_UNEXPECTED; } const nsGlobalNameStruct *name_struct; - rv = GetNameStruct(NS_ConvertASCIItoUTF16(dom_class->name), &name_struct); + nsresult rv = GetNameStruct(NS_ConvertASCIItoUTF16(dom_class->name), &name_struct); if (NS_FAILED(rv)) { return rv; } if (!name_struct) { // This isn't a normal DOM object, see if this constructor lives on its // prototype chain. jsval val; @@ -5440,25 +5435,27 @@ nsWindowSH::NewResolve(nsIXPConnectWrapp // window's own context (not on some other window-caller's // context). if (!ObjectIsNativeWrapper(cx, obj)) { JSBool did_resolve = JS_FALSE; JSBool ok = JS_TRUE; JS::Value exn = JSVAL_VOID; { + nsCxPusher pusher; Maybe<JSAutoCompartment> ac; JSContext* my_cx; if (!my_context) { my_cx = cx; } else { my_cx = my_context->GetNativeContext(); if (my_cx != cx) { + pusher.Push(my_cx); ac.construct(my_cx, obj); } } JSAutoRequest transfer(my_cx); // Don't resolve standard classes on XPCNativeWrapper etc, only // resolve them if we're resolving on the real global object. @@ -7773,27 +7770,20 @@ public: nsIScriptContext* scriptContext) : mWrapper(wrapper), mContext(scriptContext) { } NS_IMETHOD Run() { - JSContext* cx = nullptr; - if (mContext) { - cx = mContext->GetNativeContext(); - } else { - nsCOMPtr<nsIThreadJSContextStack> stack = - do_GetService("@mozilla.org/js/xpc/ContextStack;1"); - NS_ENSURE_TRUE(stack, NS_OK); - - cx = stack->GetSafeJSContext(); - NS_ENSURE_TRUE(cx, NS_OK); - } + nsCxPusher pusher; + JSContext* cx = mContext ? mContext->GetNativeContext() + : nsContentUtils::GetSafeJSContext(); + pusher.Push(cx); JSObject* obj = nullptr; mWrapper->GetJSObject(&obj); NS_ASSERTION(obj, "Should never be null"); nsHTMLPluginObjElementSH::SetupProtoChain(mWrapper, cx, obj); return NS_OK; } @@ -7807,21 +7797,17 @@ NS_IMPL_ISUPPORTS1(nsPluginProtoChainIns // static nsresult nsHTMLPluginObjElementSH::SetupProtoChain(nsIXPConnectWrappedNative *wrapper, JSContext *cx, JSObject *obj) { NS_ASSERTION(nsContentUtils::IsSafeToRunScript(), "Shouldn't have gotten in here"); - - nsCxPusher cxPusher; - if (!cxPusher.Push(cx)) { - return NS_OK; - } + MOZ_ASSERT(cx == nsContentUtils::GetCurrentJSContext()); JSAutoRequest ar(cx); JSAutoCompartment ac(cx, obj); nsRefPtr<nsNPAPIPluginInstance> pi; nsresult rv = GetPluginInstanceIfSafe(wrapper, obj, cx, getter_AddRefs(pi)); NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/base/nsDOMWindowUtils.cpp +++ b/dom/base/nsDOMWindowUtils.cpp @@ -1435,23 +1435,25 @@ nsDOMWindowUtils::GetScrollXY(bool aFlus *aScrollX = nsPresContext::AppUnitsToIntCSSPixels(scrollPos.x); *aScrollY = nsPresContext::AppUnitsToIntCSSPixels(scrollPos.y); return NS_OK; } NS_IMETHODIMP -nsDOMWindowUtils::GetScrollbarWidth(bool aFlushLayout, int32_t* aResult) +nsDOMWindowUtils::GetScrollbarSize(bool aFlushLayout, int32_t* aWidth, + int32_t* aHeight) { if (!nsContentUtils::IsCallerChrome()) { return NS_ERROR_DOM_SECURITY_ERR; } - *aResult = 0; + *aWidth = 0; + *aHeight = 0; nsCOMPtr<nsPIDOMWindow> window = do_QueryReferent(mWindow); NS_ENSURE_STATE(window); nsCOMPtr<nsIDocument> doc = window->GetExtantDoc(); NS_ENSURE_STATE(doc); if (aFlushLayout) { @@ -1460,17 +1462,18 @@ nsDOMWindowUtils::GetScrollbarWidth(bool nsIPresShell* presShell = doc->GetShell(); NS_ENSURE_TRUE(presShell, NS_ERROR_NOT_AVAILABLE); nsIScrollableFrame* scrollFrame = presShell->GetRootScrollFrameAsScrollable(); NS_ENSURE_TRUE(scrollFrame, NS_OK); nsMargin sizes = scrollFrame->GetActualScrollbarSizes(); - *aResult = nsPresContext::AppUnitsToIntCSSPixels(sizes.LeftRight()); + *aWidth = nsPresContext::AppUnitsToIntCSSPixels(sizes.LeftRight()); + *aHeight = nsPresContext::AppUnitsToIntCSSPixels(sizes.TopBottom()); return NS_OK; } NS_IMETHODIMP nsDOMWindowUtils::GetRootBounds(nsIDOMClientRect** aResult) { if (!nsContentUtils::IsCallerChrome()) {
--- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -1334,17 +1334,17 @@ nsGlobalWindow::FreeInnerObjects() // Make sure that this is called before we null out the document and // other members that the window destroyed observers could // re-create. NotifyDOMWindowDestroyed(this); // Kill all of the workers for this window. nsIScriptContext *scx = GetContextInternal(); - JSContext *cx = scx ? scx->GetNativeContext() : nullptr; + AutoPushJSContext cx(scx ? scx->GetNativeContext() : nullptr); mozilla::dom::workers::CancelWorkersForWindow(cx, this); // Close all IndexedDB databases for this window. indexedDB::IndexedDatabaseManager* idbManager = indexedDB::IndexedDatabaseManager::Get(); if (idbManager) { idbManager->AbortCloseDatabasesForWindow(this); } @@ -1888,17 +1888,17 @@ WindowStateHolder::~WindowStateHolder() } } NS_IMPL_ISUPPORTS1(WindowStateHolder, WindowStateHolder) nsresult nsGlobalWindow::CreateOuterObject(nsGlobalWindow* aNewInner) { - JSContext* cx = mContext->GetNativeContext(); + AutoPushJSContext cx(mContext->GetNativeContext()); JSObject* outer = NewOuterWindowProxy(cx, aNewInner->FastGetGlobalJSObject(), IsChromeWindow()); if (!outer) { return NS_ERROR_FAILURE; } js::SetProxyExtra(outer, 0, js::PrivateValue(ToSupports(this))); @@ -2072,19 +2072,17 @@ nsGlobalWindow::SetNewDocument(nsIDocume } nsRefPtr<nsGlobalWindow> newInnerWindow; bool createdInnerWindow = false; bool thisChrome = IsChromeWindow(); nsCxPusher cxPusher; - if (!cxPusher.Push(cx)) { - return NS_ERROR_FAILURE; - } + cxPusher.Push(cx); XPCAutoRequest ar(cx); nsCOMPtr<WindowStateHolder> wsh = do_QueryInterface(aState); NS_ASSERTION(!aState || wsh, "What kind of weird state are you giving me here?"); if (reUseInnerWindow) { // We're reusing the current inner window. @@ -2992,21 +2990,20 @@ nsGlobalWindow::SetArguments(nsIArray *a return currentInner ? currentInner->DefineArgumentsProperty(aArguments) : NS_OK; } nsresult nsGlobalWindow::DefineArgumentsProperty(nsIArray *aArguments) { - JSContext *cx; nsIScriptContext *ctx = GetOuterWindowInternal()->mContext; - NS_ENSURE_TRUE(aArguments && ctx && - (cx = ctx->GetNativeContext()), - NS_ERROR_NOT_INITIALIZED); + NS_ENSURE_TRUE(aArguments && ctx, NS_ERROR_NOT_INITIALIZED); + AutoPushJSContext cx(ctx->GetNativeContext()); + NS_ENSURE_TRUE(cx, NS_ERROR_NOT_INITIALIZED); if (mIsModalContentWindow) { // Modal content windows don't have an "arguments" property, they // have a "dialogArguments" property which is handled // separately. See nsWindowSH::NewResolve(). return NS_OK; } @@ -6483,35 +6480,20 @@ NS_IMETHODIMP PostMessageEvent::Run() { NS_ABORT_IF_FALSE(mTargetWindow->IsOuterWindow(), "should have been passed an outer window!"); NS_ABORT_IF_FALSE(!mSource || mSource->IsOuterWindow(), "should have been passed an outer window!"); // Get the JSContext for the target window - JSContext* cx = nullptr; nsIScriptContext* scriptContext = mTargetWindow->GetContext(); - if (scriptContext) { - cx = scriptContext->GetNativeContext(); - } - - if (!cx) { - // This can happen if mTargetWindow has been closed. To avoid leaking, - // we need to find a JSContext. - nsIThreadJSContextStack* cxStack = nsContentUtils::ThreadJSContextStack(); - if (cxStack) { - cx = cxStack->GetSafeJSContext(); - } - - if (!cx) { - NS_WARNING("Cannot find a JSContext! Leaking PostMessage buffer."); - return NS_ERROR_FAILURE; - } - } + AutoPushJSContext cx(scriptContext ? scriptContext->GetNativeContext() + : nsContentUtils::GetSafeJSContext()); + MOZ_ASSERT(cx); // If we bailed before this point we're going to leak mMessage, but // that's probably better than crashing. // Ensure that the buffer is freed even if we fail to post the message JSAutoStructuredCloneBuffer buffer; buffer.adopt(mMessage, mMessageLen); mMessage = nullptr; @@ -9957,17 +9939,18 @@ nsGlobalWindow::RunTimeoutHandler(nsTime // Evaluate the timeout expression. const PRUnichar* script = handler->GetHandlerText(); NS_ASSERTION(script, "timeout has no script nor handler text!"); const char* filename = nullptr; uint32_t lineNo = 0; handler->GetLocation(&filename, &lineNo); - JS::CompileOptions options(aScx->GetNativeContext()); + AutoPushJSContext cx(aScx->GetNativeContext()); + JS::CompileOptions options(cx); options.setFileAndLine(filename, lineNo) .setVersion(JSVERSION_DEFAULT); aScx->EvaluateString(nsDependentString(script), *FastGetGlobalJSObject(), options, /*aCoerceToString = */ false, nullptr); } else { nsCOMPtr<nsIVariant> dummy; nsCOMPtr<nsISupports> me(static_cast<nsIDOMWindow *>(this)); aScx->CallEventHandler(me, FastGetGlobalJSObject(), @@ -10750,17 +10733,17 @@ nsGlobalWindow::SuspendTimeouts(uint32_t nsCOMPtr<nsIDeviceSensors> ac = do_GetService(NS_DEVICE_SENSORS_CONTRACTID); if (ac) { for (uint32_t i = 0; i < mEnabledSensors.Length(); i++) ac->RemoveWindowListener(mEnabledSensors[i], this); } // Suspend all of the workers for this window. nsIScriptContext *scx = GetContextInternal(); - JSContext *cx = scx ? scx->GetNativeContext() : nullptr; + AutoPushJSContext cx(scx ? scx->GetNativeContext() : nullptr); mozilla::dom::workers::SuspendWorkersForWindow(cx, this); TimeStamp now = TimeStamp::Now(); for (nsTimeout *t = mTimeouts.getFirst(); t; t = t->getNext()) { // Set mTimeRemaining to be the time remaining for this timer. if (t->mWhen > now) t->mTimeRemaining = t->mWhen - now; else @@ -10830,17 +10813,17 @@ nsGlobalWindow::ResumeTimeouts(bool aTha nsCOMPtr<nsIDeviceSensors> ac = do_GetService(NS_DEVICE_SENSORS_CONTRACTID); if (ac) { for (uint32_t i = 0; i < mEnabledSensors.Length(); i++) ac->AddWindowListener(mEnabledSensors[i], this); } // Resume all of the workers for this window. nsIScriptContext *scx = GetContextInternal(); - JSContext *cx = scx ? scx->GetNativeContext() : nullptr; + AutoPushJSContext cx(scx ? scx->GetNativeContext() : nullptr); mozilla::dom::workers::ResumeWorkersForWindow(cx, this); // Restore all of the timeouts, using the stored time remaining // (stored in timeout->mTimeRemaining). TimeStamp now = TimeStamp::Now(); #ifdef DEBUG @@ -11332,17 +11315,17 @@ nsGlobalChromeWindow::NotifyDefaultButto NS_IMETHODIMP nsGlobalChromeWindow::GetMessageManager(nsIMessageBroadcaster** aManager) { FORWARD_TO_INNER_CHROME(GetMessageManager, (aManager), NS_ERROR_FAILURE); if (!mMessageManager) { nsIScriptContext* scx = GetContextInternal(); NS_ENSURE_STATE(scx); - JSContext* cx = scx->GetNativeContext(); + AutoPushJSContext cx(scx->GetNativeContext()); NS_ENSURE_STATE(cx); nsCOMPtr<nsIMessageBroadcaster> globalMM = do_GetService("@mozilla.org/globalmessagemanager;1"); mMessageManager = new nsFrameMessageManager(nullptr, static_cast<nsFrameMessageManager*>(globalMM.get()), cx, MM_CHROME | MM_BROADCASTER);
--- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -1255,18 +1255,17 @@ nsJSContext::EvaluateString(const nsAStr *aRetValue = JSVAL_VOID; } if (!mScriptsEnabled) { return NS_OK; } nsCxPusher pusher; - if (!pusher.Push(mContext)) - return NS_ERROR_FAILURE; + pusher.Push(mContext); xpc_UnmarkGrayObject(&aScopeObject); nsAutoMicroTask mt; JSPrincipals* p = JS_GetCompartmentPrincipals(js::GetObjectCompartment(&aScopeObject)); aOptions.setPrincipals(p); bool ok = false; @@ -1395,46 +1394,45 @@ nsJSContext::ExecuteScript(JSScript* aSc aScopeObject = JS_GetGlobalObject(mContext); } xpc_UnmarkGrayScript(aScriptObject); xpc_UnmarkGrayObject(aScopeObject); // Push our JSContext on our thread's context stack, in case native code // called from JS calls back into JS via XPConnect. - nsresult rv; - nsCOMPtr<nsIJSContextStack> stack = - do_GetService("@mozilla.org/js/xpc/ContextStack;1", &rv); - if (NS_FAILED(rv) || NS_FAILED(stack->Push(mContext))) { - return NS_ERROR_FAILURE; - } + nsCxPusher pusher; + pusher.Push(mContext); nsJSContext::TerminationFuncHolder holder(this); XPCAutoRequest ar(mContext); - JSAutoCompartment ac(mContext, aScopeObject); - ++mExecuteDepth; - - // The result of evaluation, used only if there were no errors. This need - // not be a GC root currently, provided we run the GC only from the - // operation callback or from ScriptEvaluated. - jsval val; - if (!JS_ExecuteScript(mContext, aScopeObject, aScriptObject, &val)) { - ReportPendingException(); + + // Scope the JSAutoCompartment so that it gets destroyed before we pop the + // cx and potentially call JS_RestoreFrameChain. + { + JSAutoCompartment ac(mContext, aScopeObject); + ++mExecuteDepth; + + // The result of evaluation, used only if there were no errors. This need + // not be a GC root currently, provided we run the GC only from the + // operation callback or from ScriptEvaluated. + jsval val; + if (!JS_ExecuteScript(mContext, aScopeObject, aScriptObject, &val)) { + ReportPendingException(); + } + --mExecuteDepth; } - --mExecuteDepth; // Pop here, after JS_ValueToString and any other possible evaluation. - if (NS_FAILED(stack->Pop(nullptr))) { - rv = NS_ERROR_FAILURE; - } + pusher.Pop(); // ScriptEvaluated needs to come after we pop the stack ScriptEvaluated(true); - return rv; + return NS_OK; } #ifdef DEBUG bool AtomIsEventHandlerName(nsIAtom *aName) { const PRUnichar *name = aName->GetUTF16String(); @@ -1496,33 +1494,32 @@ nsJSContext::CallEventHandler(nsISupport } SAMPLE_LABEL("JS", "CallEventHandler"); nsAutoMicroTask mt; xpc_UnmarkGrayObject(aScope); xpc_UnmarkGrayObject(aHandler); + nsCxPusher pusher; + pusher.Push(mContext); XPCAutoRequest ar(mContext); + JSObject* target = nullptr; nsresult rv = JSObjectFromInterface(aTarget, aScope, &target); NS_ENSURE_SUCCESS(rv, rv); JS::AutoObjectRooter targetVal(mContext, target); jsval rval = JSVAL_VOID; // This one's a lot easier than EvaluateString because we don't have to // hassle with principals: they're already compiled into the JS function. // xxxmarkh - this comment is no longer true - principals are not used at // all now, and never were in some cases. - nsCxPusher pusher; - if (!pusher.Push(mContext, true)) - return NS_ERROR_FAILURE; - // check if the event handler can be run on the object in question rv = sSecurityManager->CheckFunctionAccess(mContext, aHandler, target); nsJSContext::TerminationFuncHolder holder(this); if (NS_SUCCEEDED(rv)) { // Convert args to jsvals. uint32_t argc = 0; @@ -1745,16 +1742,18 @@ nsJSContext::InitializeExternalClasses() } nsresult nsJSContext::SetProperty(JSObject* aTarget, const char* aPropName, nsISupports* aArgs) { uint32_t argc; jsval *argv = nullptr; + nsCxPusher pusher; + pusher.Push(mContext); XPCAutoRequest ar(mContext); Maybe<nsRootedJSValueArray> tempStorage; nsresult rv = ConvertSupportsTojsvals(aArgs, GetNativeGlobal(), &argc, &argv, tempStorage); NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/base/nsStructuredCloneContainer.cpp +++ b/dom/base/nsStructuredCloneContainer.cpp @@ -45,23 +45,21 @@ nsStructuredCloneContainer::InitFromVari // First, try to extract a jsval from the variant |aData|. This works only // if the variant implements GetAsJSVal. jsval jsData; nsresult rv = aData->GetAsJSVal(&jsData); NS_ENSURE_SUCCESS(rv, NS_ERROR_UNEXPECTED); // Make sure that we serialize in the right context. + MOZ_ASSERT(aCx == nsContentUtils::GetCurrentJSContext()); JSAutoRequest ar(aCx); JSAutoCompartment ac(aCx, JS_GetGlobalObject(aCx)); JS_WrapValue(aCx, &jsData); - nsCxPusher cxPusher; - cxPusher.Push(aCx); - uint64_t* jsBytes = nullptr; bool success = JS_WriteStructuredClone(aCx, jsData, &jsBytes, &mSize, nullptr, nullptr, JSVAL_VOID); NS_ENSURE_STATE(success); NS_ENSURE_STATE(jsBytes); // Copy jsBytes into our own buffer. mData = (uint64_t*) malloc(mSize);
--- a/dom/bindings/CallbackObject.cpp +++ b/dom/bindings/CallbackObject.cpp @@ -7,16 +7,17 @@ #include "mozilla/dom/CallbackObject.h" #include "jsfriendapi.h" #include "nsIScriptGlobalObject.h" #include "nsIXPConnect.h" #include "nsIScriptContext.h" #include "nsPIDOMWindow.h" #include "nsJSUtils.h" #include "nsIScriptSecurityManager.h" +#include "xpcprivate.h" namespace mozilla { namespace dom { NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CallbackObject) NS_INTERFACE_MAP_ENTRY(nsISupports) NS_INTERFACE_MAP_END @@ -86,19 +87,17 @@ CallbackObject::CallSetup::CallSetup(JSO // back on using the safe context. cx = nsContentUtils::GetSafeJSContext(); } // Victory! We have a JSContext. Now do the things we need a JSContext for. mAr.construct(cx); // Make sure our JSContext is pushed on the stack. - if (!mCxPusher.Push(cx, false)) { - return; - } + mCxPusher.Push(cx); // After this point we guarantee calling ScriptEvaluated() if we // have an nsIScriptContext. // XXXbz Why, if, say CheckFunctionAccess fails? I know that's how // nsJSContext::CallEventHandler works, but is it required? // FIXME: Bug 807369. mCtx = ctx; @@ -178,10 +177,44 @@ CallbackObject::CallSetup::~CallSetup() // Popping an nsCxPusher is safe even if it never got pushed. mCxPusher.Pop(); if (mCtx) { mCtx->ScriptEvaluated(true); } } +already_AddRefed<nsISupports> +CallbackObjectHolderBase::ToXPCOMCallback(CallbackObject* aCallback, + const nsIID& aIID) +{ + if (!aCallback) { + return nullptr; + } + + JSObject* callback = aCallback->Callback(); + + SafeAutoJSContext cx; + JSAutoCompartment ac(cx, callback); + XPCCallContext ccx(NATIVE_CALLER, cx); + if (!ccx.IsValid()) { + return nullptr; + } + + nsRefPtr<nsXPCWrappedJS> wrappedJS; + nsresult rv = + nsXPCWrappedJS::GetNewOrUsed(ccx, callback, aIID, + nullptr, getter_AddRefs(wrappedJS)); + if (NS_FAILED(rv) || !wrappedJS) { + return nullptr; + } + + nsCOMPtr<nsISupports> retval; + rv = wrappedJS->QueryInterface(aIID, getter_AddRefs(retval)); + if (NS_FAILED(rv)) { + return nullptr; + } + + return retval.forget(); +} + } // namespace dom } // namespace mozilla
--- a/dom/bindings/CallbackObject.h +++ b/dom/bindings/CallbackObject.h @@ -76,16 +76,29 @@ public: } JSObject* Callback() const { xpc_UnmarkGrayObject(mCallback); return mCallback; } + /* + * This getter does not change the color of the JSObject meaning that the + * object returned is not guaranteed to be kept alive past the next CC. + * + * This should only be called if you are certain that the return value won't + * be passed into a JS API function and that it won't be stored without being + * rooted (or otherwise signaling the stored value to the CC). + */ + JSObject* CallbackPreserveColor() const + { + return mCallback; + } + enum ExceptionHandling { eReportExceptions, eRethrowExceptions }; protected: explicit CallbackObject(CallbackObject* aCallbackFunction) : mCallback(aCallbackFunction->mCallback) @@ -159,12 +172,210 @@ protected: // An ErrorResult to possibly re-throw exceptions on and whether // we should re-throw them. ErrorResult& mErrorResult; const ExceptionHandling mExceptionHandling; uint32_t mSavedJSContextOptions; }; }; +template<class WebIDLCallbackT, class XPCOMCallbackT> +class CallbackObjectHolder; + +template<class T, class U> +void ImplCycleCollectionUnlink(CallbackObjectHolder<T, U>& aField); + +class CallbackObjectHolderBase +{ +protected: + // Returns null on all failures + already_AddRefed<nsISupports> ToXPCOMCallback(CallbackObject* aCallback, + const nsIID& aIID); +}; + +template<class WebIDLCallbackT, class XPCOMCallbackT> +class CallbackObjectHolder : CallbackObjectHolderBase +{ + /** + * A class which stores either a WebIDLCallbackT* or an XPCOMCallbackT*. Both + * types must inherit from nsISupports. The pointer that's stored can be + * null. + * + * When storing a WebIDLCallbackT*, mPtrBits is set to the pointer value. + * When storing an XPCOMCallbackT*, mPtrBits is the pointer value with low bit + * set. + */ +public: + explicit CallbackObjectHolder(WebIDLCallbackT* aCallback) + : mPtrBits(reinterpret_cast<uintptr_t>(aCallback)) + { + NS_IF_ADDREF(aCallback); + } + + explicit CallbackObjectHolder(XPCOMCallbackT* aCallback) + : mPtrBits(reinterpret_cast<uintptr_t>(aCallback) | XPCOMCallbackFlag) + { + NS_IF_ADDREF(aCallback); + } + + explicit CallbackObjectHolder(const CallbackObjectHolder& aOther) + : mPtrBits(aOther.mPtrBits) + { + NS_IF_ADDREF(GetISupports()); + } + + CallbackObjectHolder() + : mPtrBits(0) + {} + + ~CallbackObjectHolder() + { + UnlinkSelf(); + } + + nsISupports* GetISupports() const + { + return reinterpret_cast<nsISupports*>(mPtrBits & ~XPCOMCallbackFlag); + } + + // Even if HasWebIDLCallback returns true, GetWebIDLCallback() might still + // return null. + bool HasWebIDLCallback() const + { + return !(mPtrBits & XPCOMCallbackFlag); + } + + WebIDLCallbackT* GetWebIDLCallback() const + { + MOZ_ASSERT(HasWebIDLCallback()); + return reinterpret_cast<WebIDLCallbackT*>(mPtrBits); + } + + XPCOMCallbackT* GetXPCOMCallback() const + { + MOZ_ASSERT(!HasWebIDLCallback()); + return reinterpret_cast<XPCOMCallbackT*>(mPtrBits & ~XPCOMCallbackFlag); + } + + bool operator==(WebIDLCallbackT* aOtherCallback) const + { + if (!aOtherCallback) { + // If other is null, then we must be null to be equal. + return !GetISupports(); + } + + if (!HasWebIDLCallback() || !GetWebIDLCallback()) { + // If other is non-null, then we can't be equal if we have a + // non-WebIDL callback or a null callback. + return false; + } + + JSObject* thisObj = + js::UnwrapObject(GetWebIDLCallback()->CallbackPreserveColor()); + JSObject* otherObj = + js::UnwrapObject(aOtherCallback->CallbackPreserveColor()); + return thisObj == otherObj; + } + + bool operator==(XPCOMCallbackT* aOtherCallback) const + { + return (!aOtherCallback && !GetISupports()) || + (!HasWebIDLCallback() && GetXPCOMCallback() == aOtherCallback); + } + + bool operator==(const CallbackObjectHolder& aOtherCallback) const + { + if (aOtherCallback.HasWebIDLCallback()) { + return *this == aOtherCallback.GetWebIDLCallback(); + } + + return *this == aOtherCallback.GetXPCOMCallback(); + } + + // Try to return an XPCOMCallbackT version of this object. + already_AddRefed<XPCOMCallbackT> ToXPCOMCallback() + { + if (!HasWebIDLCallback()) { + nsRefPtr<XPCOMCallbackT> callback = GetXPCOMCallback(); + return callback.forget(); + } + + nsCOMPtr<nsISupports> supp = + CallbackObjectHolderBase::ToXPCOMCallback(GetWebIDLCallback(), + NS_GET_TEMPLATE_IID(XPCOMCallbackT)); + // ToXPCOMCallback already did the right QI for us. + return static_cast<XPCOMCallbackT*>(supp.forget().get()); + } + + // Try to return a WebIDLCallbackT version of this object. + already_AddRefed<WebIDLCallbackT> ToWebIDLCallback() + { + if (HasWebIDLCallback()) { + nsRefPtr<WebIDLCallbackT> callback = GetWebIDLCallback(); + return callback.forget(); + } + + XPCOMCallbackT* callback = GetXPCOMCallback(); + if (!callback) { + return nullptr; + } + + nsCOMPtr<nsIXPConnectWrappedJS> wrappedJS = do_QueryInterface(callback); + if (!wrappedJS) { + return nullptr; + } + + JSObject* obj; + if (NS_FAILED(wrappedJS->GetJSObject(&obj)) || !obj) { + return nullptr; + } + + SafeAutoJSContext cx; + JSAutoCompartment ac(cx, obj); + + bool inited; + nsRefPtr<WebIDLCallbackT> newCallback = + new WebIDLCallbackT(cx, nullptr, obj, &inited); + if (!inited) { + return nullptr; + } + return newCallback.forget(); + } + +private: + static const uintptr_t XPCOMCallbackFlag = 1u; + + friend void + ImplCycleCollectionUnlink<WebIDLCallbackT, + XPCOMCallbackT>(CallbackObjectHolder& aField); + + void UnlinkSelf() + { + // NS_IF_RELEASE because we might have been unlinked before + nsISupports* ptr = GetISupports(); + NS_IF_RELEASE(ptr); + mPtrBits = 0; + } + + uintptr_t mPtrBits; +}; + +template<class T, class U> +inline void +ImplCycleCollectionTraverse(nsCycleCollectionTraversalCallback& aCallback, + CallbackObjectHolder<T, U>& aField, + const char* aName, + uint32_t aFlags = 0) +{ + CycleCollectionNoteChild(aCallback, aField.GetISupports(), aName, aFlags); +} + +template<class T, class U> +void +ImplCycleCollectionUnlink(CallbackObjectHolder<T, U>& aField) +{ + aField.UnlinkSelf(); +} + } // namespace dom } // namespace mozilla #endif // mozilla_dom_CallbackObject_h
--- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -2619,17 +2619,16 @@ for (uint32_t i = 0; i < length; ++i) { if type.isGeckoInterface(): assert not isEnforceRange and not isClamp descriptor = descriptorProvider.getDescriptor( type.unroll().inner.identifier.name) if (descriptor.interface.isCallback() and - descriptor.interface.identifier.name != "NodeFilter" and descriptor.interface.identifier.name != "EventListener"): if descriptor.workers: if type.nullable(): declType = CGGeneric("JSObject*") else: declType = CGGeneric("NonNull<JSObject>") conversion = " ${declName} = &${val}.toObject();\n" else: @@ -3465,18 +3464,17 @@ if (!returnArray) { } }\n""" % (result, exceptionCodeIndented.define(), innerTemplate, CGIndenter(exceptionCodeIndented, 4).define())) + setValue("JS::ObjectValue(*returnArray)"), False) if (type.isGeckoInterface() and (not type.isCallbackInterface() or - type.unroll().inner.identifier.name == "EventListener" or - type.unroll().inner.identifier.name == "NodeFilter")): + type.unroll().inner.identifier.name == "EventListener")): descriptor = descriptorProvider.getDescriptor(type.unroll().inner.identifier.name) if type.nullable(): wrappingCode = ("if (!%s) {\n" % (result) + CGIndenter(CGGeneric(setValue("JSVAL_NULL"))).define() + "\n" + "}\n") else: wrappingCode = "" @@ -7459,17 +7457,16 @@ class CGNativeMember(ClassMethod): if type.isUnion(): if type.nullable(): type = type.inner return str(type), True, True if (type.isGeckoInterface() and (not type.isCallbackInterface() or - type.unroll().inner.identifier.name == "NodeFilter" or type.unroll().inner.identifier.name == "EventListener")): iface = type.unroll().inner argIsPointer = type.nullable() or iface.isExternal() forceOwningType = iface.isCallback() or isMember if argIsPointer: if (optional or isMember) and forceOwningType: typeDecl = "nsRefPtr<%s>" else:
--- a/dom/bindings/test/test_bug773326.html +++ b/dom/bindings/test/test_bug773326.html @@ -1,16 +1,16 @@ <!doctype html> <meta charset=utf-8> <title>Test for Bug 773326</title> <script src=/resources/testharness.js></script> <script src=/resources/testharnessreport.js></script> <div id=log></div> <script> -if (navigator.platform.indexOf("Linux") == 0) { +if (navigator.platform.startsWith("Linux")) { SimpleTest.expectAssertions(0, 2); } else { SimpleTest.expectAssertions(2); } test(function() { new Worker("data:text/javascript,new XMLHttpRequest(42)"); }, "Should not crash") </script>
--- a/dom/devicestorage/nsDeviceStorage.cpp +++ b/dom/devicestorage/nsDeviceStorage.cpp @@ -796,17 +796,17 @@ jsval InterfaceToJsval(nsPIDOMWindow* aW return JSVAL_NULL; } nsIScriptContext *scriptContext = sgo->GetScriptContext(); if (!scriptContext) { return JSVAL_NULL; } - JSContext *cx = scriptContext->GetNativeContext(); + AutoPushJSContext cx(scriptContext->GetNativeContext()); if (!cx) { return JSVAL_NULL; } jsval someJsVal; nsresult rv = nsContentUtils::WrapNative(cx, JS_GetGlobalObject(cx), aObject, @@ -848,17 +848,17 @@ jsval StringToJsval(nsPIDOMWindow* aWind return JSVAL_NULL; } nsIScriptContext *scriptContext = sgo->GetScriptContext(); if (!scriptContext) { return JSVAL_NULL; } - JSContext *cx = scriptContext->GetNativeContext(); + AutoPushJSContext cx(scriptContext->GetNativeContext()); if (!cx) { return JSVAL_NULL; } JSAutoRequest ar(cx); jsval result = JSVAL_NULL; if (!xpc::StringToJsval(cx, aString, &result)) {
--- a/dom/encoding/test/test_TextEncoder.html +++ b/dom/encoding/test/test_TextEncoder.html @@ -7,17 +7,17 @@ <script type="text/javascript" src="/resources/testharnessreport.js"></script> <script type="text/javascript" src="test_TextEncoder.js"></script> <script type="text/javascript" src="worker_helper.js"></script> </head> <body> <div id="log"></div> <script> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 2); } else { SimpleTest.expectAssertions(2); } setup({explicit_done: true}); runTest();
--- a/dom/file/ArchiveRequest.cpp +++ b/dom/file/ArchiveRequest.cpp @@ -124,17 +124,17 @@ ArchiveRequest::ReaderReady(nsTArray<nsC } JS::Value result; nsresult rv; nsIScriptContext* sc = GetContextForEventHandlers(&rv); NS_ENSURE_STATE(sc); - JSContext* cx = sc->GetNativeContext(); + AutoPushJSContext cx(sc->GetNativeContext()); NS_ASSERTION(cx, "Failed to get a context!"); JSObject* global = sc->GetNativeGlobal(); NS_ASSERTION(global, "Failed to get global object!"); JSAutoRequest ar(cx); JSAutoCompartment ac(cx, global);
--- a/dom/file/FileRequest.cpp +++ b/dom/file/FileRequest.cpp @@ -68,17 +68,17 @@ FileRequest::NotifyHelperCompleted(FileH } // Otherwise we need to get the result from the helper. jsval result; nsIScriptContext* sc = GetContextForEventHandlers(&rv); NS_ENSURE_STATE(sc); - JSContext* cx = sc->GetNativeContext(); + AutoPushJSContext cx(sc->GetNativeContext()); NS_ASSERTION(cx, "Failed to get a context!"); JSObject* global = sc->GetNativeGlobal(); NS_ASSERTION(global, "Failed to get global object!"); JSAutoRequest ar(cx); JSAutoCompartment ac(cx, global);
--- a/dom/indexedDB/IDBFactory.cpp +++ b/dom/indexedDB/IDBFactory.cpp @@ -209,25 +209,17 @@ IDBFactory::Create(ContentParent* aConte } } #endif nsCOMPtr<nsIPrincipal> principal = do_CreateInstance("@mozilla.org/nullprincipal;1"); NS_ENSURE_TRUE(principal, NS_ERROR_FAILURE); - JSContext* cx = nsContentUtils::GetSafeJSContext(); - NS_ENSURE_TRUE(cx, NS_ERROR_FAILURE); - - nsCxPusher pusher; - if (!pusher.Push(cx)) { - NS_WARNING("Failed to push safe JS context!"); - return NS_ERROR_FAILURE; - } - + SafeAutoJSContext cx; JSAutoRequest ar(cx); nsIXPConnect* xpc = nsContentUtils::XPConnect(); NS_ASSERTION(xpc, "This should never be null!"); nsCOMPtr<nsIXPConnectJSObjectHolder> globalHolder; nsresult rv = xpc->CreateSandbox(cx, principal, getter_AddRefs(globalHolder)); NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/indexedDB/IDBRequest.cpp +++ b/dom/indexedDB/IDBRequest.cpp @@ -91,17 +91,17 @@ IDBRequest::NotifyHelperCompleted(Helper // See if our window is still valid. If not then we're going to pretend that // we never completed. if (NS_FAILED(CheckInnerWindowCorrectness())) { return NS_OK; } // Otherwise we need to get the result from the helper. - JSContext* cx = GetJSContext(); + AutoPushJSContext cx(GetJSContext()); if (!cx) { NS_WARNING("Failed to get safe JSContext!"); rv = NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR; SetError(rv); return rv; } JSObject* global = GetParentObject();
--- a/dom/interfaces/base/nsIDOMWindowUtils.idl +++ b/dom/interfaces/base/nsIDOMWindowUtils.idl @@ -36,17 +36,17 @@ interface nsIDOMWindow; interface nsIDOMBlob; interface nsIDOMFile; interface nsIFile; interface nsIDOMTouch; interface nsIDOMClientRect; interface nsIURI; interface nsIDOMEventTarget; -[scriptable, uuid(16b3bdcc-75d4-11e2-8a20-aaff78957a39)] +[scriptable, uuid(9ab64e24-7f8d-11e2-9a5f-a24379957a39)] interface nsIDOMWindowUtils : nsISupports { /** * Image animation mode of the window. When this attribute's value * is changed, the implementation should set all images in the window * to the given value. That is, when set to kDontAnimMode, all images * will stop animating. The attribute's value must be one of the * animationMode values from imgIContainer. @@ -647,17 +647,17 @@ interface nsIDOMWindowUtils : nsISupport */ void getScrollXY(in boolean aFlushLayout, out long aScrollX, out long aScrollY); /** * Returns the scrollbar width of the window's scroll frame. * * @param aFlushLayout flushes layout if true. Otherwise, no flush occurs. */ - long getScrollbarWidth(in boolean aFlushLayout); + void getScrollbarSize(in boolean aFlushLayout, out long aWidth, out long aHeight); /** * Returns the bounds of the window's currently loaded document. This will * generally be (0, 0, pageWidth, pageHeight) but in some cases (e.g. RTL * documents) may have a negative left value. */ nsIDOMClientRect getRootBounds();
--- a/dom/interfaces/geolocation/Makefile.in +++ b/dom/interfaces/geolocation/Makefile.in @@ -17,15 +17,16 @@ GRE_MODULE = 1 XPIDLSRCS = \ nsIDOMGeoGeolocation.idl \ nsIDOMGeoPosition.idl \ nsIDOMGeoPositionCoords.idl \ nsIDOMGeoPositionCallback.idl \ nsIDOMGeoPositionError.idl \ nsIDOMGeoPositionErrorCallback.idl \ nsIDOMNavigatorGeolocation.idl \ + nsIGeolocation.idl \ $(NULL) include $(topsrcdir)/config/rules.mk XPIDL_FLAGS += \ -I$(topsrcdir)/dom/interfaces/base \ $(NULL)
new file mode 100644 --- /dev/null +++ b/dom/interfaces/geolocation/nsIGeolocation.idl @@ -0,0 +1,29 @@ +/* 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 "domstubs.idl" + +interface nsIDOMGeoPositionCallback; +interface nsIDOMGeoPositionErrorCallback; +[ptr] native GeoPositionOptions(mozilla::idl::GeoPositionOptions); + +%{C++ +namespace mozilla { +namespace idl { +class GeoPositionOptions; +} +} +%} + +[scriptable, builtinclass, uuid(d8e6449f-92c8-4c6a-aa9f-fef70157ec29)] +interface nsIGeolocation : nsISupports +{ + // Versions of the DOM APIs that don't require JS option values + int32_t watchPosition(in nsIDOMGeoPositionCallback callback, + in nsIDOMGeoPositionErrorCallback errorCallback, + in GeoPositionOptions options); + void getCurrentPosition(in nsIDOMGeoPositionCallback callback, + in nsIDOMGeoPositionErrorCallback errorCallback, + in GeoPositionOptions options); +};
--- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -120,16 +120,17 @@ static const char* sClipboardTextFlavors using base::ChildPrivileges; using base::KillProcess; using namespace mozilla::dom::bluetooth; using namespace mozilla::dom::devicestorage; using namespace mozilla::dom::indexedDB; using namespace mozilla::dom::power; using namespace mozilla::dom::sms; using namespace mozilla::hal; +using namespace mozilla::idl; using namespace mozilla::ipc; using namespace mozilla::layers; using namespace mozilla::net; namespace mozilla { namespace dom { #define NS_IPC_IOSERVICE_SET_OFFLINE_TOPIC "ipc:network:set-offline" @@ -2278,18 +2279,34 @@ ContentParent::RecvFilePathUpdateNotify( nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService(); if (!obs) { return false; } obs->NotifyObservers(dsf, "file-watcher-update", NS_ConvertASCIItoUTF16(aReason).get()); return true; } +static int32_t +AddGeolocationListener(nsIDOMGeoPositionCallback* watcher, bool highAccuracy) +{ + nsCOMPtr<nsIGeolocation> geo = do_GetService("@mozilla.org/geolocation;1"); + if (!geo) { + return -1; + } + + GeoPositionOptions* options = new GeoPositionOptions(); + options->enableHighAccuracy = highAccuracy; + int32_t retval = 1; + geo->WatchPosition(watcher, nullptr, options, &retval); + return retval; +} + bool -ContentParent::RecvAddGeolocationListener(const IPC::Principal& aPrincipal) +ContentParent::RecvAddGeolocationListener(const IPC::Principal& aPrincipal, + const bool& aHighAccuracy) { #ifdef MOZ_PERMISSIONS if (Preferences::GetBool("geo.testing.ignore_ipc_principal", false) == false) { nsIPrincipal* principal = aPrincipal; if (principal == nullptr) { KillHard(); return true; } @@ -2331,27 +2348,17 @@ ContentParent::RecvAddGeolocationListene return true; } } #endif // To ensure no geolocation updates are skipped, we always force the // creation of a new listener. RecvRemoveGeolocationListener(); - - nsCOMPtr<nsIDOMGeoGeolocation> geo = do_GetService("@mozilla.org/geolocation;1"); - if (!geo) { - return true; - } - - nsRefPtr<nsGeolocation> geosvc = static_cast<nsGeolocation*>(geo.get()); - nsAutoPtr<mozilla::idl::GeoPositionOptions> options(new mozilla::idl::GeoPositionOptions()); - jsval null = JS::NullValue(); - options->Init(nullptr, &null); - geosvc->WatchPosition(this, nullptr, options.forget(), &mGeolocationWatchID); + mGeolocationWatchID = AddGeolocationListener(this, aHighAccuracy); return true; } bool ContentParent::RecvRemoveGeolocationListener() { if (mGeolocationWatchID != -1) { nsCOMPtr<nsIDOMGeoGeolocation> geo = do_GetService("@mozilla.org/geolocation;1"); @@ -2362,22 +2369,23 @@ ContentParent::RecvRemoveGeolocationList mGeolocationWatchID = -1; } return true; } bool ContentParent::RecvSetGeolocationHigherAccuracy(const bool& aEnable) { - nsRefPtr<nsGeolocationService> geoSvc = - nsGeolocationService::GetGeolocationService(); - if (geoSvc) { - geoSvc->SetHigherAccuracy(aEnable); - } - return true; + // This should never be called without a listener already present, + // so this check allows us to forgo securing privileges. + if (mGeolocationWatchID != -1) { + RecvRemoveGeolocationListener(); + mGeolocationWatchID = AddGeolocationListener(this, aEnable); + } + return true; } NS_IMETHODIMP ContentParent::HandleEvent(nsIDOMGeoPosition* postion) { unused << SendGeolocationUpdate(GeoPosition(postion)); return NS_OK; }
--- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -334,17 +334,18 @@ private: InfallibleTArray<nsString>* aRetvals); virtual bool RecvAsyncMessage(const nsString& aMsg, const ClonedMessageData& aData); virtual bool RecvFilePathUpdateNotify(const nsString& aType, const nsString& aFilePath, const nsCString& aReason); - virtual bool RecvAddGeolocationListener(const IPC::Principal& aPrincipal); + virtual bool RecvAddGeolocationListener(const IPC::Principal& aPrincipal, + const bool& aHighAccuracy); virtual bool RecvRemoveGeolocationListener(); virtual bool RecvSetGeolocationHigherAccuracy(const bool& aEnable); virtual bool RecvConsoleMessage(const nsString& aMessage); virtual bool RecvScriptError(const nsString& aMessage, const nsString& aSourceName, const nsString& aSourceLine, const uint32_t& aLineNumber,
--- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -425,17 +425,17 @@ parent: bool textClickable, nsString cookie, nsString name); PExternalHelperApp(OptionalURIParams uri, nsCString aMimeContentType, nsCString aContentDisposition, bool aForceSave, int64_t aContentLength, OptionalURIParams aReferrer); - AddGeolocationListener(Principal principal); + AddGeolocationListener(Principal principal, bool highAccuracy); RemoveGeolocationListener(); SetGeolocationHigherAccuracy(bool enable); ConsoleMessage(nsString message); ScriptError(nsString message, nsString sourceName, nsString sourceLine, uint32_t lineNumber, uint32_t colNumber, uint32_t flags, nsCString category);
--- a/dom/media/tests/mochitest/test_getUserMedia_basicAudio.html +++ b/dom/media/tests/mochitest/test_getUserMedia_basicAudio.html @@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=781534">mozGetUserMedia Basic Audio Test</a> <p id="display"></p> <div id="content" style="display: none"> <audio id="testAudio"></audio> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 1); } /** * Run a test to verify that we can complete a start and stop media playback * cycle for an audio LocalMediaStream on an audio HTMLMediaElement. */ runTest(function () {
--- a/dom/media/tests/mochitest/test_getUserMedia_basicVideo.html +++ b/dom/media/tests/mochitest/test_getUserMedia_basicVideo.html @@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=781534">mozGetUserMedia Basic Video Test</a> <p id="display"></p> <div id="content" style="display: none"> <video id="testVideo"></video> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 1); } /** * Run a test to verify that we can complete a start and stop media playback * cycle for an video LocalMediaStream on a video HTMLMediaElement. */ runTest(function () {
--- a/dom/media/tests/mochitest/test_getUserMedia_basicVideoAudio.html +++ b/dom/media/tests/mochitest/test_getUserMedia_basicVideoAudio.html @@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=781534">mozGetUserMedia Basic Video & Audio Test</a> <p id="display"></p> <div id="content" style="display: none"> <video id="testVideoAudio"></video> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 1); } /** * Run a test to verify that we can complete a start and stop media playback * cycle for a video and audio LocalMediaStream on a video HTMLMediaElement. */ runTest(function () {
--- a/dom/media/tests/mochitest/test_getUserMedia_exceptions.html +++ b/dom/media/tests/mochitest/test_getUserMedia_exceptions.html @@ -14,17 +14,17 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=795367">Test mozGetUserMedia Exceptions</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 1); } /** These tests verify that the appropriate exception is thrown when incorrect values are provided to the immediate mozGetUserMedia call. */ var exceptionTests = [
--- a/dom/media/tests/mochitest/test_getUserMedia_stopVideoAudioStream.html +++ b/dom/media/tests/mochitest/test_getUserMedia_stopVideoAudioStream.html @@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=822109">mozGetUserMedia Stop Video Audio Stream</a> <p id="display"></p> <div id="content" style="display: none"> <video id="testVideo"></video> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 2); } /** * Run a test to verify that we can start a video+audio stream in a * media element, call stop() on the stream, and successfully get an * ended event fired. */
--- a/dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html +++ b/dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html @@ -19,17 +19,17 @@ https://bugzilla.mozilla.org/show_bug.cg <video id="videoPCLocal" width="160" height="120" controls></video> <video id="videoPCRemote" width="160" height="120" controls></video> <video id="videoLocal" width="160" height="120" controls></video> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Win") == 0) { +if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 9); } else { SimpleTest.expectAssertions(0, 1); } var audioLocal; var audioPCLocal; var audioPCRemote;
--- a/dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html +++ b/dom/media/tests/mochitest/test_peerConnection_basicAudioVideoCombined.html @@ -19,17 +19,17 @@ https://bugzilla.mozilla.org/show_bug.cg <video id="videoPCLocal" width="160" height="120" controls></video> <video id="videoPCRemote" width="160" height="120" controls></video> <video id="videoLocal" width="160" height="120" controls></video> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Linux") != 0) { +if (!navigator.platform.startsWith("Linux")) { SimpleTest.expectAssertions(0, 1); } var audioLocal; var videoLocal; var videoPCLocal; var videoPCRemote;
--- a/dom/mms/src/ril/MmsService.js +++ b/dom/mms/src/ril/MmsService.js @@ -29,22 +29,24 @@ const HTTP_STATUS_OK = 200; const CONFIG_SEND_REPORT_NEVER = 0; const CONFIG_SEND_REPORT_DEFAULT_NO = 1; const CONFIG_SEND_REPORT_DEFAULT_YES = 2; const CONFIG_SEND_REPORT_ALWAYS = 3; const TIME_TO_BUFFER_MMS_REQUESTS = 30000; const TIME_TO_RELEASE_MMS_CONNECTION = 30000; - const PREF_RETRIEVAL_MODE = 'dom.mms.retrieval_mode'; const RETRIEVAL_MODE_MANUAL = "manual"; const RETRIEVAL_MODE_AUTOMATIC = "automatic"; const RETRIEVAL_MODE_NEVER = "never"; +const MAX_RETRY_COUNT = Services.prefs.getIntPref("dom.mms.retrievalRetryCount"); +const DELAY_TIME_TO_RETRY = Services.prefs.getIntPref("dom.mms.retrievalRetryInterval"); + XPCOMUtils.defineLazyServiceGetter(this, "gpps", "@mozilla.org/network/protocol-proxy-service;1", "nsIProtocolProxyService"); XPCOMUtils.defineLazyServiceGetter(this, "gUUIDGenerator", "@mozilla.org/uuid-generator;1", "nsIUUIDGenerator"); @@ -477,49 +479,69 @@ function RetrieveTransaction(contentLoca } RetrieveTransaction.prototype = { /** * @param callback [optional] * A callback function that takes two arguments: one for X-Mms-Status, * the other for the parsed M-Retrieve.conf message. */ run: function run(callback) { - let callbackIfValid = function callbackIfValid(status, msg) { + this.retryCount = 0; + let that = this; + this.retrieve((function retryCallback(mmsStatus, msg) { + if (MMS.MMS_PDU_STATUS_DEFERRED == mmsStatus && + that.retryCount < MAX_RETRY_COUNT) { + that.retryCount++; + let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + timer.initWithCallback((function (){ + this.retrieve(retryCallback); + }).bind(that), + DELAY_TIME_TO_RETRY, + Ci.nsITimer.TYPE_ONE_SHOT); + return; + } if (callback) { - callback(status, msg); + callback(mmsStatus, msg); } - } + }).bind(this)); + }, + /** + * @param callback + * A callback function that takes two arguments: one for X-Mms-Status, + * the other for the parsed M-Retrieve.conf message. + */ + retrieve: function retrieve(callback) { gMmsTransactionHelper.sendRequest("GET", this.contentLocation, null, (function (httpStatus, data) { if ((httpStatus != HTTP_STATUS_OK) || !data) { - callbackIfValid(MMS.MMS_PDU_STATUS_DEFERRED, null); + callback(MMS.MMS_PDU_STATUS_DEFERRED, null); return; } let retrieved = MMS.PduHelper.parse(data, null); if (!retrieved || (retrieved.type != MMS.MMS_PDU_TYPE_RETRIEVE_CONF)) { - callbackIfValid(MMS.MMS_PDU_STATUS_UNRECOGNISED, null); + callback(MMS.MMS_PDU_STATUS_UNRECOGNISED, null); return; } // Fix default header field values. if (retrieved.headers["x-mms-delivery-report"] == null) { retrieved.headers["x-mms-delivery-report"] = false; } let retrieveStatus = retrieved.headers["x-mms-retrieve-status"]; if ((retrieveStatus != null) && (retrieveStatus != MMS.MMS_PDU_ERROR_OK)) { - callbackIfValid(MMS.translatePduErrorToStatus(retrieveStatus), + callback(MMS.translatePduErrorToStatus(retrieveStatus), retrieved); return; } - callbackIfValid(MMS.MMS_PDU_STATUS_RETRIEVED, retrieved); + callback(MMS.MMS_PDU_STATUS_RETRIEVED, retrieved); }).bind(this)); } }; /** * SendTransaction. * Class for sending M-Send.req to MMSC */ @@ -744,27 +766,16 @@ MmsService.prototype = { Ci.nsIWapPushApplication]), /* * Whether or not should we enable X-Mms-Report-Allowed in M-NotifyResp.ind * and M-Acknowledge.ind PDU. */ confSendDeliveryReport: CONFIG_SEND_REPORT_DEFAULT_YES, /** - * @param status - * The MMS error type. - * - * @return true if it's a type of transient error; false otherwise. - */ - isTransientError: function isTransientError(status) { - return (status >= MMS.MMS_PDU_ERROR_TRANSIENT_FAILURE && - status < MMS.MMS_PDU_ERROR_PERMANENT_FAILURE); - }, - - /** * Calculate Whether or not should we enable X-Mms-Report-Allowed. * * @param config * Current configure value. * @param wish * Sender wish. Could be undefined, false, or true. */ getReportAllowed: function getReportAllowed(config, wish) { @@ -782,17 +793,16 @@ MmsService.prototype = { * X-Mms-Content-Location of the message. * @param callback [optional] * A callback function that takes two arguments: one for X-Mms-Status, * the other parsed MMS message. */ retrieveMessage: function retrieveMessage(contentLocation, callback) { // TODO: bug 839436 - make DB be able to save MMS messages // TODO: bug 810099 - support onretrieving event - // TODO: bug 810097 - Retry retrieval on error // TODO: bug 809832 - support customizable max incoming/outgoing message // size. let transaction = new RetrieveTransaction(contentLocation); transaction.run(callback); }, /** @@ -811,20 +821,17 @@ MmsService.prototype = { let retrievalMode = RETRIEVAL_MODE_MANUAL; try { retrievalMode = Services.prefs.getCharPref(PREF_RETRIEVAL_MODE); } catch (e) {} if (RETRIEVAL_MODE_AUTOMATIC === retrievalMode) { this.retrieveMessage(url, (function responseNotify(mmsStatus, retrievedMsg) { debug("retrievedMsg = " + JSON.stringify(retrievedMsg)); - if (this.isTransientError(mmsStatus)) { - // TODO: remove this check after bug 810097 is landed. - return; - } + // TODO: Bug 845643 - B2G MMS: Save retrieved MM into database. let transactionId = notification.headers["x-mms-transaction-id"]; // For X-Mms-Report-Allowed let wish = notification.headers["x-mms-delivery-report"]; // `The absence of the field does not indicate any default value.` // So we go checking the same field in retrieved message instead. if ((wish == null) && retrievedMsg) {
--- a/dom/network/src/MobileConnection.cpp +++ b/dom/network/src/MobileConnection.cpp @@ -207,17 +207,17 @@ MobileConnection::Observe(nsISupports* a nsString lockType; int32_t retryCount = -1; // Decode the json string "errorMsg" and retrieve its properties: // "lockType" and "retryCount". nsresult rv; nsIScriptContext* sc = GetContextForEventHandlers(&rv); NS_ENSURE_STATE(sc); - JSContext* cx = sc->GetNativeContext(); + AutoPushJSContext cx(sc->GetNativeContext()); NS_ASSERTION(cx, "Failed to get a context!"); nsCOMPtr<nsIJSON> json(new nsJSON()); jsval error; rv = json->DecodeToJSVal(errorMsg, cx, &error); NS_ENSURE_SUCCESS(rv, rv); jsval type;
--- a/dom/network/src/TCPSocketParent.cpp +++ b/dom/network/src/TCPSocketParent.cpp @@ -39,25 +39,18 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(TCPSock NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TCPSocketParent) NS_INTERFACE_MAP_ENTRY(nsITCPSocketParent) NS_INTERFACE_MAP_ENTRY(nsISupports) NS_INTERFACE_MAP_END bool TCPSocketParent::Init(const nsString& aHost, const uint16_t& aPort, const bool& aUseSSL, - const nsString& aBinaryType, PBrowserParent* aBrowser) + const nsString& aBinaryType) { - // We don't have browser actors in xpcshell, and hence can't run automated - // tests without this loophole. - if (aBrowser && !AssertAppProcessPermission(aBrowser, "tcp-socket")) { - FireInteralError(this, __LINE__); - return true; - } - nsresult rv; mIntermediary = do_CreateInstance("@mozilla.org/tcp-socket-intermediary;1", &rv); if (NS_FAILED(rv)) { FireInteralError(this, __LINE__); return true; } rv = mIntermediary->Open(this, aHost, aPort, aUseSSL, aBinaryType, getter_AddRefs(mSocket));
--- a/dom/network/src/TCPSocketParent.h +++ b/dom/network/src/TCPSocketParent.h @@ -22,18 +22,17 @@ class TCPSocketParent : public mozilla:: public: NS_DECL_CYCLE_COLLECTION_CLASS(TCPSocketParent) NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_NSITCPSOCKETPARENT TCPSocketParent() : mIntermediaryObj(nullptr), mIPCOpen(true) {} bool Init(const nsString& aHost, const uint16_t& aPort, - const bool& useSSL, const nsString& aBinaryType, - PBrowserParent* aBrowser); + const bool& useSSL, const nsString& aBinaryType); virtual bool RecvSuspend() MOZ_OVERRIDE; virtual bool RecvResume() MOZ_OVERRIDE; virtual bool RecvClose() MOZ_OVERRIDE; virtual bool RecvData(const SendableData& aData) MOZ_OVERRIDE; virtual bool RecvRequestDelete() MOZ_OVERRIDE; private:
--- a/dom/network/tests/test_tcpsocket_enabled_with_perm.html +++ b/dom/network/tests/test_tcpsocket_enabled_with_perm.html @@ -7,17 +7,17 @@ </head> <body> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Linux") == 0) { +if (navigator.platform.startsWith("Linux")) { SimpleTest.expectAssertions(0, 1); } /** Test to ensure TCPSocket permission being turned on enables navigator.mozTCPSocket, and mozTCPSocket.open works when the tcp-socket permission has been granted. **/ SpecialPowers.setBoolPref("dom.mozTCPSocket.enabled", true);
--- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -1216,17 +1216,17 @@ void NP_CALLBACK NPObject* NP_CALLBACK _getwindowobject(NPP npp) { if (!NS_IsMainThread()) { NPN_PLUGIN_LOG(PLUGIN_LOG_ALWAYS,("NPN_getwindowobject called from the wrong thread\n")); return nullptr; } - JSContext *cx = GetJSContextFromNPP(npp); + AutoPushJSContext cx(GetJSContextFromNPP(npp)); NS_ENSURE_TRUE(cx, nullptr); // Using ::JS_GetGlobalObject(cx) is ok here since the window we // want to return here is the outer window, *not* the inner (since // we don't know what the plugin will do with it). return nsJSObjWrapper::GetNewOrUsed(npp, cx, ::JS_GetGlobalObject(cx)); } @@ -1243,17 +1243,17 @@ NPObject* NP_CALLBACK return nullptr; nsCOMPtr<nsIDOMElement> element; inst->GetDOMElement(getter_AddRefs(element)); if (!element) return nullptr; - JSContext *cx = GetJSContextFromNPP(npp); + AutoPushJSContext cx(GetJSContextFromNPP(npp)); NS_ENSURE_TRUE(cx, nullptr); nsCOMPtr<nsIXPConnect> xpc(do_GetService(nsIXPConnect::GetCID())); NS_ENSURE_TRUE(xpc, nullptr); nsCOMPtr<nsIXPConnectJSObjectHolder> holder; xpc->WrapNative(cx, ::JS_GetGlobalObject(cx), element, NS_GET_IID(nsIDOMElement), @@ -1514,17 +1514,17 @@ bool NP_CALLBACK if (!npp) return false; NPPAutoPusher nppPusher(npp); nsIDocument *doc = GetDocumentFromNPP(npp); NS_ENSURE_TRUE(doc, false); - JSContext *cx = GetJSContextFromDoc(doc); + AutoPushJSContext cx(GetJSContextFromDoc(doc)); NS_ENSURE_TRUE(cx, false); nsCOMPtr<nsIScriptContext> scx = GetScriptContextFromJSContext(cx); NS_ENSURE_TRUE(scx, false); JSAutoRequest req(cx); JSObject *obj =
--- a/dom/plugins/test/mochitest/test_GCrace.html +++ b/dom/plugins/test/mochitest/test_GCrace.html @@ -15,17 +15,17 @@ function start() { if (!SimpleTest.testPluginIsOOP()) { ok(true, "Skipping this test when test plugin is not OOP."); SimpleTest.finish(); return; } else { - if (navigator.platform.indexOf("Win") == 0) { + if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(0, 66); } else { SimpleTest.expectAssertions(0, 1); } setTimeout(checkGCRace, 1000); } }
--- a/dom/plugins/test/mochitest/test_cookies.html +++ b/dom/plugins/test/mochitest/test_cookies.html @@ -2,17 +2,17 @@ <head> <title>NPAPI Cookie Tests</title> <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> </head> <body onload="runTests()"> <embed id="plugin1" type="application/x-test" width="400" height="400"></embed> <script class="testbody" type="application/javascript"> -if (navigator.platform.indexOf("Mac") != 0) { +if (!navigator.platform.startsWith("Mac")) { SimpleTest.expectAssertions(1); } SimpleTest.waitForExplicitFinish(); function runTests() { var pluginElement = document.getElementById("plugin1"); pluginElement.setCookie("foo"); is(pluginElement.getCookie(), "foo", "Cookie was set and retrieved correctly via NPAPI."); SimpleTest.finish();
--- a/dom/plugins/test/mochitest/test_pluginstream_seek_close.html +++ b/dom/plugins/test/mochitest/test_pluginstream_seek_close.html @@ -1,17 +1,17 @@ <body> <head> <title>NPAPI Seekable NPStream Test</title> <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> <script> - if (navigator.platform.indexOf("Linux") == 0) { + if (navigator.platform.startsWith("Linux")) { SimpleTest.expectAssertions(0, 1); } SimpleTest.waitForExplicitFinish(); function frameLoaded() { var testframe = document.getElementById('testframe'); var content = testframe.contentDocument.body.innerHTML;
--- a/dom/plugins/test/mochitest/test_twostreams.html +++ b/dom/plugins/test/mochitest/test_twostreams.html @@ -5,17 +5,17 @@ src="/tests/SimpleTest/SimpleTest.js"></script> <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> </head> <body> <p id="display"></p> <script type="text/javascript"> - if (navigator.platform.indexOf("Win") == 0) { + if (navigator.platform.startsWith("Win")) { SimpleTest.expectAssertions(1, 2); } else { SimpleTest.expectAssertions(1); } SimpleTest.waitForExplicitFinish(); var framesToLoad = 2;
--- a/dom/sms/src/SmsManager.cpp +++ b/dom/sms/src/SmsManager.cpp @@ -166,17 +166,17 @@ SmsManager::Send(JSContext* aCx, JSObjec } NS_IMETHODIMP SmsManager::Send(const jsval& aNumber, const nsAString& aMessage, jsval* aReturn) { nsresult rv; nsIScriptContext* sc = GetContextForEventHandlers(&rv); NS_ENSURE_STATE(sc); - JSContext* cx = sc->GetNativeContext(); + AutoPushJSContext cx(sc->GetNativeContext()); NS_ASSERTION(cx, "Failed to get a context!"); if (!aNumber.isString() && !(aNumber.isObject() && JS_IsArrayObject(cx, &aNumber.toObject()))) { return NS_ERROR_INVALID_ARG; } JSObject* global = sc->GetNativeGlobal(); @@ -248,20 +248,20 @@ SmsManager::Delete(const jsval& aParam, } if (!aParam.isObject()) { return NS_ERROR_INVALID_ARG; } nsresult rv; nsIScriptContext* sc = GetContextForEventHandlers(&rv); + AutoPushJSContext cx(sc->GetNativeContext()); NS_ENSURE_STATE(sc); nsCOMPtr<nsIDOMMozSmsMessage> message = - do_QueryInterface(nsContentUtils::XPConnect()->GetNativeOfWrapper( - sc->GetNativeContext(), &aParam.toObject())); + do_QueryInterface(nsContentUtils::XPConnect()->GetNativeOfWrapper(cx, &aParam.toObject())); NS_ENSURE_TRUE(message, NS_ERROR_INVALID_ARG); int32_t id; message->GetId(&id); return Delete(id, aRequest); }
--- a/dom/sms/src/SmsRequest.cpp +++ b/dom/sms/src/SmsRequest.cpp @@ -185,17 +185,17 @@ SmsRequest::SetSuccessInternal(nsISuppor nsresult rv; nsIScriptContext* sc = GetContextForEventHandlers(&rv); if (!sc) { SetError(nsISmsRequest::INTERNAL_ERROR); return false; } - JSContext* cx = sc->GetNativeContext(); + AutoPushJSContext cx(sc->GetNativeContext()); NS_ASSERTION(cx, "Failed to get a context!"); JSObject* global = sc->GetNativeGlobal(); NS_ASSERTION(global, "Failed to get global object!"); JSAutoRequest ar(cx); JSAutoCompartment ac(cx, global); @@ -509,26 +509,26 @@ SmsRequest::NotifyThreadList(const Infal MOZ_ASSERT(!mParent); MOZ_ASSERT(GetOwner()); nsresult rv; nsIScriptContext* sc = GetContextForEventHandlers(&rv); NS_ENSURE_SUCCESS_VOID(rv); NS_ENSURE_TRUE_VOID(sc); - JSContext* cx = sc->GetNativeContext(); + AutoPushJSContext cx(sc->GetNativeContext()); MOZ_ASSERT(cx); nsCOMPtr<nsIScriptGlobalObject> sgo = do_QueryInterface(GetOwner()); JSObject* ownerObj = sgo->GetGlobalJSObject(); NS_ENSURE_TRUE_VOID(ownerObj); nsCxPusher pusher; - NS_ENSURE_TRUE_VOID(pusher.Push(cx, false)); + pusher.Push(cx); JSAutoRequest ar(cx); JSAutoCompartment ac(cx, ownerObj); JSObject* array = JS_NewArrayObject(cx, aItems.Length(), nullptr); NS_ENSURE_TRUE_VOID(array); bool ok;
--- a/dom/src/geolocation/Makefile.in +++ b/dom/src/geolocation/Makefile.in @@ -12,17 +12,16 @@ include $(DEPTH)/config/autoconf.mk MODULE = dom LIBRARY_NAME = jsdomgeolocation_s LIBXUL_LIBRARY = 1 # we don't want the shared lib, but we want to force the creation of a static lib. FORCE_STATIC_LIB = 1 FAIL_ON_WARNINGS := 1 - CPPSRCS = \ nsGeolocation.cpp \ nsGeoPosition.cpp \ $(NULL) LOCAL_INCLUDES = \ -I$(topsrcdir)/dom/base \ -I$(topsrcdir)/dom/ipc \
--- a/dom/src/geolocation/nsGeolocation.cpp +++ b/dom/src/geolocation/nsGeolocation.cpp @@ -454,20 +454,18 @@ nsGeolocationRequest::Allow() // -or- // b) the cached position time is some reasonable value to return to the user (<30s) uint32_t maximumAge = 30 * PR_MSEC_PER_SEC; if (mOptions) { if (mOptions->maximumAge >= 0) { maximumAge = mOptions->maximumAge; } - if (mOptions->enableHighAccuracy) { - gs->SetHigherAccuracy(true); - } } + gs->SetHigherAccuracy(mOptions && mOptions->enableHighAccuracy); if (lastPosition && maximumAge > 0 && ( PRTime(PR_Now() / PR_USEC_PER_MSEC) - maximumAge <= PRTime(cachedPositionTime) )) { // okay, we can return a cached position mAllowed = true; nsCOMPtr<nsIRunnable> ev = new RequestSendLocationEvent(lastPosition, @@ -583,30 +581,32 @@ nsGeolocationRequest::Update(nsIDOMGeoPo } NS_DispatchToMainThread(ev); return true; } void nsGeolocationRequest::Shutdown() { - if (mOptions && mOptions->enableHighAccuracy) { - nsRefPtr<nsGeolocationService> gs = nsGeolocationService::GetGeolocationService(); - if (gs) { - gs->SetHigherAccuracy(false); - } - } - if (mTimeoutTimer) { mTimeoutTimer->Cancel(); mTimeoutTimer = nullptr; } mCleared = true; mCallback = nullptr; mErrorCallback = nullptr; + + // This should happen last, to ensure that this request isn't taken into consideration + // when deciding whether existing requests still require high accuracy. + if (mOptions && mOptions->enableHighAccuracy) { + nsRefPtr<nsGeolocationService> gs = nsGeolocationService::GetGeolocationService(); + if (gs) { + gs->SetHigherAccuracy(false); + } + } } bool nsGeolocationRequest::Recv__delete__(const bool& allow) { if (allow) { (void) Allow(); } else { (void) Cancel(); @@ -974,17 +974,18 @@ nsGeolocationService::StartDevice(nsIPri // we do not want to keep the geolocation devices online // indefinitely. Close them down after a reasonable period of // inactivivity SetDisconnectTimer(); if (XRE_GetProcessType() == GeckoProcessType_Content) { ContentChild* cpc = ContentChild::GetSingleton(); - cpc->SendAddGeolocationListener(IPC::Principal(aPrincipal)); + cpc->SendAddGeolocationListener(IPC::Principal(aPrincipal), + HighAccuracyRequested()); return NS_OK; } // Start them up! nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService(); if (!obs) { return NS_ERROR_FAILURE; } @@ -1009,38 +1010,51 @@ nsGeolocationService::SetDisconnectTimer mDisconnectTimer->Cancel(); } mDisconnectTimer->Init(this, sProviderTimeout, nsITimer::TYPE_ONE_SHOT); } +bool +nsGeolocationService::HighAccuracyRequested() +{ + for (uint32_t i = 0; i < mGeolocators.Length(); i++) { + if (mGeolocators[i]->HighAccuracyRequested()) { + return true; + } + } + return false; +} + void nsGeolocationService::SetHigherAccuracy(bool aEnable) { + bool highRequired = aEnable || HighAccuracyRequested(); + if (XRE_GetProcessType() == GeckoProcessType_Content) { ContentChild* cpc = ContentChild::GetSingleton(); - cpc->SendSetGeolocationHigherAccuracy(aEnable); + cpc->SendSetGeolocationHigherAccuracy(highRequired); return; } - if (!mHigherAccuracy && aEnable) { + if (!mHigherAccuracy && highRequired) { for (int32_t i = 0; i < mProviders.Count(); i++) { mProviders[i]->SetHighAccuracy(true); } } - if (mHigherAccuracy && !aEnable) { + if (mHigherAccuracy && !highRequired) { for (int32_t i = 0; i < mProviders.Count(); i++) { mProviders[i]->SetHighAccuracy(false); } } - mHigherAccuracy = aEnable; + mHigherAccuracy = highRequired; } void nsGeolocationService::StopDevice() { if(mDisconnectTimer) { mDisconnectTimer->Cancel(); mDisconnectTimer = nullptr; @@ -1101,16 +1115,17 @@ nsGeolocationService::RemoveLocator(nsGe // nsGeolocation //////////////////////////////////////////////////// DOMCI_DATA(GeoGeolocation, nsGeolocation) NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsGeolocation) NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMGeoGeolocation) NS_INTERFACE_MAP_ENTRY(nsIDOMGeoGeolocation) + NS_INTERFACE_MAP_ENTRY(nsIGeolocation) NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(GeoGeolocation) NS_INTERFACE_MAP_END NS_IMPL_CYCLE_COLLECTING_ADDREF(nsGeolocation) NS_IMPL_CYCLE_COLLECTING_RELEASE(nsGeolocation) NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsGeolocation) tmp->mPendingRequests.Clear(); @@ -1205,16 +1220,36 @@ nsGeolocation::HasActiveCallbacks() if (mWatchingCallbacks[i]->IsActive()) { return true; } } return mPendingCallbacks.Length() != 0; } +bool +nsGeolocation::HighAccuracyRequested() +{ + for (uint32_t i = 0; i < mWatchingCallbacks.Length(); i++) { + if (mWatchingCallbacks[i]->IsActive() && + mWatchingCallbacks[i]->WantsHighAccuracy()) { + return true; + } + } + + for (uint32_t i = 0; i < mPendingCallbacks.Length(); i++) { + if (mPendingCallbacks[i]->IsActive() && + mPendingCallbacks[i]->WantsHighAccuracy()) { + return true; + } + } + + return false; +} + void nsGeolocation::RemoveRequest(nsGeolocationRequest* aRequest) { mPendingCallbacks.RemoveElement(aRequest); // if it is in the mWatchingCallbacks, we can't do much // since we passed back the position in the array to who // ever called WatchPosition() and we do not want to mess @@ -1251,17 +1286,17 @@ nsGeolocation::GetCurrentPosition(nsIDOM { nsresult rv; nsAutoPtr<mozilla::idl::GeoPositionOptions> options( OptionsFromJSOptions(cx, jsoptions, &rv)); NS_ENSURE_SUCCESS(rv, rv); return GetCurrentPosition(callback, errorCallback, options.forget()); } -nsresult +NS_IMETHODIMP nsGeolocation::GetCurrentPosition(nsIDOMGeoPositionCallback *callback, nsIDOMGeoPositionErrorCallback *errorCallback, mozilla::idl::GeoPositionOptions *options) { NS_ENSURE_ARG_POINTER(callback); if (mPendingCallbacks.Length() > MAX_GEO_REQUESTS_PER_WINDOW) { return NS_ERROR_NOT_AVAILABLE; @@ -1324,17 +1359,17 @@ nsGeolocation::WatchPosition(nsIDOMGeoPo { nsresult rv; nsAutoPtr<mozilla::idl::GeoPositionOptions> options( OptionsFromJSOptions(cx, jsoptions, &rv)); NS_ENSURE_SUCCESS(rv, rv); return WatchPosition(callback, errorCallback, options.forget(), _retval); } -nsresult +NS_IMETHODIMP nsGeolocation::WatchPosition(nsIDOMGeoPositionCallback *callback, nsIDOMGeoPositionErrorCallback *errorCallback, mozilla::idl::GeoPositionOptions *options, int32_t *_retval) { NS_ENSURE_ARG_POINTER(callback); if (mWatchingCallbacks.Length() > MAX_GEO_REQUESTS_PER_WINDOW) {
--- a/dom/src/geolocation/nsGeolocation.h +++ b/dom/src/geolocation/nsGeolocation.h @@ -21,16 +21,17 @@ #include "nsCycleCollectionParticipant.h" #include "nsIDOMGeoGeolocation.h" #include "nsIDOMGeoPosition.h" #include "nsIDOMGeoPositionError.h" #include "nsIDOMGeoPositionCallback.h" #include "nsIDOMGeoPositionErrorCallback.h" #include "nsIDOMNavigatorGeolocation.h" +#include "nsIGeolocation.h" #include "nsPIDOMWindow.h" #include "nsIGeolocationProvider.h" #include "nsIContentPermissionPrompt.h" #include "DictionaryHelpers.h" #include "PCOMContentPermissionRequestChild.h" #include "mozilla/Attributes.h" @@ -59,16 +60,17 @@ class nsGeolocationRequest void Shutdown(); // Called by the geolocation device to notify that a location has changed. // isBetter: the accuracy is as good or better than the previous position. bool Update(nsIDOMGeoPosition* aPosition, bool aIsBetter); void SendLocation(nsIDOMGeoPosition* location); void MarkCleared(); + bool WantsHighAccuracy() {return mOptions && mOptions->enableHighAccuracy;} bool IsActive() {return !mCleared;} bool Allowed() {return mAllowed;} void SetTimeoutTimer(); nsIPrincipal* GetPrincipal(); ~nsGeolocationRequest(); bool Recv__delete__(const bool& allow); @@ -130,16 +132,17 @@ public: // Stop the started geolocation device (gps, nmea, etc.) void StopDevice(); // create, or reinitalize the callback timer void SetDisconnectTimer(); // request higher accuracy, if possible void SetHigherAccuracy(bool aEnable); + bool HighAccuracyRequested(); private: ~nsGeolocationService(); // Disconnect timer. When this timer expires, it clears all pending callbacks // and closes down the provider, unless we are watching a point, and in that // case, we disable the disconnect timer. @@ -159,24 +162,26 @@ private: // Current state of requests for higher accuracy bool mHigherAccuracy; }; /** * Can return a geolocation info */ -class nsGeolocation MOZ_FINAL : public nsIDOMGeoGeolocation +class nsGeolocation MOZ_FINAL : public nsIDOMGeoGeolocation, + public nsIGeolocation { public: NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_NSIDOMGEOGEOLOCATION + NS_DECL_NSIGEOLOCATION - NS_DECL_CYCLE_COLLECTION_CLASS(nsGeolocation) + NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsGeolocation, nsIDOMGeoGeolocation) nsGeolocation(); nsresult Init(nsIDOMWindow* contentDom=nullptr); // Called by the geolocation device to notify that a location has changed. void Update(nsIDOMGeoPosition* aPosition, bool aIsBetter); @@ -193,27 +198,22 @@ public: nsIPrincipal* GetPrincipal() { return mPrincipal; } // Getter for the window that this nsGeolocation is owned by nsIWeakReference* GetOwner() { return mOwner; } // Check to see if the widnow still exists bool WindowOwnerStillExists(); + // Check to see if any active request requires high accuracy + bool HighAccuracyRequested(); + // Notification from the service: void ServiceReady(); - // Versions of the DOM APIs that don't require JS option values - nsresult WatchPosition(nsIDOMGeoPositionCallback *callback, - nsIDOMGeoPositionErrorCallback *errorCallback, - mozilla::idl::GeoPositionOptions *options, - int32_t *_retval); - nsresult GetCurrentPosition(nsIDOMGeoPositionCallback *callback, - nsIDOMGeoPositionErrorCallback *errorCallback, - mozilla::idl::GeoPositionOptions *options); private: ~nsGeolocation(); bool RegisterRequestWithPrompt(nsGeolocationRequest* request); // Methods for the service when it's ready to process requests: nsresult GetCurrentPositionReady(nsGeolocationRequest* aRequest);
--- a/dom/src/jsurl/nsJSProtocolHandler.cpp +++ b/dom/src/jsurl/nsJSProtocolHandler.cpp @@ -42,16 +42,18 @@ #include "nsIScriptChannel.h" #include "nsIDocument.h" #include "nsIObjectInputStream.h" #include "nsIObjectOutputStream.h" #include "nsIWritablePropertyBag2.h" #include "nsIContentSecurityPolicy.h" #include "nsSandboxFlags.h" +using mozilla::AutoPushJSContext; + static NS_DEFINE_CID(kJSURICID, NS_JSURI_CID); class nsJSThunk : public nsIInputStream { public: nsJSThunk(); NS_DECL_ISUPPORTS @@ -234,36 +236,30 @@ nsresult nsJSThunk::EvaluateScript(nsICh return rv; bool useSandbox = (aExecutionPolicy == nsIScriptChannel::EXECUTE_IN_SANDBOX); if (!useSandbox) { //-- Don't outside a sandbox unless the script principal subsumes the // principal of the context. - nsCOMPtr<nsIPrincipal> objectPrincipal; - rv = securityManager-> - GetObjectPrincipal(scriptContext->GetNativeContext(), - globalJSObject, - getter_AddRefs(objectPrincipal)); - if (NS_FAILED(rv)) - return rv; + nsIPrincipal* objectPrincipal = nsContentUtils::GetObjectPrincipal(globalJSObject); bool subsumes; rv = principal->Subsumes(objectPrincipal, &subsumes); if (NS_FAILED(rv)) return rv; useSandbox = !subsumes; } JS::Value v = JS::UndefinedValue(); // Finally, we have everything needed to evaluate the expression. - JSContext *cx = scriptContext->GetNativeContext(); + AutoPushJSContext cx(scriptContext->GetNativeContext()); JSAutoRequest ar(cx); if (useSandbox) { // We were asked to use a sandbox, or the channel owner isn't allowed // to execute in this context. Evaluate the javascript URL in a // sandbox to prevent it from accessing data it doesn't have // permissions to access. // First check to make sure it's OK to evaluate this script to
--- a/dom/system/OSFileConstants.cpp +++ b/dom/system/OSFileConstants.cpp @@ -583,16 +583,17 @@ static dom::ConstantSpec gWinProperties[ // Errors INT_CONSTANT(ERROR_ACCESS_DENIED), INT_CONSTANT(ERROR_DIR_NOT_EMPTY), INT_CONSTANT(ERROR_FILE_EXISTS), INT_CONSTANT(ERROR_ALREADY_EXISTS), INT_CONSTANT(ERROR_FILE_NOT_FOUND), INT_CONSTANT(ERROR_NO_MORE_FILES), + INT_CONSTANT(ERROR_PATH_NOT_FOUND), PROP_END }; #endif // defined(XP_WIN) /** * Get a field of an object as an object.
--- a/dom/system/gonk/SystemWorkerManager.cpp +++ b/dom/system/gonk/SystemWorkerManager.cpp @@ -337,23 +337,17 @@ SystemWorkerManager::Init() { if (XRE_GetProcessType() != GeckoProcessType_Default) { return NS_ERROR_NOT_AVAILABLE; } NS_ASSERTION(NS_IsMainThread(), "We can only initialize on the main thread"); NS_ASSERTION(!mShutdown, "Already shutdown!"); - JSContext* cx = nsContentUtils::ThreadJSContextStack()->GetSafeJSContext(); - NS_ENSURE_TRUE(cx, NS_ERROR_FAILURE); - - nsCxPusher pusher; - if (!pusher.Push(cx, false)) { - return NS_ERROR_FAILURE; - } + mozilla::SafeAutoJSContext cx; nsresult rv = InitWifi(cx); if (NS_FAILED(rv)) { NS_WARNING("Failed to initialize WiFi Networking!"); return rv; } #ifdef MOZ_WIDGET_GONK
--- a/dom/telephony/Telephony.cpp +++ b/dom/telephony/Telephony.cpp @@ -269,36 +269,37 @@ Telephony::GetActive(jsval* aActive) if (!mActiveCall) { aActive->setNull(); return NS_OK; } nsresult rv; nsIScriptContext* sc = GetContextForEventHandlers(&rv); NS_ENSURE_SUCCESS(rv, rv); + AutoPushJSContext cx(sc ? sc->GetNativeContext() : nullptr); if (sc) { rv = - nsContentUtils::WrapNative(sc->GetNativeContext(), - sc->GetNativeGlobal(), + nsContentUtils::WrapNative(cx, sc->GetNativeGlobal(), mActiveCall->ToISupports(), aActive); NS_ENSURE_SUCCESS(rv, rv); } return NS_OK; } NS_IMETHODIMP Telephony::GetCalls(jsval* aCalls) { JSObject* calls = mCallsArray; if (!calls) { nsresult rv; nsIScriptContext* sc = GetContextForEventHandlers(&rv); NS_ENSURE_SUCCESS(rv, rv); + AutoPushJSContext cx(sc ? sc->GetNativeContext() : nullptr); if (sc) { - rv = nsTArrayToJSArray(sc->GetNativeContext(), mCalls, &calls); + rv = nsTArrayToJSArray(cx, mCalls, &calls); NS_ENSURE_SUCCESS(rv, rv); if (!mRooted) { NS_HOLD_JS_OBJECTS(this, Telephony); mRooted = true; } mCallsArray = calls;
--- a/dom/tests/mochitest/bugs/test_bug291653.html +++ b/dom/tests/mochitest/bugs/test_bug291653.html @@ -12,34 +12,41 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=291653">Mozilla Bug 291653</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Win") != 0) { - SimpleTest.expectAssertions(0, 1); +if (!navigator.platform.startsWith("Win")) { + SimpleTest.expectAssertions(1); } /** Test for Bug 291653 **/ SimpleTest.waitForExplicitFinish(); var secondListenerDidRun = false; var w = window.open("file_bug291653.html", "foo", "width=300,height=300"); function closeTest() { w.setTimeout("close()", 0); setTimeout("finish()", 500); } function finish() { ok(!secondListenerDidRun, "Shouldn't have run second listener!"); + + // Garbage collecting the windows created in this test can cause + // assertions, so GC now to blame those assertions to this test. + // ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow, + // bug 600703) + SpecialPowers.gc(); + SimpleTest.finish(); } function end() { setTimeout("closeTest()", 500); }
--- a/dom/tests/mochitest/bugs/test_bug304459.html +++ b/dom/tests/mochitest/bugs/test_bug304459.html @@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=304459">Mozilla Bug 304459</a> <p id="display"></p> <div id="content" style="display: none"> <iframe id="frame"></iframe> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Linux") == 0) { - SimpleTest.expectAssertions(0, 1); -} - /** Test for Bug 304459 **/ function iframeLoaded() { var frame = document.getElementById("frame"); frame.onload = undefined; frame.src = "http://example.org/tests/dom/tests/mochitest/bugs/iframe_bug304459-2.html"; }
--- a/dom/tests/mochitest/bugs/test_bug308856.html +++ b/dom/tests/mochitest/bugs/test_bug308856.html @@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=308856">Mozilla Bug 308856</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Win") != 0) { - SimpleTest.expectAssertions(0, 1); -} - /** Test for Bug 308856 **/ var monkey = 12; SimpleTest.waitForExplicitFinish(); addLoadEvent(function() { is(12,window.monkey,"Window global is correct value"); var found = false;
--- a/dom/tests/mochitest/bugs/test_bug327891.html +++ b/dom/tests/mochitest/bugs/test_bug327891.html @@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=327891">Mozilla Bug 327891</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Mac") == 0) { - SimpleTest.expectAssertions(0, 1); -} - var pass = false; try { new HTMLDocument(); } catch(e) { pass = true; }
--- a/dom/tests/mochitest/bugs/test_bug333983.html +++ b/dom/tests/mochitest/bugs/test_bug333983.html @@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=333983">Mozilla Bug 333983</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Mac") == 0) { - SimpleTest.expectAssertions(0, 1); -} - /** Test for Bug 333983 **/ HTMLElement.prototype.foopy = function () { return "foopy"; } var foopy = ""; try { foopy = document.body.foopy() } catch (ex) { foopy = ex + "";
--- a/dom/tests/mochitest/bugs/test_bug342448.html +++ b/dom/tests/mochitest/bugs/test_bug342448.html @@ -14,20 +14,16 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=342448">Mozilla Bug 342448</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Mac") == 0) { - SimpleTest.expectAssertions(0, 1); -} - /** Test for Bug 342448 **/ SimpleTest.waitForExplicitFinish(); try { setTimeout(1, 0); } catch (ex) {} callLater(.1, function() { ok(true, "shouldn't crash when passing a number as the first arg to setTimeout"); SimpleTest.finish(); })
--- a/dom/tests/mochitest/bugs/test_bug346659.html +++ b/dom/tests/mochitest/bugs/test_bug346659.html @@ -12,20 +12,16 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=346659">Mozilla Bug 346659</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Win") != 0) { - SimpleTest.expectAssertions(0, 1); -} - /** Test for Bug 346659 **/ // do the tests in two batches, because otherwise the popup blocker kills off // our test because it opens too many windows. var numTestsSet1 = 6; var numTestsSet2 = 4; var numTestsSet3 = 2; var complete = 0; SimpleTest.waitForExplicitFinish();
--- a/dom/tests/mochitest/bugs/test_bug406375.html +++ b/dom/tests/mochitest/bugs/test_bug406375.html @@ -12,27 +12,36 @@ https://bugzilla.mozilla.org/show_bug.cg <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=406375">Mozilla Bug 406375</a> <p id="display"></p> <div id="content" style="display: none"> </div> <pre id="test"> <script type="application/javascript"> -if (navigator.platform.indexOf("Mac") == 0) { - SimpleTest.expectAssertions(2, 3); +if (navigator.platform.startsWith("Mac")) { + SimpleTest.expectAssertions(3); +} else if (navigator.platform.startsWith("Linux")) { + SimpleTest.expectAssertions(1); } /** Test for Bug 406375 **/ SimpleTest.waitForExplicitFinish(); function runTest() { window.showModalDialog("file_bug406375.html"); ok(true, "This test should not hang"); + + // Garbage collecting the windows created in this test can cause + // assertions, so GC now to blame those assertions to this test. + // ("mArguments wasn't cleaned up properly!" in ~nsGlobalWindow, + // bug 600703) + SpecialPowers.gc(); + SimpleTest.finish(); } </script> </pre> </body> </html>
--- a/dom/tests/mochitest/bugs/test_bug411103.html +++ b/dom/tests/mochitest/bugs/test_bug411103.html @@ -18,20 +18,16 @@ https://bugzilla.mozilla.org/show_bug.cg <!-- for good measure... --> <iframe src="data:application/xhtml+xml,%3Chtml%20xmlns=%22http://www.w3.org/1999/xhtml%22%3E%3Cbody%3E%3Cp%3EXHTML%3C/p%3E%3C/body%3E%3C/html%3E" name="xhtmlWindow"></iframe> <pre id="test"> <script class="testbody" type="text/javascript"> -if (navigator.platform.indexOf("Win") != 0) {