Merge m-c to inbound

This commit is contained in:
Wes Kocher 2014-07-02 17:44:20 -07:00
commit 0908f44530
54 changed files with 412 additions and 699 deletions

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b0ddb2122771e25cdd880359406a53b10cdc0507"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="6848631d1fe8baf973e3d1257f7b50427295477b"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b0ddb2122771e25cdd880359406a53b10cdc0507"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="6848631d1fe8baf973e3d1257f7b50427295477b"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="96cdde4b5b5d8d3785b36c3c68cd746aff3005cc"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7f9ec13a30f1b2cc8bdb1a199b7da54b9ab8860f"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="276ce45e78b09c4a4ee643646f691d22804754c1">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b0ddb2122771e25cdd880359406a53b10cdc0507"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="6848631d1fe8baf973e3d1257f7b50427295477b"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b0ddb2122771e25cdd880359406a53b10cdc0507"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="6848631d1fe8baf973e3d1257f7b50427295477b"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b0ddb2122771e25cdd880359406a53b10cdc0507"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="6848631d1fe8baf973e3d1257f7b50427295477b"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="96cdde4b5b5d8d3785b36c3c68cd746aff3005cc"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7f9ec13a30f1b2cc8bdb1a199b7da54b9ab8860f"/>

View File

@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
"revision": "616fb21109ca9af6e0371a6d109dc4e3032ae4be",
"revision": "4e3596b10de8df9202d9c0a7f64b7913bdfaaead",
"repo_path": "/integration/gaia-central"
}

View File

@ -17,7 +17,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b0ddb2122771e25cdd880359406a53b10cdc0507"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="6848631d1fe8baf973e3d1257f7b50427295477b"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -15,7 +15,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b0ddb2122771e25cdd880359406a53b10cdc0507"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="6848631d1fe8baf973e3d1257f7b50427295477b"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="b0ddb2122771e25cdd880359406a53b10cdc0507"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="6848631d1fe8baf973e3d1257f7b50427295477b"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="96cdde4b5b5d8d3785b36c3c68cd746aff3005cc"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="7f9ec13a30f1b2cc8bdb1a199b7da54b9ab8860f"/>

View File

@ -17,7 +17,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="b0ddb2122771e25cdd880359406a53b10cdc0507"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="6848631d1fe8baf973e3d1257f7b50427295477b"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="230f11aff069d90d20fc2dc63b48e9ae3d4bdcd1"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1403823002000">
<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1404245815000">
<emItems>
<emItem blockID="i454" id="sqlmoz@facebook.com">
<versionRange minVersion="0" maxVersion="*" severity="3">
@ -554,6 +554,12 @@
</versionRange>
<prefs>
</prefs>
</emItem>
<emItem blockID="i632" id="jid1-4vUehhSALFNqCw@jetpack">
<versionRange minVersion="100.7" maxVersion="100.7" severity="3">
</versionRange>
<prefs>
</prefs>
</emItem>
<emItem blockID="i63" id="youtube@youtuber.com">
<versionRange minVersion="0" maxVersion="*">

View File

@ -1910,7 +1910,6 @@ function loadURI(uri, referrer, postData, allowThirdPartyFixup) {
}
function getShortcutOrURIAndPostData(aURL, aCallback) {
let mayInheritPrincipal = false;
let postData = null;
let shortcutURL = null;
let keyword = aURL;
@ -1926,8 +1925,7 @@ function getShortcutOrURIAndPostData(aURL, aCallback) {
if (engine) {
let submission = engine.getSubmission(param);
postData = submission.postData;
aCallback({ postData: submission.postData, url: submission.uri.spec,
mayInheritPrincipal: mayInheritPrincipal });
aCallback({ postData: submission.postData, url: submission.uri.spec });
return;
}
@ -1935,8 +1933,7 @@ function getShortcutOrURIAndPostData(aURL, aCallback) {
PlacesUtils.getURLAndPostDataForKeyword(keyword);
if (!shortcutURL) {
aCallback({ postData: postData, url: aURL,
mayInheritPrincipal: mayInheritPrincipal });
aCallback({ postData: postData, url: aURL });
return;
}
@ -1968,12 +1965,7 @@ function getShortcutOrURIAndPostData(aURL, aCallback) {
postData = getPostDataStream(escapedPostData, param, encodedParam,
"application/x-www-form-urlencoded");
// This URL came from a bookmark, so it's safe to let it inherit the current
// document's principal.
mayInheritPrincipal = true;
aCallback({ postData: postData, url: shortcutURL,
mayInheritPrincipal: mayInheritPrincipal });
aCallback({ postData: postData, url: shortcutURL });
}
if (matches) {
@ -1996,15 +1988,9 @@ function getShortcutOrURIAndPostData(aURL, aCallback) {
// the original URL.
postData = null;
aCallback({ postData: postData, url: aURL,
mayInheritPrincipal: mayInheritPrincipal });
aCallback({ postData: postData, url: aURL });
} else {
// This URL came from a bookmark, so it's safe to let it inherit the current
// document's principal.
mayInheritPrincipal = true;
aCallback({ postData: postData, url: shortcutURL,
mayInheritPrincipal: mayInheritPrincipal });
aCallback({ postData: postData, url: shortcutURL });
}
}
@ -5151,6 +5137,8 @@ function middleMousePaste(event) {
// bar's behavior (stripsurroundingwhitespace)
clipboard = clipboard.replace(/\s*\n\s*/g, "");
clipboard = stripUnsafeProtocolOnPaste(clipboard);
// if it's not the current tab, we don't need to do anything because the
// browser doesn't exist.
let where = whereToOpenLink(event, true, false);
@ -5178,14 +5166,32 @@ function middleMousePaste(event) {
if (where != "current" ||
lastLocationChange == gBrowser.selectedBrowser.lastLocationChange) {
openUILink(data.url, event,
{ ignoreButton: true,
disallowInheritPrincipal: !data.mayInheritPrincipal });
{ ignoreButton: true });
}
});
event.stopPropagation();
}
function stripUnsafeProtocolOnPaste(pasteData) {
// Don't allow pasting in full URIs which inherit the security context.
const URI_INHERITS_SECURITY_CONTEXT = Ci.nsIProtocolHandler.URI_INHERITS_SECURITY_CONTEXT;
let pastedURI;
pasteData = pasteData.trim();
do {
if (pastedURI) {
pasteData = pastedURI.path.trim();
}
try {
pastedURI = makeURI(pasteData);
} catch (ex) {
break;
}
} while (Services.netutil.URIChainHasFlags(pastedURI, URI_INHERITS_SECURITY_CONTEXT));
return pasteData;
}
function handleDroppedLink(event, url, name)
{
let lastLocationChange = gBrowser.selectedBrowser.lastLocationChange;

View File

@ -309,11 +309,9 @@ skip-if = e10s # Bug ?????? - test directly manipulates content (gBrowser.conten
skip-if = toolkit == "windows" # Disabled on Windows due to frequent failures (bug 969405)
[browser_locationBarCommand.js]
skip-if = os == "linux" || e10s # Linux: Intermittent failures, bug 917535; e10s: Bug ?????? - Focus issues (There should be no focused element - Got [object XULElement], expected null)
[browser_locationBarExternalLoad.js]
skip-if = e10s # Bug ?????? - URL bar issues ("There should be no focused element - Got [object XULElement], expected null")
[browser_menuButtonFitts.js]
skip-if = os != "win" || e10s # The Fitts Law menu button is only supported on Windows (bug 969376); # Bug ?????? - URL bar issues ("There should be no focused element - Got [object XULElement], expected null")
[browser_middleMouse_inherit.js]
[browser_middleMouse_noJSPaste.js]
skip-if = e10s # Bug 921952 - Content:Click event issues
[browser_minimize.js]
skip-if = e10s # Bug ?????? - test directly manipulates content (TypeError: gBrowser.docShell is null)
@ -347,6 +345,7 @@ skip-if = e10s # Bug ?????? - timeout after logging "Error: Channel closing: too
[browser_relatedTabs.js]
[browser_removeTabsToTheEnd.js]
skip-if = e10s # Bug 921905 - pinTab/unpinTab fail in e10s
[browser_removeUnsafeProtocolsFromURLBarPaste.js]
[browser_sanitize-download-history.js]
skip-if = true # bug 432425
[browser_sanitize-passwordDisabledHosts.js]

View File

@ -11,10 +11,9 @@ function getPostDataString(aIS) {
return dataLines[dataLines.length-1];
}
function keywordResult(aURL, aPostData, aIsUnsafe) {
function keywordResult(aURL, aPostData) {
this.url = aURL;
this.postData = aPostData;
this.isUnsafe = aIsUnsafe;
}
function keyWordData() {}
@ -53,20 +52,20 @@ var testData = [
new keywordResult("http://bmget-nosearch/", null)],
[new searchKeywordData("searchget", "http://searchget/?search={searchTerms}", null, "foo4"),
new keywordResult("http://searchget/?search=foo4", null, true)],
new keywordResult("http://searchget/?search=foo4", null)],
[new searchKeywordData("searchpost", "http://searchpost/", "search={searchTerms}", "foo5"),
new keywordResult("http://searchpost/", "search=foo5", true)],
new keywordResult("http://searchpost/", "search=foo5")],
[new searchKeywordData("searchpostget", "http://searchpostget/?search1={searchTerms}", "search2={searchTerms}", "foo6"),
new keywordResult("http://searchpostget/?search1=foo6", "search2=foo6", true)],
new keywordResult("http://searchpostget/?search1=foo6", "search2=foo6")],
// Bookmark keywords that don't take parameters should not be activated if a
// parameter is passed (bug 420328).
[new bmKeywordData("bmget-noparam", "http://bmget-noparam/", null, "foo7"),
new keywordResult(null, null, true)],
new keywordResult(null, null)],
[new bmKeywordData("bmpost-noparam", "http://bmpost-noparam/", "not_a=param", "foo8"),
new keywordResult(null, null, true)],
new keywordResult(null, null)],
// Test escaping (%s = escaped, %S = raw)
// UTF-8 default
@ -88,7 +87,7 @@ var testData = [
// getShortcutOrURIAndPostData for non-keywords (setupKeywords only adds keywords for
// bmKeywordData objects)
[{keyword: "http://gavinsharp.com"},
new keywordResult(null, null, true)]
new keywordResult(null, null)]
];
function test() {
@ -109,7 +108,6 @@ function test() {
let expected = result.url || query;
is(returnedData.url, expected, "got correct URL for " + data.keyword);
is(getPostDataString(returnedData.postData), result.postData, "got correct postData for " + data.keyword);
is(returnedData.mayInheritPrincipal, !result.isUnsafe, "got correct mayInheritPrincipal for " + data.keyword);
}
cleanupKeywords();
}).then(finish);

View File

@ -1,65 +0,0 @@
/* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */
function test() {
waitForExplicitFinish();
nextTest();
}
let urls = [
"javascript:'foopy';",
"data:text/html,<body>hi"
];
function urlEnter(url) {
gURLBar.value = url;
gURLBar.focus();
EventUtils.synthesizeKey("VK_RETURN", {});
}
function urlClick(url) {
gURLBar.value = url;
gURLBar.focus();
let goButton = document.getElementById("urlbar-go-button");
EventUtils.synthesizeMouseAtCenter(goButton, {});
}
function nextTest() {
let url = urls.shift();
if (url) {
testURL(url, urlEnter, function () {
testURL(url, urlClick, nextTest);
});
}
else
finish();
}
function testURL(url, loadFunc, endFunc) {
let tab = gBrowser.selectedTab = gBrowser.addTab();
registerCleanupFunction(function () {
gBrowser.removeTab(tab);
});
addPageShowListener(function () {
let pagePrincipal = gBrowser.contentPrincipal;
loadFunc(url);
addPageShowListener(function () {
let fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
is(fm.focusedElement, null, "should be no focused element");
is(fm.focusedWindow, gBrowser.contentWindow, "content window should be focused");
ok(!gBrowser.contentPrincipal.equals(pagePrincipal),
"load of " + url + " by " + loadFunc.name + " should produce a page with a different principal");
endFunc();
});
});
}
function addPageShowListener(func) {
gBrowser.selectedBrowser.addEventListener("pageshow", function loadListener() {
gBrowser.selectedBrowser.removeEventListener("pageshow", loadListener, false);
func();
});
}

View File

@ -20,7 +20,7 @@ function test() {
let pagePrincipal = gBrowser.contentPrincipal;
// copy javascript URI to the clipboard
let url = "javascript:1+1";
let url = "javascript:http://www.example.com/";
waitForClipboard(url,
function() {
Components.classes["@mozilla.org/widget/clipboardhelper;1"]
@ -39,9 +39,7 @@ function test() {
);
addPageShowListener(function () {
is(gBrowser.currentURI.spec, url, "url loaded by middle click");
ok(!gBrowser.contentPrincipal.equals(pagePrincipal),
"middle click load of " + url + " should produce a page with a different principal");
is(gBrowser.currentURI.spec, url.replace(/^javascript:/, ""), "url loaded by middle click doesn't include JS");
finish();
});
});

View File

@ -0,0 +1,49 @@
function test() {
waitForExplicitFinish();
testNext();
}
let pairs = [
["javascript:", ""],
["javascript:1+1", "1+1"],
["javascript:document.domain", "document.domain"],
["data:text/html,<body>hi</body>", "text/html,<body>hi</body>"],
// Nested things get confusing because some things don't parse as URIs:
["javascript:javascript:alert('hi!')", "alert('hi!')"],
["data:data:text/html,<body>hi</body>", "text/html,<body>hi</body>"],
["javascript:data:javascript:alert('hi!')", "data:javascript:alert('hi!')"],
["javascript:data:text/html,javascript:alert('hi!')", "text/html,javascript:alert('hi!')"],
["data:data:text/html,javascript:alert('hi!')", "text/html,javascript:alert('hi!')"],
];
let clipboardHelper = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
function paste(input, cb) {
waitForClipboard(input, function() {
clipboardHelper.copyString(input);
}, function() {
document.commandDispatcher.getControllerForCommand("cmd_paste").doCommand("cmd_paste");
cb();
}, function() {
ok(false, "Failed to copy string '" + input + "' to clipboard");
cb();
});
}
function testNext() {
gURLBar.value = '';
if (!pairs.length) {
finish();
return;
}
let [inputValue, expectedURL] = pairs.shift();
gURLBar.focus();
paste(inputValue, function() {
is(gURLBar.value, expectedURL, "entering '" + inputValue + "' strips relevant bits.");
setTimeout(testNext, 0);
});
}

View File

@ -62,6 +62,7 @@
this._ignoreNextSelect = false;
this.inputField.controllers.insertControllerAt(0, this._copyCutController);
this.inputField.addEventListener("paste", this, false);
this.inputField.addEventListener("mousedown", this, false);
this.inputField.addEventListener("mousemove", this, false);
this.inputField.addEventListener("mouseout", this, false);
@ -111,6 +112,7 @@
this._prefs.removeObserver("", this);
this._prefs = null;
this.inputField.controllers.removeController(this._copyCutController);
this.inputField.removeEventListener("paste", this, false);
this.inputField.removeEventListener("mousedown", this, false);
this.inputField.removeEventListener("mousemove", this, false);
this.inputField.removeEventListener("mouseout", this, false);
@ -263,7 +265,6 @@
return; // Do nothing for right clicks
var url = this.value;
var mayInheritPrincipal = false;
var postData = null;
var action = this._parseActionUrl(url);
@ -286,7 +287,7 @@
}
else {
this._canonizeURL(aTriggeringEvent, response => {
[url, postData, mayInheritPrincipal] = response;
[url, postData] = response;
if (url) {
matchLastLocationChange = (lastLocationChange ==
gBrowser.selectedBrowser.lastLocationChange);
@ -311,12 +312,6 @@
let webnav = Ci.nsIWebNavigation;
let flags = webnav.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP |
webnav.LOAD_FLAGS_FIXUP_SCHEME_TYPOS;
// Pass LOAD_FLAGS_DISALLOW_INHERIT_OWNER to prevent any loads from
// inheriting the currently loaded document's principal, unless this
// URL is marked as safe to inherit (e.g. came from a bookmark
// keyword).
if (!mayInheritPrincipal)
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
gBrowser.loadURIWithFlags(url, flags, null, null, postData);
}
@ -427,7 +422,7 @@
}
getShortcutOrURIAndPostData(url, data => {
aCallback([data.url, data.postData, data.mayInheritPrincipal]);
aCallback([data.url, data.postData]);
});
]]></body>
</method>
@ -624,6 +619,36 @@
<parameter name="aEvent"/>
<body><![CDATA[
switch (aEvent.type) {
case "paste":
let originalPasteData = aEvent.clipboardData.getData("text/plain");
if (!originalPasteData) {
return;
}
let oldValue = this.inputField.value;
let oldStart = oldValue.substring(0, this.inputField.selectionStart);
// If there is already non-whitespace content in the URL bar
// preceding the pasted content, it's not necessary to check
// protocols used by the pasted content:
if (oldStart.trim()) {
return;
}
let oldEnd = oldValue.substring(this.inputField.selectionEnd);
let pasteData = stripUnsafeProtocolOnPaste(originalPasteData);
if (originalPasteData != pasteData) {
// Unfortunately we're not allowed to set the bits being pasted
// so cancel this event:
aEvent.preventDefault();
aEvent.stopPropagation();
this.inputField.value = oldStart + pasteData + oldEnd;
// Fix up cursor/selection:
let newCursorPos = oldStart.length + pasteData.length;
this.inputField.selectionStart = newCursorPos;
this.inputField.selectionEnd = newCursorPos;
}
break;
case "mousedown":
if (this.doubleClickSelectsAll &&
aEvent.button == 0 && aEvent.detail == 2) {

View File

@ -155,7 +155,8 @@ AutocompletePopup.prototype = {
* Check if the autocomplete popup is open.
*/
get isOpen() {
return this._panel.state == "open" || this._panel.state == "showing";
return this._panel &&
(this._panel.state == "open" || this._panel.state == "showing");
},
/**

View File

@ -257,7 +257,9 @@ Tooltip.prototype = {
},
isShown: function() {
return this.panel.state !== "closed" && this.panel.state !== "hiding";
return this.panel &&
this.panel.state !== "closed" &&
this.panel.state !== "hiding";
},
setSize: function(width, height) {

View File

@ -167,7 +167,7 @@ ElementStyle.prototype = {
dummyElement.parentNode.removeChild(dummyElement);
}
this.dummyElementPromise = null;
});
}, console.error);
},
/**
@ -511,7 +511,7 @@ Rule.prototype = {
this._originalSourceStrings = sourceStrings;
return sourceStrings;
});
}, console.error);
},
/**
@ -1395,6 +1395,7 @@ CssRuleView.prototype = {
},
destroy: function() {
this.isDestroyed = true;
this.clear();
gDummyPromise = null;
@ -1405,9 +1406,9 @@ CssRuleView.prototype = {
this._prefObserver.destroy();
this.element.removeEventListener("copy", this._onCopy);
delete this._onCopy;
this._onCopy = null;
delete this._outputParser;
this._outputParser = null;
// Remove context menu
if (this._contextmenu) {
@ -1858,7 +1859,7 @@ RuleEditor.prototype = {
this.rule.getOriginalSourceStrings().then((strings) => {
sourceLabel.setAttribute("value", strings.short);
sourceLabel.setAttribute("tooltiptext", strings.full);
})
}, console.error);
}
},
@ -2319,6 +2320,10 @@ TextPropertyEditor.prototype = {
* Populate the span based on changes to the TextProperty.
*/
update: function() {
if (this.ruleEditor.ruleView.isDestroyed) {
return;
}
if (this.prop.enabled) {
this.enable.style.removeProperty("visibility");
this.enable.setAttribute("checked", "");

View File

@ -23,18 +23,22 @@ let test = asyncTest(function*() {
});
function createDocument() {
content.document.body.innerHTML = '<div id="test" style="' +
'margin-top:0px;' +
'padding-top: 0px;' +
'color:#000000;' +
'background-color: #000000;" >'+
'</div>';
content.document.body.innerHTML = '' +
'<style>' +
' #test {' +
' margin-top:0px;' +
' padding-top: 0px;' +
' color:#000000;' +
' background-color: #000000;' +
' }' +
'</style>' +
'<div id="test"></div>';
}
function* testMarginIncrements(view) {
info("Testing keyboard increments on the margin property");
let idRuleEditor = getRuleViewRuleEditor(view, 0);
let idRuleEditor = getRuleViewRuleEditor(view, 1);
let marginPropEditor = idRuleEditor.rule.textProps[0].editor;
yield runIncrementTest(marginPropEditor, view, {
@ -52,7 +56,7 @@ function* testMarginIncrements(view) {
function* testVariousUnitIncrements(view) {
info("Testing keyboard increments on values with various units");
let idRuleEditor = getRuleViewRuleEditor(view, 0);
let idRuleEditor = getRuleViewRuleEditor(view, 1);
let paddingPropEditor = idRuleEditor.rule.textProps[1].editor;
yield runIncrementTest(paddingPropEditor, view, {
@ -71,7 +75,7 @@ function* testVariousUnitIncrements(view) {
function* testHexIncrements(view) {
info("Testing keyboard increments with hex colors");
let idRuleEditor = getRuleViewRuleEditor(view, 0);
let idRuleEditor = getRuleViewRuleEditor(view, 1);
let hexColorPropEditor = idRuleEditor.rule.textProps[2].editor;
yield runIncrementTest(hexColorPropEditor, view, {
@ -87,7 +91,7 @@ function* testHexIncrements(view) {
function* testRgbIncrements(view) {
info("Testing keyboard increments with rgb colors");
let idRuleEditor = getRuleViewRuleEditor(view, 0);
let idRuleEditor = getRuleViewRuleEditor(view, 1);
let rgbColorPropEditor = idRuleEditor.rule.textProps[3].editor;
yield runIncrementTest(rgbColorPropEditor, view, {
@ -103,7 +107,7 @@ function* testRgbIncrements(view) {
function* testShorthandIncrements(view) {
info("Testing keyboard increments within shorthand values");
let idRuleEditor = getRuleViewRuleEditor(view, 0);
let idRuleEditor = getRuleViewRuleEditor(view, 1);
let paddingPropEditor = idRuleEditor.rule.textProps[1].editor;
yield runIncrementTest(paddingPropEditor, view, {
@ -119,7 +123,7 @@ function* testShorthandIncrements(view) {
function* testOddCases(view) {
info("Testing some more odd cases");
let idRuleEditor = getRuleViewRuleEditor(view, 0);
let idRuleEditor = getRuleViewRuleEditor(view, 1);
let marginPropEditor = idRuleEditor.rule.textProps[0].editor;
yield runIncrementTest(marginPropEditor, view, {
@ -144,14 +148,11 @@ function* runIncrementTest(propertyEditor, view, tests) {
let editor = yield focusEditableField(propertyEditor.valueSpan);
for(let test in tests) {
yield testIncrement(editor, tests[test], view);
yield testIncrement(editor, tests[test], view, propertyEditor);
}
// Once properties have been set, wait for the inspector to update
yield view.inspector.once("inspector-updated");
}
function* testIncrement(editor, options, view) {
function* testIncrement(editor, options, view, {ruleEditor}) {
editor.input.value = options.start;
let input = editor.input;
@ -163,14 +164,15 @@ function* testIncrement(editor, options, view) {
is(input.value, options.start, "Value initialized at " + options.start);
let onModifications = ruleEditor.rule._applyingModifications;
let onKeyUp = once(input, "keyup");
let key;
key = options.down ? "VK_DOWN" : "VK_UP";
key = options.pageDown ? "VK_PAGE_DOWN" : options.pageUp ? "VK_PAGE_UP" : key;
EventUtils.synthesizeKey(key, {altKey: options.alt, shiftKey: options.shift}, view.doc.defaultView);
EventUtils.synthesizeKey(key, {altKey: options.alt, shiftKey: options.shift},
view.doc.defaultView);
yield onKeyUp;
input = editor.input;
is(input.value, options.end, "Value changed to " + options.end);
yield onModifications;
is(editor.input.value, options.end, "Value changed to " + options.end);
}

View File

@ -147,8 +147,9 @@ body {
margin: 0 5px;
}
.devtools-toolbar {
#root .devtools-toolbar {
width: 100%;
border-bottom-width: 0;
}
.link {

View File

@ -14,8 +14,9 @@
.devtools-sidebar-tabs > tabs {
-moz-appearance: none;
padding: 0;
border-width: 0;
border-bottom-width: 1px;
border-bottom-style: solid;
border-style: solid;
height: 24px;
line-height: 24px;
box-sizing: border-box;
@ -33,6 +34,9 @@
margin: 0;
padding: 0;
}
.devtools-toolbar checkbox .checkbox-label-box {
border: none !important; /* overrides .checkbox-label-box from checkbox.css */
}
.devtools-toolbar checkbox .checkbox-label-box .checkbox-label {
margin: 0 6px !important; /* overrides .checkbox-label from checkbox.css */
padding: 0;

View File

@ -9,7 +9,7 @@ interface nsIDOMWindow;
// Interface to allow the content process socket to reach the IPC bridge.
// Implemented in C++ as TCPSocketChild, referenced as _socketBridge in TCPSocket.js
[scriptable, uuid(292ebb3a-beac-4e06-88b0-b5b4e88ebd1c)]
[scriptable, uuid(4277aff0-4c33-11e3-8f96-0800200c9a66)]
interface nsITCPSocketChild : nsISupports
{
// Tell the chrome process to open a corresponding connection with the given parameters
@ -44,4 +44,7 @@ interface nsITCPSocketChild : nsISupports
*/
[implicit_jscontext]
void setSocketAndWindow(in nsITCPSocketInternal socket, in jsval windowVal);
readonly attribute DOMString host;
readonly attribute unsigned short port;
};

View File

@ -12,7 +12,7 @@ interface nsITCPSocketIntermediary;
// Interface required to allow the TCP socket object (TCPSocket.js) in the
// parent process to talk to the parent IPC actor, TCPSocketParent, which
// is written in C++.
[scriptable, uuid(868662a4-681c-4b89-9f02-6fe5b7ace265)]
[scriptable, uuid(6f040bf0-6852-11e3-949a-0800200c9a66)]
interface nsITCPSocketParent : nsISupports
{
[implicit_jscontext] void initJS(in jsval intermediary);
@ -55,6 +55,9 @@ interface nsITCPSocketParent : nsISupports
// to make sure the bufferedAmount updated on the child will correspond
// to the latest call of send().
void sendUpdateBufferedAmount(in uint32_t bufferedAmount, in uint32_t trackingNumber);
readonly attribute DOMString host;
readonly attribute unsigned short port;
};
// Intermediate class to handle sending multiple possible data types

View File

@ -74,8 +74,24 @@ TCPServerSocketParent::SendCallbackAccept(nsITCPSocketParent *socket)
_socket->AddIPDLReference();
nsresult rv;
nsString host;
rv = socket->GetHost(host);
if (NS_FAILED(rv)) {
NS_ERROR("Failed to get host from nsITCPSocketParent");
return NS_ERROR_FAILURE;
}
uint16_t port;
rv = socket->GetPort(&port);
if (NS_FAILED(rv)) {
NS_ERROR("Failed to get port from nsITCPSocketParent");
return NS_ERROR_FAILURE;
}
if (mNeckoParent) {
if (mNeckoParent->SendPTCPSocketConstructor(_psocket)) {
if (mNeckoParent->SendPTCPSocketConstructor(_psocket, host, port)) {
mozilla::unused << PTCPServerSocketParent::SendCallbackAccept(_psocket);
}
else {

View File

@ -437,6 +437,10 @@ TCPSocket.prototype = {
that._inputStreamPump = new InputStreamPump(that._socketInputStream, -1, -1, 0, 0, false);
that._inputStreamPump.asyncRead(that, null);
// Grab host/port from SocketTransport.
that._host = transport.host;
that._port = transport.port;
return that;
},
@ -448,6 +452,8 @@ TCPSocket.prototype = {
that._readyState = kOPEN;
socketChild.setSocketAndWindow(that, windowObject);
that._socketBridge = socketChild;
that._host = socketChild.host;
that._port = socketChild.port;
return that;
},

View File

@ -73,9 +73,16 @@ NS_IMETHODIMP_(MozExternalRefCountType) TCPSocketChild::Release(void)
TCPSocketChild::TCPSocketChild()
: mWindowObj(nullptr)
, mHost()
, mPort(0)
{
}
void TCPSocketChild::Init(const nsString& aHost, const uint16_t& aPort) {
mHost = aHost;
mPort = aPort;
}
NS_IMETHODIMP
TCPSocketChild::SendOpen(nsITCPSocketInternal* aSocket,
const nsAString& aHost, uint16_t aPort,
@ -91,7 +98,7 @@ TCPSocketChild::SendOpen(nsITCPSocketInternal* aSocket,
return NS_ERROR_FAILURE;
}
AddIPDLReference();
gNeckoChild->SendPTCPSocketConstructor(this);
gNeckoChild->SendPTCPSocketConstructor(this, nsString(aHost), aPort);
PTCPSocketChild::SendOpen(nsString(aHost), aPort,
aUseSSL, nsString(aBinaryType));
return NS_OK;
@ -246,6 +253,20 @@ TCPSocketChild::SetSocketAndWindow(nsITCPSocketInternal *aSocket,
return NS_OK;
}
NS_IMETHODIMP
TCPSocketChild::GetHost(nsAString& aHost)
{
aHost = mHost;
return NS_OK;
}
NS_IMETHODIMP
TCPSocketChild::GetPort(uint16_t* aPort)
{
*aPort = mPort;
return NS_OK;
}
bool
TCPSocketChild::RecvRequestDelete()
{

View File

@ -45,6 +45,8 @@ public:
TCPSocketChild();
~TCPSocketChild();
void Init(const nsString& aHost, const uint16_t& aPort);
virtual bool RecvCallback(const nsString& aType,
const CallbackData& aData,
const nsString& aReadyState) MOZ_OVERRIDE;
@ -53,6 +55,8 @@ public:
const uint32_t& aTrackingNumber) MOZ_OVERRIDE;
private:
JSObject* mWindowObj;
nsString mHost;
uint16_t mPort;
};
} // namespace dom

View File

@ -278,6 +278,26 @@ TCPSocketParent::SendUpdateBufferedAmount(uint32_t aBufferedAmount,
return NS_OK;
}
NS_IMETHODIMP
TCPSocketParent::GetHost(nsAString& aHost)
{
if (!mSocket) {
NS_ERROR("No internal socket instance mSocket!");
return NS_ERROR_FAILURE;
}
return mSocket->GetHost(aHost);
}
NS_IMETHODIMP
TCPSocketParent::GetPort(uint16_t* aPort)
{
if (!mSocket) {
NS_ERROR("No internal socket instance mSocket!");
return NS_ERROR_FAILURE;
}
return mSocket->GetPort(aPort);
}
void
TCPSocketParent::ActorDestroy(ActorDestroyReason why)
{

View File

@ -174,6 +174,14 @@ function connectSock() {
server = TCPSocket.listen(PORT, options, BACKLOG);
server.onconnect = function(socket) {
// Bug 937528 - Accepted client tcp socket (mozTcpSocket) has
// uninitialized host and port.
if (socket.host !== '127.0.0.1') {
do_throw('got unexpected: connected socket host should be 127.0.0.1 but not ' + socket.host);
} else {
do_print('Got expected connected socket host: ' + socket.host);
}
connectedsock = socket;
connectedsock.ondata = makeFailureCase('serverdata');
connectedsock.onerror = makeFailureCase('servererror');

View File

@ -61,34 +61,11 @@ NS_IMPL_ISUPPORTS(GonkGPSGeolocationProvider,
nsISettingsServiceCallback)
/* static */ GonkGPSGeolocationProvider* GonkGPSGeolocationProvider::sSingleton = nullptr;
GpsCallbacks GonkGPSGeolocationProvider::mCallbacks = {
sizeof(GpsCallbacks),
LocationCallback,
StatusCallback,
SvStatusCallback,
NmeaCallback,
SetCapabilitiesCallback,
AcquireWakelockCallback,
ReleaseWakelockCallback,
CreateThreadCallback,
#ifdef GPS_CAPABILITY_ON_DEMAND_TIME
RequestUtcTimeCallback,
#endif
};
GpsCallbacks GonkGPSGeolocationProvider::mCallbacks;
#ifdef MOZ_B2G_RIL
AGpsCallbacks
GonkGPSGeolocationProvider::mAGPSCallbacks = {
AGPSStatusCallback,
CreateThreadCallback,
};
AGpsRilCallbacks
GonkGPSGeolocationProvider::mAGPSRILCallbacks = {
AGPSRILSetIDCallback,
AGPSRILRefLocCallback,
CreateThreadCallback,
};
AGpsCallbacks GonkGPSGeolocationProvider::mAGPSCallbacks;
AGpsRilCallbacks GonkGPSGeolocationProvider::mAGPSRILCallbacks;
#endif // MOZ_B2G_RIL
void
@ -564,6 +541,31 @@ GonkGPSGeolocationProvider::Init()
return;
}
if (!mCallbacks.size) {
mCallbacks.size = sizeof(GpsCallbacks);
mCallbacks.location_cb = LocationCallback;
mCallbacks.status_cb = StatusCallback;
mCallbacks.sv_status_cb = SvStatusCallback;
mCallbacks.nmea_cb = NmeaCallback;
mCallbacks.set_capabilities_cb = SetCapabilitiesCallback;
mCallbacks.acquire_wakelock_cb = AcquireWakelockCallback;
mCallbacks.release_wakelock_cb = ReleaseWakelockCallback;
mCallbacks.create_thread_cb = CreateThreadCallback;
#ifdef GPS_CAPABILITY_ON_DEMAND_TIME
mCallbacks.request_utc_time_cb = RequestUtcTimeCallback;
#endif
#ifdef MOZ_B2G_RIL
mAGPSCallbacks.status_cb = AGPSStatusCallback;
mAGPSCallbacks.create_thread_cb = CreateThreadCallback;
mAGPSRILCallbacks.request_setid = AGPSRILSetIDCallback;
mAGPSRILCallbacks.request_refloc = AGPSRILRefLocCallback;
mAGPSRILCallbacks.create_thread_cb = CreateThreadCallback;
#endif
}
if (mGpsInterface->init(&mCallbacks) != 0) {
return;
}

View File

@ -1576,6 +1576,15 @@ RadioInterfaceLayer.prototype = {
return this.radioInterfaces[clientId];
},
getClientIdForEmergencyCall: function() {
for (let cid = 0; cid < this.numRadioInterfaces; ++cid) {
if (gRadioEnabledController._isRadioAbleToEnableAtClient(cid)) {
return cid;
}
}
return -1;
},
setMicrophoneMuted: function(muted) {
for (let clientId = 0; clientId < this.numRadioInterfaces; clientId++) {
let radioInterface = this.radioInterfaces[clientId];

View File

@ -93,12 +93,19 @@ interface nsIRadioInterface : nsISupports
void getNeighboringCellIds(in nsINeighboringCellIdsCallback callback);
};
[scriptable, uuid(d035c32e-b491-11e3-9f9d-c716fab88bd6)]
[scriptable, uuid(78b65e8c-68e7-4510-9a05-65bba12b283e)]
interface nsIRadioInterfaceLayer : nsISupports
{
readonly attribute unsigned long numRadioInterfaces;
nsIRadioInterface getRadioInterface(in unsigned long clientId);
/**
* Select a proper client for dialing emergency call.
*
* @return clientId or -1 if none of the clients are avaialble.
*/
unsigned long getClientIdForEmergencyCall();
void setMicrophoneMuted(in boolean muted);
};

View File

@ -374,17 +374,7 @@ TelephonyService.prototype = {
aListener.enumerateCallStateComplete();
},
isDialing: false,
dial: function(aClientId, aNumber, aIsEmergency, aTelephonyCallback) {
if (DEBUG) debug("Dialing " + (aIsEmergency ? "emergency " : "") + aNumber);
if (this.isDialing) {
if (DEBUG) debug("Already has a dialing call. Drop.");
aTelephonyCallback.notifyDialError(DIAL_ERROR_INVALID_STATE_ERROR);
return;
}
function hasCallsOnOtherClient(aClientId) {
_hasCallsOnOtherClient: function(aClientId) {
for (let cid = 0; cid < this._numClients; ++cid) {
if (cid === aClientId) {
continue;
@ -394,18 +384,10 @@ TelephonyService.prototype = {
}
}
return false;
}
// For DSDS, if there is aleady a call on SIM 'aClientId', we cannot place
// any new call on other SIM.
if (hasCallsOnOtherClient.call(this, aClientId)) {
if (DEBUG) debug("Already has a call on other sim. Drop.");
aTelephonyCallback.notifyDialError(DIAL_ERROR_OTHER_CONNECTION_IN_USE);
return;
}
},
// All calls in the conference is regarded as one conference call.
function numCallsOnLine(aClientId) {
_numCallsOnLine: function(aClientId) {
let numCalls = 0;
let hasConference = false;
@ -419,15 +401,44 @@ TelephonyService.prototype = {
}
return hasConference ? numCalls + 1 : numCalls;
}
},
if (numCallsOnLine.call(this, aClientId) >= 2) {
if (DEBUG) debug("Has more than 2 calls on line. Drop.");
isDialing: false,
dial: function(aClientId, aNumber, aIsEmergency, aTelephonyCallback) {
if (DEBUG) debug("Dialing " + (aIsEmergency ? "emergency " : "") + aNumber);
if (this.isDialing) {
if (DEBUG) debug("Error: Already has a dialing call.");
aTelephonyCallback.notifyDialError(DIAL_ERROR_INVALID_STATE_ERROR);
return;
}
// we don't try to be too clever here, as the phone is probably in the
// Select a proper clientId for dialEmergency.
if (aIsEmergency) {
aClientId = gRadioInterfaceLayer.getClientIdForEmergencyCall() ;
if (aClientId === -1) {
if (DEBUG) debug("Error: No client is avaialble for emergency call.");
aTelephonyCallback.notifyDialError(DIAL_ERROR_INVALID_STATE_ERROR);
return;
}
}
// For DSDS, if there is aleady a call on SIM 'aClientId', we cannot place
// any new call on other SIM.
if (this._hasCallsOnOtherClient(aClientId)) {
if (DEBUG) debug("Error: Already has a call on other sim.");
aTelephonyCallback.notifyDialError(DIAL_ERROR_OTHER_CONNECTION_IN_USE);
return;
}
// We can only have at most two calls on the same line (client).
if (this._numCallsOnLine(aClientId) >= 2) {
if (DEBUG) debug("Error: Has more than 2 calls on line.");
aTelephonyCallback.notifyDialError(DIAL_ERROR_INVALID_STATE_ERROR);
return;
}
// We don't try to be too clever here, as the phone is probably in the
// locked state. Let's just check if it's a number without normalizing
if (!aIsEmergency) {
aNumber = gPhoneNumberUtils.normalize(aNumber);

View File

@ -34,6 +34,7 @@
#ifdef MOZILLA_INTERNAL_API
#include "nsIPrincipal.h"
#include "nsIDocument.h"
#include "mozilla/Preferences.h"
#endif
#include <stdlib.h>
@ -257,6 +258,9 @@ int VcmSIPCCBinding::getVideoCodecsHw()
// Note that currently, OMXCodecReservation needs to be held by an sp<> because it puts
// 'this' into an sp<EventListener> to talk to the resource reservation code
#ifdef MOZ_WEBRTC_OMX
#ifdef MOZILLA_INTERNAL_API
if (Preferences::GetBool("media.peerconnection.video.h264_enabled")) {
#endif
android::sp<android::OMXCodecReservation> encode = new android::OMXCodecReservation(true);
android::sp<android::OMXCodecReservation> decode = new android::OMXCodecReservation(false);
@ -267,6 +271,9 @@ int VcmSIPCCBinding::getVideoCodecsHw()
CSFLogDebug( logTag, "%s: H264 hardware codec available", __FUNCTION__);
return VCM_CODEC_RESOURCE_H264;
}
#if defined( MOZILLA_INTERNAL_API)
}
#endif
#endif
return 0;

View File

@ -33,9 +33,6 @@ public class BrowserContract {
public static final String READING_LIST_AUTHORITY = AppConstants.ANDROID_PACKAGE_NAME + ".db.readinglist";
public static final Uri READING_LIST_AUTHORITY_URI = Uri.parse("content://" + READING_LIST_AUTHORITY);
public static final String SEARCH_HISTORY_AUTHORITY = AppConstants.ANDROID_PACKAGE_NAME + ".db.searchhistory";
public static final Uri SEARCH_HISTORY_AUTHORITY_URI = Uri.parse("content://" + SEARCH_HISTORY_AUTHORITY);
public static final String PARAM_PROFILE = "profile";
public static final String PARAM_PROFILE_PATH = "profilePath";
public static final String PARAM_LIMIT = "limit";
@ -436,17 +433,6 @@ public class BrowserContract {
public static final String TYPE = "type";
}
@RobocopTarget
public static final class SearchHistory implements CommonColumns, HistoryColumns {
private SearchHistory() {}
public static final String CONTENT_TYPE = "vnd.android.cursor.dir/searchhistory";
public static final String QUERY = "query";
public static final String TABLE_NAME = "searchhistory";
public static final Uri CONTENT_URI = Uri.withAppendedPath(SEARCH_HISTORY_AUTHORITY_URI, "searchhistory");
}
@RobocopTarget
public static final class SuggestedSites implements CommonColumns, URLColumns {
private SuggestedSites() {}

View File

@ -16,7 +16,6 @@ import org.mozilla.gecko.db.BrowserContract.Favicons;
import org.mozilla.gecko.db.BrowserContract.History;
import org.mozilla.gecko.db.BrowserContract.Obsolete;
import org.mozilla.gecko.db.BrowserContract.ReadingListItems;
import org.mozilla.gecko.db.BrowserContract.SearchHistory;
import org.mozilla.gecko.db.BrowserContract.Thumbnails;
import org.mozilla.gecko.sync.Utils;
@ -35,7 +34,7 @@ import android.util.Log;
final class BrowserDatabaseHelper extends SQLiteOpenHelper {
private static final String LOGTAG = "GeckoBrowserDBHelper";
public static final int DATABASE_VERSION = 19;
public static final int DATABASE_VERSION = 18;
public static final String DATABASE_NAME = "browser.db";
final protected Context mContext;
@ -750,20 +749,6 @@ final class BrowserDatabaseHelper extends SQLiteOpenHelper {
createOrUpdateAllSpecialFolders(db);
createReadingListTable(db);
createSearchHistoryTable(db);
}
private void createSearchHistoryTable(SQLiteDatabase db) {
debug("Creating " + SearchHistory.TABLE_NAME + " table");
db.execSQL("CREATE TABLE " + SearchHistory.TABLE_NAME + "(" +
SearchHistory._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " +
SearchHistory.QUERY + " TEXT UNIQUE NOT NULL, " +
SearchHistory.DATE_LAST_VISITED + " INTEGER, " +
SearchHistory.VISITS + " INTEGER ) ");
db.execSQL("CREATE INDEX idx_search_history_last_visited ON " +
SearchHistory.TABLE_NAME + "(" + SearchHistory.DATE_LAST_VISITED + ")");
}
private void createReadingListTable(SQLiteDatabase db) {
@ -1393,10 +1378,6 @@ final class BrowserDatabaseHelper extends SQLiteOpenHelper {
}
}
private void upgradeDatabaseFrom18to19(SQLiteDatabase db) {
createSearchHistoryTable(db);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
debug("Upgrading browser.db: " + db.getPath() + " from " +
@ -1473,10 +1454,6 @@ final class BrowserDatabaseHelper extends SQLiteOpenHelper {
case 18:
upgradeDatabaseFrom17to18(db);
break;
case 19:
upgradeDatabaseFrom18to19(db);
break;
}
}

View File

@ -1,112 +0,0 @@
/* 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/. */
package org.mozilla.gecko.db;
import org.mozilla.gecko.db.BrowserContract.SearchHistory;
import android.content.ContentUris;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
import android.text.TextUtils;
public class SearchHistoryProvider extends SharedBrowserDatabaseProvider {
/**
* Collapse whitespace.
*/
private String stripWhitespace(String query) {
if (TextUtils.isEmpty(query)) {
return "";
}
// Collapse whitespace
return query.trim().replaceAll("\\s+", " ");
}
@Override
public Uri insertInTransaction(Uri uri, ContentValues cv) {
final String query = stripWhitespace(cv.getAsString(SearchHistory.QUERY));
// We don't support inserting empty search queries.
if (TextUtils.isEmpty(query)) {
return null;
}
final SQLiteDatabase db = getWritableDatabase(uri);
/*
* FIRST: Try incrementing the VISITS counter and updating the DATE_LAST_VISITED.
*/
final String sql = "UPDATE " + SearchHistory.TABLE_NAME + " SET " +
SearchHistory.VISITS + " = " + SearchHistory.VISITS + " + 1, " +
SearchHistory.DATE_LAST_VISITED + " = " + System.currentTimeMillis() +
" WHERE " + SearchHistory.QUERY + " = ?";
final Cursor c = db.rawQuery(sql, new String[] { query });
try {
if (c.getCount() > 1) {
// There is a UNIQUE constraint on the QUERY column,
// so there should only be one match.
return null;
}
if (c.moveToFirst()) {
return ContentUris
.withAppendedId(uri, c.getInt(c.getColumnIndex(SearchHistory._ID)));
}
} finally {
c.close();
}
/*
* SECOND: If the update failed, then insert a new record.
*/
cv.put(SearchHistory.QUERY, query);
cv.put(SearchHistory.VISITS, 1);
cv.put(SearchHistory.DATE_LAST_VISITED, System.currentTimeMillis());
long id = db.insert(SearchHistory.TABLE_NAME, null, cv);
if (id < 0) {
return null;
}
return ContentUris.withAppendedId(uri, id);
}
@Override
public int deleteInTransaction(Uri uri, String selection, String[] selectionArgs) {
return getWritableDatabase(uri)
.delete(SearchHistory.TABLE_NAME, selection, selectionArgs);
}
/**
* Since we are managing counts and the full-text db, an update
* could mangle the internal state. So we disable it.
*/
@Override
public int updateInTransaction(Uri uri, ContentValues values, String selection,
String[] selectionArgs) {
throw new UnsupportedOperationException(
"This content provider does not support updating items");
}
@Override
public Cursor query(Uri uri, String[] projection, String selection,
String[] selectionArgs, String sortOrder) {
String groupBy = null;
String having = null;
return getReadableDatabase(uri)
.query(SearchHistory.TABLE_NAME, projection, selection, selectionArgs,
groupBy, having, sortOrder);
}
@Override
public String getType(Uri uri) {
return SearchHistory.CONTENT_TYPE;
}
}

View File

@ -150,7 +150,6 @@ gbjar.sources += [
'db/PerProfileDatabaseProvider.java',
'db/PerProfileDatabases.java',
'db/ReadingListProvider.java',
'db/SearchHistoryProvider.java',
'db/SharedBrowserDatabaseProvider.java',
'db/SQLiteBridgeContentProvider.java',
'db/SuggestedSites.java',

View File

@ -59,7 +59,7 @@ skip-if = android_version == "10" || processor == "x86"
# [testMasterPassword] disabled for being finicky, see bug 1033013
# disabled on 2.3; bug 979603
# disabled on 4.0; bug 1006242
skip-if = android_version == "10" || android_version == "15"
# skip-if = android_version == "10" || android_version == "15"
[testNewTab]
# disabled on 2.3; bug 995696
skip-if = android_version == "10"
@ -80,7 +80,6 @@ skip-if = processor == "x86"
skip-if = processor == "x86"
# [testReaderMode] # see bug 913254, 936224
[testReadingListProvider]
[testSearchHistoryProvider]
[testSearchSuggestions]
# disabled on x86; bug 907768
skip-if = processor == "x86"

View File

@ -1,269 +0,0 @@
/* 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/. */
package org.mozilla.gecko.tests;
import java.util.concurrent.Callable;
import org.mozilla.gecko.db.BrowserContract;
import org.mozilla.gecko.db.BrowserContract.SearchHistory;
import org.mozilla.gecko.db.SearchHistoryProvider;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.database.Cursor;
public class testSearchHistoryProvider extends ContentProviderTest {
// Translations of "United Kingdom" in several different languages
private static final String[] testStrings = {"An Ríocht Aontaithe", // Irish
"Angli", // Albanian
"Britanniarum Regnum", // Latin
"Britio", // Esperanto
"Büyük Britanya", // Turkish
"Egyesült Királyság", // Hungarian
"Erresuma Batua", // Basque
"Inggris Raya", // Indonesian
"Ir-Renju Unit", // Maltese
"Iso-Britannia", // Finnish
"Jungtinė Karalystė", // Lithuanian
"Lielbritānija", // Latvian
"Regatul Unit", // Romanian
"Regne Unit", // Catalan, Valencian
"Regno Unito", // Italian
"Royaume-Uni", // French
"Spojené království", // Czech
"Spojené kráľovstvo", // Slovak
"Storbritannia", // Norwegian
"Storbritannien", // Danish
"Suurbritannia", // Estonian
"Ujedinjeno Kraljevstvo", // Bosnian
"United Alaeze", // Igbo
"United Kingdom", // English
"Vereinigtes Königreich", // German
"Verenigd Koninkrijk", // Dutch
"Verenigde Koninkryk", // Afrikaans
"Vương quốc Anh", // Vietnamese
"Wayòm Ini", // Haitian, Haitian Creole
"Y Deyrnas Unedig", // Welsh
"Združeno kraljestvo", // Slovene
"Zjednoczone Królestwo", // Polish
"Ηνωμένο Βασίλειο", // Greek (modern)
"Великобритания", // Russian
"Нэгдсэн Вант Улс", // Mongolian
"Обединетото Кралство", // Macedonian
"Уједињено Краљевство", // Serbian
"Միացյալ Թագավորություն", // Armenian
"בריטניה", // Hebrew (modern)
"פֿאַראייניקטע מלכות", // Yiddish
"المملكة المتحدة", // Arabic
"برطانیہ", // Urdu
"پادشاهی متحده", // Persian (Farsi)
"यूनाइटेड किंगडम", // Hindi
"संयुक्त राज्य", // Nepali
"যুক্তরাজ্য", // Bengali, Bangla
"યુનાઇટેડ કિંગડમ", // Gujarati
"ஐக்கிய ராஜ்யம்", // Tamil
"สหราชอาณาจักร", // Thai
"ສະ​ຫະ​ປະ​ຊາ​ຊະ​ອາ​ນາ​ຈັກ", // Lao
"გაერთიანებული სამეფო", // Georgian
"イギリス", // Japanese
"联合王国" // Chinese
};
private static final String DB_NAME = "searchhistory.db";
/**
* Boilerplate alert.
* <p/>
* Make sure this method is present and that it returns a new
* instance of your class.
*/
private static Callable<ContentProvider> sProviderFactory =
new Callable<ContentProvider>() {
@Override
public ContentProvider call() {
return new SearchHistoryProvider();
}
};
@Override
public void setUp() throws Exception {
super.setUp(sProviderFactory, BrowserContract.SEARCH_HISTORY_AUTHORITY, DB_NAME);
mTests.add(new TestInsert());
mTests.add(new TestUnicodeQuery());
mTests.add(new TestTimestamp());
mTests.add(new TestDelete());
mTests.add(new TestIncrement());
}
public void testSearchHistory() throws Exception {
for (Runnable test : mTests) {
String testName = test.getClass().getSimpleName();
setTestName(testName);
mAsserter.dumpLog(
"testBrowserProvider: Database empty - Starting " + testName + ".");
// Clear the db
mProvider.delete(SearchHistory.CONTENT_URI, null, null);
test.run();
}
}
/**
* Verify that we can insert values into the DB, including unicode.
*/
private class TestInsert extends TestCase {
@Override
public void test() throws Exception {
ContentValues cv;
for (int i = 0; i < testStrings.length; i++) {
cv = new ContentValues();
cv.put(SearchHistory.QUERY, testStrings[i]);
mProvider.insert(SearchHistory.CONTENT_URI, cv);
}
Cursor c = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null);
mAsserter.is(c.getCount(), testStrings.length,
"Should have one row for each insert");
c.close();
}
}
/**
* Verify that we can insert values into the DB, including unicode.
*/
private class TestUnicodeQuery extends TestCase {
@Override
public void test() throws Exception {
ContentValues cv;
Cursor c = null;
String selection = SearchHistory.QUERY + " = ?";
for (int i = 0; i < testStrings.length; i++) {
cv = new ContentValues();
cv.put(SearchHistory.QUERY, testStrings[i]);
mProvider.insert(SearchHistory.CONTENT_URI, cv);
c = mProvider.query(SearchHistory.CONTENT_URI, null, selection,
new String[]{ testStrings[i] }, null);
mAsserter.is(c.getCount(), 1,
"Should have one row for insert of " + testStrings[i]);
}
if (c != null) {
c.close();
}
}
}
/**
* Verify that timestamps are updated on insert.
*/
private class TestTimestamp extends TestCase {
@Override
public void test() throws Exception {
String insertedTerm = "Courtside Seats";
long insertStart;
long insertFinish;
long t1Db;
long t2Db;
ContentValues cv = new ContentValues();
cv.put(SearchHistory.QUERY, insertedTerm);
// First check that the DB has a value that is close to the
// system time.
insertStart = System.currentTimeMillis();
mProvider.insert(SearchHistory.CONTENT_URI, cv);
Cursor c = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null);
c.moveToFirst();
t1Db = c.getLong(c.getColumnIndex(SearchHistory.DATE_LAST_VISITED));
c.close();
insertFinish = System.currentTimeMillis();
mAsserter.ok(t1Db >= insertStart, "DATE_LAST_VISITED",
"Date last visited should be set on insert.");
mAsserter.ok(t1Db <= insertFinish, "DATE_LAST_VISITED",
"Date last visited should be set on insert.");
cv = new ContentValues();
cv.put(SearchHistory.QUERY, insertedTerm);
insertStart = System.currentTimeMillis();
mProvider.insert(SearchHistory.CONTENT_URI, cv);
c = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null);
c.moveToFirst();
t2Db = c.getLong(c.getColumnIndex(SearchHistory.DATE_LAST_VISITED));
c.close();
insertFinish = System.currentTimeMillis();
mAsserter.ok(t2Db >= insertStart, "DATE_LAST_VISITED",
"Date last visited should be set on insert.");
mAsserter.ok(t2Db <= insertFinish, "DATE_LAST_VISITED",
"Date last visited should be set on insert.");
mAsserter.ok(t2Db > t1Db, "DATE_LAST_VISITED",
"Date last visited should be updated on key increment.");
}
}
/**
* Verify that sending a delete command empties the database.
*/
private class TestDelete extends TestCase {
@Override
public void test() throws Exception {
String insertedTerm = "Courtside Seats";
ContentValues cv = new ContentValues();
cv.put(SearchHistory.QUERY, insertedTerm);
mProvider.insert(SearchHistory.CONTENT_URI, cv);
Cursor c = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null);
mAsserter.is(c.getCount(), 1, "Should have one value");
mProvider.delete(SearchHistory.CONTENT_URI, null, null);
c.close();
c = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null);
mAsserter.is(c.getCount(), 0, "Should be empty");
mProvider.insert(SearchHistory.CONTENT_URI, cv);
c.close();
c = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null);
mAsserter.is(c.getCount(), 1, "Should have one value");
c.close();
}
}
/**
* Ensure that we only increment when the case matches.
*/
private class TestIncrement extends TestCase {
@Override
public void test() throws Exception {
ContentValues cv = new ContentValues();
cv.put(SearchHistory.QUERY, "omaha");
mProvider.insert(SearchHistory.CONTENT_URI, cv);
cv = new ContentValues();
cv.put(SearchHistory.QUERY, "omaha");
mProvider.insert(SearchHistory.CONTENT_URI, cv);
Cursor c = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null);
c.moveToFirst();
mAsserter.is(c.getCount(), 1, "Should have one result");
mAsserter.is(c.getInt(c.getColumnIndex(SearchHistory.VISITS)), 2,
"Counter should be 2");
c.close();
cv = new ContentValues();
cv.put(SearchHistory.QUERY, "Omaha");
mProvider.insert(SearchHistory.CONTENT_URI, cv);
c = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null);
mAsserter.is(c.getCount(), 2, "Should have two results");
c.close();
}
}
}

View File

@ -201,9 +201,11 @@ NeckoChild::DeallocPRtspChannelChild(PRtspChannelChild* child)
}
PTCPSocketChild*
NeckoChild::AllocPTCPSocketChild()
NeckoChild::AllocPTCPSocketChild(const nsString& host,
const uint16_t& port)
{
TCPSocketChild* p = new TCPSocketChild();
p->Init(host, port);
p->AddIPDLReference();
return p;
}

View File

@ -43,7 +43,8 @@ protected:
AllocPWebSocketChild(const PBrowserOrId&,
const SerializedLoadContext&) MOZ_OVERRIDE;
virtual bool DeallocPWebSocketChild(PWebSocketChild*) MOZ_OVERRIDE;
virtual PTCPSocketChild* AllocPTCPSocketChild() MOZ_OVERRIDE;
virtual PTCPSocketChild* AllocPTCPSocketChild(const nsString& host,
const uint16_t& port) MOZ_OVERRIDE;
virtual bool DeallocPTCPSocketChild(PTCPSocketChild*) MOZ_OVERRIDE;
virtual PTCPServerSocketChild*
AllocPTCPServerSocketChild(const uint16_t& aLocalPort,

View File

@ -397,8 +397,12 @@ NeckoParent::DeallocPRtspChannelParent(PRtspChannelParent* actor)
}
PTCPSocketParent*
NeckoParent::AllocPTCPSocketParent()
NeckoParent::AllocPTCPSocketParent(const nsString& /* host */,
const uint16_t& /* port */)
{
// We actually don't need host/port to construct a TCPSocketParent since
// TCPSocketParent will maintain an internal nsIDOMTCPSocket instance which
// can be delegated to get the host/port.
TCPSocketParent* p = new TCPSocketParent();
p->AddIPDLReference();
return p;

View File

@ -127,7 +127,8 @@ protected:
AllocPWebSocketParent(const PBrowserOrId& browser,
const SerializedLoadContext& aSerialized) MOZ_OVERRIDE;
virtual bool DeallocPWebSocketParent(PWebSocketParent*) MOZ_OVERRIDE;
virtual PTCPSocketParent* AllocPTCPSocketParent() MOZ_OVERRIDE;
virtual PTCPSocketParent* AllocPTCPSocketParent(const nsString& host,
const uint16_t& port) MOZ_OVERRIDE;
virtual PRemoteOpenFileParent*
AllocPRemoteOpenFileParent(const SerializedLoadContext& aSerialized,

View File

@ -102,7 +102,10 @@ child:
nsString realm, uint64_t callbackId);
both:
PTCPSocket();
// Actually we need PTCPSocket() for parent. But ipdl disallows us having different
// signatures on parent and child. So when constructing the parent side object, we just
// leave host/port unused.
PTCPSocket(nsString host, uint16_t port);
};

View File

@ -1,30 +1,6 @@
+ set -e
+ OBJ=obj-x86_64-unknown-linux-gnu
+ obj-x86_64-unknown-linux-gnu/dist/bin/run-mozilla.sh obj-x86_64-unknown-linux-gnu/dist/bin/xpcshell /home/mchew/mozilla-central/security/manager/tools/genHPKPStaticPins.js /home/mchew/mozilla-central/security/manager/tools/PreloadedHPKPins.json /home/mchew/mozilla-central/security/manager/ssl/tests/unit/tlsserver/default-ee.der /home/mchew/mozilla-central/security/manager/boot/src/StaticHPKPins.h
[32405] WARNING: NS_ENSURE_SUCCESS(rv, nsresult::NS_ERROR_UNEXPECTED) failed with result 0x80004005: file /home/mchew/mozilla-central/extensions/cookie/nsPermissionManager.cpp, line 444
[32405] WARNING: Forcing memory-only entry since CacheFileIOManager doesn't have mCacheDirectory.: file /home/mchew/mozilla-central/netwerk/cache2/CacheFile.cpp, line 474
[32405] WARNING: Forcing memory-only entry since CacheFileIOManager doesn't have mCacheDirectory.: file /home/mchew/mozilla-central/netwerk/cache2/CacheFile.cpp, line 474
Can't find hash in builtin certs for Chrome nickname RapidSSL, inserting GOOGLE_PIN_RapidSSL
Can't find hash in builtin certs for Chrome nickname Entrust_G2, inserting GOOGLE_PIN_Entrust_G2
Can't find hash in builtin certs for Chrome nickname Tor2web, inserting GOOGLE_PIN_Tor2web
Can't find hash in builtin certs for Chrome nickname AlphaSSL_G2, inserting GOOGLE_PIN_AlphaSSL_G2
Can't find hash in builtin certs for Chrome nickname CryptoCat1, inserting GOOGLE_PIN_CryptoCat1
Can't find hash in builtin certs for Chrome nickname Libertylavabitcom, inserting GOOGLE_PIN_Libertylavabitcom
[32405] WARNING: Forcing memory-only entry since CacheFileIOManager doesn't have mCacheDirectory.: file /home/mchew/mozilla-central/netwerk/cache2/CacheFile.cpp, line 474
[32405] WARNING: '!mMainThread', file /home/mchew/mozilla-central/xpcom/threads/nsThreadManager.cpp, line 279
[32405] WARNING: '!thread', file /home/mchew/mozilla-central/xpcom/glue/nsThreadUtils.cpp, line 194
[32405] WARNING: '!thread', file /home/mchew/mozilla-central/xpcom/glue/nsThreadUtils.cpp, line 194
[32405] WARNING: '!mMainThread', file /home/mchew/mozilla-central/xpcom/threads/nsThreadManager.cpp, line 269
[32405] WARNING: 'NS_FAILED(rv)', file /home/mchew/mozilla-central/xpcom/glue/nsThreadUtils.cpp, line 180
[32405] WARNING: Leaking the RDF Service.: file /home/mchew/mozilla-central/rdf/build/nsRDFModule.cpp, line 165
[32405] WARNING: '!compMgr', file /home/mchew/mozilla-central/xpcom/glue/nsComponentManagerUtils.cpp, line 59
[32405] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /home/mchew/mozilla-central/xpcom/base/nsTraceRefcnt.cpp, line 148
[32405] WARNING: XPCOM objects created/destroyed from static ctor/dtor: file /home/mchew/mozilla-central/xpcom/base/nsTraceRefcnt.cpp, line 148
nsStringStats
=> mAllocCount: 3577
=> mReallocCount: 444
=> mFreeCount: 3577
=> mShareCount: 8797
=> mAdoptCount: 177
=> mAdoptFreeCount: 177
=> Process ID: 32405, Thread ID: 140248381782592

View File

@ -17,7 +17,7 @@ braintreegateway.com: did not receive HSTS header
braintreepayments.com: did not receive HSTS header
browserid.org: did not receive HSTS header
business.medbank.com.mt: did not receive HSTS header
calyxinstitute.org: could not connect to host
calyxinstitute.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no]
carlolly.co.uk: did not receive HSTS header
cert.se: max-age too low: 2628001
checkout.google.com: did not receive HSTS header (error ignored - included regardless)
@ -54,10 +54,10 @@ googleplex.com: could not connect to host (error ignored - included regardless)
goto.google.com: did not receive HSTS header (error ignored - included regardless)
greplin.com: did not receive HSTS header
groups.google.com: did not receive HSTS header (error ignored - included regardless)
harvestapp.com: could not connect to host
haste.ch: could not connect to host
history.google.com: did not receive HSTS header (error ignored - included regardless)
hostedtalkgadget.google.com: did not receive HSTS header (error ignored - included regardless)
id.atlassian.com: did not receive HSTS header
id.atlassian.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no]
in.xero.com: max-age too low: 3600
intercom.io: did not receive HSTS header
iop.intuit.com: max-age too low: 86400
@ -66,12 +66,11 @@ jitsi.org: did not receive HSTS header
jottit.com: did not receive HSTS header
keymaster.lookout.com: did not receive HSTS header
kiwiirc.com: max-age too low: 5256000
lastpass.com: could not connect to host
ledgerscope.net: did not receive HSTS header
liberty.lavabit.com: could not connect to host
lifeguard.aecom.com: did not receive HSTS header
lists.mayfirst.org: did not receive HSTS header
lumi.do: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-hsts-000000000000000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no]
lumi.do: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no]
mail.google.com: did not receive HSTS header (error ignored - included regardless)
market.android.com: did not receive HSTS header (error ignored - included regardless)
mobilethreat.net: could not connect to host
@ -84,17 +83,15 @@ nexth.de: could not connect to host
nexth.net: did not receive HSTS header
nexth.us: could not connect to host
noexpect.org: could not connect to host
onedrive.live.com: could not connect to host
openshift.redhat.com: did not receive HSTS header
ottospora.nl: could not connect to host
paypal.com: max-age too low: 14400
payroll.xero.com: max-age too low: 3600
pixi.me: could not connect to host
platform.lookout.com: could not connect to host
play.google.com: did not receive HSTS header (error ignored - included regardless)
prodpad.com: did not receive HSTS header
profiles.google.com: did not receive HSTS header (error ignored - included regardless)
rapidresearch.me: could not connect to host
rapidresearch.me: did not receive HSTS header
riseup.net: did not receive HSTS header
sah3.net: could not connect to host
saturngames.co.uk: did not receive HSTS header
@ -104,10 +101,8 @@ semenkovich.com: did not receive HSTS header
serverdensity.io: did not receive HSTS header
shops.neonisi.com: could not connect to host
silentcircle.org: could not connect to host
simbolo.co.uk: could not connect to host
simon.butcher.name: max-age too low: 2629743
sites.google.com: did not receive HSTS header (error ignored - included regardless)
skydrive.live.com: could not connect to host
sol.io: could not connect to host
souyar.de: could not connect to host
souyar.net: could not connect to host
@ -126,13 +121,13 @@ uprotect.it: could not connect to host
wallet.google.com: did not receive HSTS header (error ignored - included regardless)
webmail.mayfirst.org: did not receive HSTS header
whonix.org: did not receive HSTS header
www.calyxinstitute.org: could not connect to host
www.calyxinstitute.org: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no]
www.cueup.com: did not receive HSTS header
www.developer.mydigipass.com: could not connect to host
www.elanex.biz: did not receive HSTS header
www.gmail.com: did not receive HSTS header (error ignored - included regardless)
www.googlemail.com: did not receive HSTS header (error ignored - included regardless)
www.gov.uk: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-hsts-000000000000000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no]
www.gov.uk: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no]
www.greplin.com: could not connect to host
www.intercom.io: did not receive HSTS header
www.jitsi.org: did not receive HSTS header
@ -142,9 +137,8 @@ www.logentries.com: did not receive HSTS header
www.moneybookers.com: did not receive HSTS header
www.neonisi.com: could not connect to host
www.paycheckrecords.com: max-age too low: 86400
www.paypal.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-hsts-000000000000000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no]
www.paypal.com: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 124" data: no]
www.roddis.net: did not receive HSTS header
www.sandbox.mydigipass.com: could not connect to host
www.simbolo.co.uk: could not connect to host
www.surfeasy.com: did not receive HSTS header
zoo24.de: max-age too low: 2592000

View File

@ -8,7 +8,7 @@
/*****************************************************************************/
#include <stdint.h>
const PRTime gPreloadListExpirationTime = INT64_C(1414837778473000);
const PRTime gPreloadListExpirationTime = INT64_C(1415206745808000);
class nsSTSPreload
{

View File

@ -25,7 +25,6 @@ class TPSFirefoxRunner(object):
self.url = None
self.binary = binary
self.runner = None
self.installdir = None
def __del__(self):
@ -78,8 +77,8 @@ class TPSFirefoxRunner(object):
if self.binary is None and self.url:
self.binary = self.download_build()
if self.runner is None:
self.runner = FirefoxRunner(profile=self.profile, binary=self.binary, env=env, cmdargs=args)
runner = FirefoxRunner(profile=self.profile, binary=self.binary,
env=env, cmdargs=args)
self.runner.start(timeout=timeout)
return self.runner.wait()
runner.start(timeout=timeout)
return runner.wait()

View File

@ -2776,6 +2776,10 @@ function nodeDocument(node) {
* See TreeWalker documentation for explanations of the methods.
*/
function DocumentWalker(aNode, aRootWin, aShow, aFilter, aExpandEntityReferences) {
if (!aRootWin.location) {
throw new Error("Got an invalid root window in DocumentWalker");
}
let doc = nodeDocument(aNode);
this.layoutHelpers = new LayoutHelpers(aRootWin);
this.walker = doc.createTreeWalker(doc,

View File

@ -61,6 +61,7 @@ let initTable = [
["io", "@mozilla.org/network/io-service;1", "nsIIOService2"],
["locale", "@mozilla.org/intl/nslocaleservice;1", "nsILocaleService"],
["logins", "@mozilla.org/login-manager;1", "nsILoginManager"],
["netutil", "@mozilla.org/network/util;1", "nsINetUtil"],
["obs", "@mozilla.org/observer-service;1", "nsIObserverService"],
["perms", "@mozilla.org/permissionmanager;1", "nsIPermissionManager"],
["prompt", "@mozilla.org/embedcomp/prompt-service;1", "nsIPromptService"],