зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to b2g-inbound.
This commit is contained in:
Коммит
a3784baa5f
|
@ -185,6 +185,7 @@ MOCHITEST_BROWSER_FILES = \
|
|||
browser_bug818118.js \
|
||||
browser_bug820497.js \
|
||||
browser_bug822367.js \
|
||||
browser_bug902156.js \
|
||||
browser_bug832435.js \
|
||||
browser_bug839103.js \
|
||||
browser_bug880101.js \
|
||||
|
@ -299,6 +300,10 @@ MOCHITEST_BROWSER_FILES = \
|
|||
file_bug822367_4B.html \
|
||||
file_bug822367_5.html \
|
||||
file_bug822367_6.html \
|
||||
file_bug902156_1.html \
|
||||
file_bug902156_2.html \
|
||||
file_bug902156_3.html \
|
||||
file_bug902156.js \
|
||||
file_fullscreen-window-open.html \
|
||||
healthreport_testRemoteCommands.html \
|
||||
moz.png \
|
||||
|
|
|
@ -5,7 +5,11 @@
|
|||
|
||||
const PREF_DISPLAY = "security.mixed_content.block_display_content";
|
||||
const PREF_ACTIVE = "security.mixed_content.block_active_content";
|
||||
|
||||
// We alternate for even and odd test cases to simulate different hosts
|
||||
const gHttpTestRoot = "https://example.com/browser/browser/base/content/test/";
|
||||
const gHttpTestRoot2 = "https://test1.example.com/browser/browser/base/content/test/";
|
||||
|
||||
var origBlockDisplay;
|
||||
var origBlockActive;
|
||||
var gTestBrowser = null;
|
||||
|
@ -62,7 +66,7 @@ function MixedTest1C() {
|
|||
//Mixed Display Test - Doorhanger should not appear
|
||||
function MixedTest2() {
|
||||
gTestBrowser.addEventListener("load", MixedTest2A, true);
|
||||
var url = gHttpTestRoot + "file_bug822367_2.html";
|
||||
var url = gHttpTestRoot2 + "file_bug822367_2.html";
|
||||
gTestBrowser.contentWindow.location = url;
|
||||
}
|
||||
|
||||
|
@ -102,7 +106,7 @@ function MixedTest3D() {
|
|||
function MixedTest4() {
|
||||
gTestBrowser.removeEventListener("load", MixedTest3B, true);
|
||||
gTestBrowser.addEventListener("load", MixedTest4A, true);
|
||||
var url = gHttpTestRoot + "file_bug822367_4.html";
|
||||
var url = gHttpTestRoot2 + "file_bug822367_4.html";
|
||||
gTestBrowser.contentWindow.location = url;
|
||||
}
|
||||
function MixedTest4A() {
|
||||
|
@ -152,7 +156,7 @@ function MixedTest5C() {
|
|||
function MixedTest6() {
|
||||
gTestBrowser.removeEventListener("load", MixedTest5B, true);
|
||||
gTestBrowser.addEventListener("load", MixedTest6A, true);
|
||||
var url = gHttpTestRoot + "file_bug822367_6.html";
|
||||
var url = gHttpTestRoot2 + "file_bug822367_6.html";
|
||||
gTestBrowser.contentWindow.location = url;
|
||||
}
|
||||
function MixedTest6A() {
|
||||
|
|
|
@ -0,0 +1,213 @@
|
|||
/*
|
||||
* Description of the Tests for
|
||||
* - Bug 902156: Persist "disable protection" option for Mixed Content Blocker
|
||||
*
|
||||
* 1. Navigate to the same domain via document.location
|
||||
* - Load a html page which has mixed content
|
||||
* - Doorhanger to disable protection appears - we disable it
|
||||
* - Load a new page from the same origin using document.location
|
||||
* - Doorhanger should not appear anymore!
|
||||
*
|
||||
* 2. Navigate to the same domain via simulateclick for a link on the page
|
||||
* - Load a html page which has mixed content
|
||||
* - Doorhanger to disable protection appears - we disable it
|
||||
* - Load a new page from the same origin simulating a click
|
||||
* - Doorhanger should not appear anymore!
|
||||
*
|
||||
* 3. Navigate to a differnet domain and show the content is still blocked
|
||||
* - Load a different html page which has mixed content
|
||||
* - Doorhanger to disable protection should appear again because
|
||||
* we navigated away from html page where we disabled the protection.
|
||||
*
|
||||
* Note, for all tests we set gHttpTestRoot to use 'https'.
|
||||
*/
|
||||
|
||||
const PREF_ACTIVE = "security.mixed_content.block_active_content";
|
||||
|
||||
// We alternate for even and odd test cases to simulate different hosts
|
||||
const gHttpTestRoot1 = "https://test1.example.com/browser/browser/base/content/test/";
|
||||
const gHttpTestRoot2 = "https://test2.example.com/browser/browser/base/content/test/";
|
||||
|
||||
var origBlockActive;
|
||||
var gTestBrowser = null;
|
||||
|
||||
registerCleanupFunction(function() {
|
||||
// Set preferences back to their original values
|
||||
Services.prefs.setBoolPref(PREF_ACTIVE, origBlockActive);
|
||||
});
|
||||
|
||||
function cleanUpAfterTests() {
|
||||
gBrowser.removeCurrentTab();
|
||||
window.focus();
|
||||
finish();
|
||||
}
|
||||
/*
|
||||
* Whenever we disable the Mixed Content Blocker of the page
|
||||
* we have to make sure that our condition is properly loaded.
|
||||
*/
|
||||
function waitForCondition(condition, nextTest, errorMsg) {
|
||||
var tries = 0;
|
||||
var interval = setInterval(function() {
|
||||
if (tries >= 30) {
|
||||
ok(false, errorMsg);
|
||||
moveOn();
|
||||
}
|
||||
if (condition()) {
|
||||
moveOn();
|
||||
}
|
||||
tries++;
|
||||
}, 100);
|
||||
var moveOn = function() {
|
||||
clearInterval(interval); nextTest();
|
||||
};
|
||||
}
|
||||
|
||||
//------------------------ Test 1 ------------------------------
|
||||
|
||||
function test1A() {
|
||||
// Removing EventListener because we have to register a new
|
||||
// one once the page is loaded with mixed content blocker disabled
|
||||
gTestBrowser.removeEventListener("load", test1A, true);
|
||||
gTestBrowser.addEventListener("load", test1B, true);
|
||||
|
||||
var notification = PopupNotifications.getNotification("mixed-content-blocked", gTestBrowser);
|
||||
ok(notification, "OK: Mixed Content Doorhanger appeared in Test1A!");
|
||||
|
||||
// Disable Mixed Content Protection for the page
|
||||
notification.secondaryActions[0].callback();
|
||||
}
|
||||
|
||||
function test1B() {
|
||||
var expected = "Mixed Content Blocker disabled";
|
||||
waitForCondition(
|
||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
test1C, "Error: Waited too long for mixed script to run in Test 1B");
|
||||
}
|
||||
|
||||
function test1C() {
|
||||
gTestBrowser.removeEventListener("load", test1B, true);
|
||||
var actual = content.document.getElementById('mctestdiv').innerHTML;
|
||||
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 1C");
|
||||
|
||||
// The Script loaded after we disabled the page, now we are going to reload the
|
||||
// page and see if our decision is persistent
|
||||
gTestBrowser.addEventListener("load", test1D, true);
|
||||
|
||||
var url = gHttpTestRoot1 + "file_bug902156_2.html";
|
||||
gTestBrowser.contentWindow.location = url;
|
||||
}
|
||||
|
||||
function test1D() {
|
||||
gTestBrowser.removeEventListener("load", test1D, true);
|
||||
|
||||
// The Doorhanger should not appear, because our decision of disabling the
|
||||
// mixed content blocker is persistent.
|
||||
var notification = PopupNotifications.getNotification("mixed-content-blocked", gTestBrowser);
|
||||
ok(!notification, "OK: Mixed Content Doorhanger did not appear again in Test1D!");
|
||||
|
||||
var actual = content.document.getElementById('mctestdiv').innerHTML;
|
||||
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 1D");
|
||||
|
||||
// move on to Test 2
|
||||
test2();
|
||||
}
|
||||
|
||||
//------------------------ Test 2 ------------------------------
|
||||
|
||||
function test2() {
|
||||
gTestBrowser.addEventListener("load", test2A, true);
|
||||
var url = gHttpTestRoot2 + "file_bug902156_2.html";
|
||||
gTestBrowser.contentWindow.location = url;
|
||||
}
|
||||
|
||||
function test2A() {
|
||||
// Removing EventListener because we have to register a new
|
||||
// one once the page is loaded with mixed content blocker disabled
|
||||
gTestBrowser.removeEventListener("load", test2A, true);
|
||||
gTestBrowser.addEventListener("load", test2B, true);
|
||||
|
||||
var notification = PopupNotifications.getNotification("mixed-content-blocked", gTestBrowser);
|
||||
ok(notification, "OK: Mixed Content Doorhanger appeared in Test 2A!");
|
||||
|
||||
// Disable Mixed Content Protection for the page
|
||||
notification.secondaryActions[0].callback();
|
||||
}
|
||||
|
||||
function test2B() {
|
||||
var expected = "Mixed Content Blocker disabled";
|
||||
waitForCondition(
|
||||
function() content.document.getElementById('mctestdiv').innerHTML == expected,
|
||||
test2C, "Error: Waited too long for mixed script to run in Test 2B");
|
||||
}
|
||||
|
||||
function test2C() {
|
||||
gTestBrowser.removeEventListener("load", test2B, true);
|
||||
var actual = content.document.getElementById('mctestdiv').innerHTML;
|
||||
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 2C");
|
||||
|
||||
// The Script loaded after we disabled the page, now we are going to reload the
|
||||
// page and see if our decision is persistent
|
||||
gTestBrowser.addEventListener("load", test2D, true);
|
||||
|
||||
// reload the page using the provided link in the html file
|
||||
var mctestlink = content.document.getElementById("mctestlink");
|
||||
mctestlink.click();
|
||||
}
|
||||
|
||||
function test2D() {
|
||||
gTestBrowser.removeEventListener("load", test2D, true);
|
||||
|
||||
// The Doorhanger should not appear, because our decision of disabling the
|
||||
// mixed content blocker is persistent.
|
||||
var notification = PopupNotifications.getNotification("mixed-content-blocked", gTestBrowser);
|
||||
ok(!notification, "OK: Mixed Content Doorhanger did not appear again in Test2D!");
|
||||
|
||||
var actual = content.document.getElementById('mctestdiv').innerHTML;
|
||||
is(actual, "Mixed Content Blocker disabled", "OK: Executed mixed script in Test 2D");
|
||||
|
||||
// move on to Test 3
|
||||
test3();
|
||||
}
|
||||
|
||||
//------------------------ Test 3 ------------------------------
|
||||
|
||||
function test3() {
|
||||
gTestBrowser.addEventListener("load", test3A, true);
|
||||
var url = gHttpTestRoot1 + "file_bug902156_3.html";
|
||||
gTestBrowser.contentWindow.location = url;
|
||||
}
|
||||
|
||||
function test3A() {
|
||||
// Removing EventListener because we have to register a new
|
||||
// one once the page is loaded with mixed content blocker disabled
|
||||
gTestBrowser.removeEventListener("load", test3A, true);
|
||||
|
||||
var notification = PopupNotifications.getNotification("mixed-content-blocked", gTestBrowser);
|
||||
ok(notification, "OK: Mixed Content Doorhanger appeared in Test 3A!");
|
||||
|
||||
// We are done with tests, clean up
|
||||
cleanUpAfterTests();
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
|
||||
function test() {
|
||||
// Performing async calls, e.g. 'onload', we have to wait till all of them finished
|
||||
waitForExplicitFinish();
|
||||
|
||||
// Store original preferences so we can restore settings after testing
|
||||
origBlockActive = Services.prefs.getBoolPref(PREF_ACTIVE);
|
||||
|
||||
Services.prefs.setBoolPref(PREF_ACTIVE, true);
|
||||
|
||||
// Not really sure what this is doing
|
||||
var newTab = gBrowser.addTab();
|
||||
gBrowser.selectedTab = newTab;
|
||||
gTestBrowser = gBrowser.selectedBrowser;
|
||||
newTab.linkedBrowser.stop()
|
||||
|
||||
// Starting Test Number 1:
|
||||
gTestBrowser.addEventListener("load", test1A, true);
|
||||
var url = gHttpTestRoot1 + "file_bug902156_1.html";
|
||||
gTestBrowser.contentWindow.location = url;
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
/*
|
||||
* Once the mixed content blocker is disabled for the page, this scripts loads
|
||||
* and updates the text inside the div container.
|
||||
*/
|
||||
document.getElementById("mctestdiv").innerHTML = "Mixed Content Blocker disabled";
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
Test 1 for Bug 902156 - See file browser_bug902156.js for description.
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=902156
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test 1 for Bug 902156</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="mctestdiv">Mixed Content Blocker enabled</div>
|
||||
<script src="http://test1.example.com/browser/browser/base/content/test/file_bug902156.js" ></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
Test 2 for Bug 902156 - See file browser_bug902156.js for description.
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=902156
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test 2 for Bug 902156</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="mctestdiv">Mixed Content Blocker enabled</div>
|
||||
<a href="https://test2.example.com/browser/browser/base/content/test/file_bug902156_1.html"
|
||||
id="mctestlink" target="_top">Go to http site</a>
|
||||
<script src="http://test2.example.com/browser/browser/base/content/test/file_bug902156.js" ></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
Test 3 for Bug 902156 - See file browser_bug902156.js for description.
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=902156
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test 3 for Bug 902156</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="mctestdiv">Mixed Content Blocker enabled</div>
|
||||
<script src="http://test1.example.com/browser/browser/base/content/test/file_bug902156.js" ></script>
|
||||
</body>
|
||||
</html>
|
|
@ -56,6 +56,7 @@ var tests = {
|
|||
doc.body.appendChild(div);
|
||||
let swap = document.getAnonymousElementByAttribute(chats.selectedChat, "anonid", "swap");
|
||||
swap.click();
|
||||
port.close();
|
||||
break;
|
||||
case "got-chatbox-message":
|
||||
ok(true, "got chatbox message");
|
||||
|
@ -73,13 +74,16 @@ var tests = {
|
|||
.getInterface(Components.interfaces.nsIDOMWindow);
|
||||
Services.wm.removeListener(this);
|
||||
// wait for load to ensure the window is ready for us to test
|
||||
domwindow.addEventListener("load", function _load() {
|
||||
domwindow.addEventListener("load", function _load(event) {
|
||||
let doc = domwindow.document;
|
||||
if (doc.location.href != "chrome://browser/content/chatWindow.xul")
|
||||
return;
|
||||
if (event.target != doc)
|
||||
return;
|
||||
|
||||
domwindow.removeEventListener("load", _load, false);
|
||||
|
||||
domwindow.addEventListener("unload", function _close() {
|
||||
domwindow.addEventListener("unload", function _close(event) {
|
||||
if (event.target != doc)
|
||||
return;
|
||||
domwindow.removeEventListener("unload", _close, false);
|
||||
info("window has been closed");
|
||||
waitForCondition(function() {
|
||||
|
@ -160,13 +164,15 @@ var tests = {
|
|||
Services.wm.removeListener(this);
|
||||
// wait for load to ensure the window is ready for us to test, make sure
|
||||
// we're not getting called for about:blank
|
||||
domwindow.addEventListener("load", function _load() {
|
||||
domwindow.addEventListener("load", function _load(event) {
|
||||
let doc = domwindow.document;
|
||||
if (doc.location.href != "chrome://browser/content/chatWindow.xul")
|
||||
return;
|
||||
if (event.target != doc)
|
||||
return;
|
||||
domwindow.removeEventListener("load", _load, false);
|
||||
|
||||
domwindow.addEventListener("unload", function _close() {
|
||||
domwindow.addEventListener("unload", function _close(event) {
|
||||
if (event.target != doc)
|
||||
return;
|
||||
domwindow.removeEventListener("unload", _close, false);
|
||||
ok(true, "window has been closed");
|
||||
next();
|
||||
|
@ -184,6 +190,7 @@ var tests = {
|
|||
},function() {
|
||||
// logout, we should get unload next
|
||||
port.postMessage({topic: "test-logout"});
|
||||
port.close();
|
||||
}, domwindow);
|
||||
|
||||
}, false);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* 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/. */
|
||||
|
||||
pref("startup.homepage_override_url","https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/whatsnew/?oldversion=%OLD_VERSION%");
|
||||
pref("startup.homepage_override_url","");
|
||||
pref("startup.homepage_welcome_url","https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/firstrun/");
|
||||
// Interval: Time between checks for a new version (in seconds)
|
||||
pref("app.update.interval", 43200); // 12 hours
|
||||
|
|
|
@ -1175,7 +1175,7 @@ var Scratchpad = {
|
|||
*/
|
||||
openErrorConsole: function SP_openErrorConsole()
|
||||
{
|
||||
this.browserWindow.HUDConsoleUI.toggleBrowserConsole();
|
||||
this.browserWindow.HUDService.toggleBrowserConsole();
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -38,6 +38,7 @@ MOCHITEST_BROWSER_FILES = \
|
|||
browser_scratchpad_bug_644413_modeline.js \
|
||||
browser_scratchpad_bug807924_cannot_convert_to_string.js \
|
||||
browser_scratchpad_long_string.js \
|
||||
browser_scratchpad_open_error_console.js \
|
||||
head.js \
|
||||
|
||||
# Disable test due to bug 807234 becoming basically permanent
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
/* vim: set ts=2 et sw=2 tw=80: */
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function test()
|
||||
{
|
||||
waitForExplicitFinish();
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
gBrowser.selectedBrowser.addEventListener("load", function onLoad() {
|
||||
gBrowser.selectedBrowser.removeEventListener("load", onLoad, true);
|
||||
openScratchpad(runTests);
|
||||
}, true);
|
||||
|
||||
content.location = "data:text/html;charset=utf8,test Scratchpad." +
|
||||
"openErrorConsole()";
|
||||
}
|
||||
|
||||
function runTests()
|
||||
{
|
||||
Services.obs.addObserver(function observer(aSubject) {
|
||||
Services.obs.removeObserver(observer, "web-console-created");
|
||||
aSubject.QueryInterface(Ci.nsISupportsString);
|
||||
|
||||
let hud = HUDService.getBrowserConsole();
|
||||
ok(hud, "browser console is open");
|
||||
is(aSubject.data, hud.hudId, "notification hudId is correct");
|
||||
|
||||
HUDService.toggleBrowserConsole().then(finish);
|
||||
}, "web-console-created", false);
|
||||
|
||||
let hud = HUDService.getBrowserConsole();
|
||||
ok(!hud, "browser console is not open");
|
||||
info("wait for the browser console to open from Scratchpad");
|
||||
|
||||
gScratchpadWindow.Scratchpad.openErrorConsole();
|
||||
}
|
|
@ -463,21 +463,26 @@
|
|||
|
||||
// clear explicit width and columns before calculating from avail. height again
|
||||
let gridStyle = this._grid.style;
|
||||
gridStyle.removeProperty('min-width');
|
||||
gridStyle.removeProperty('-moz-column-count');
|
||||
gridStyle.removeProperty("min-width");
|
||||
gridStyle.removeProperty("-moz-column-count");
|
||||
|
||||
// We favor overflowing horizontally, not vertically (rows then colums)
|
||||
// rows attribute = max rows
|
||||
let maxRowCount = Math.min(this.getAttribute("rows") || Infinity, Math.floor(containerDims.height / itemDims.height));
|
||||
this._rowCount = Math.min(this.itemCount, maxRowCount);
|
||||
if (this.hasAttribute("vertical")) {
|
||||
this._columnCount = Math.floor(containerDims.width / itemDims.width) || 1;
|
||||
this._rowCount = Math.floor(this.itemCount / this._columnCount);
|
||||
} else {
|
||||
// We favor overflowing horizontally, not vertically (rows then colums)
|
||||
// rows attribute = max rows
|
||||
let maxRowCount = Math.min(this.getAttribute("rows") || Infinity, Math.floor(containerDims.height / itemDims.height));
|
||||
this._rowCount = Math.min(this.itemCount, maxRowCount);
|
||||
|
||||
// columns attribute = min cols
|
||||
this._columnCount = this.itemCount ?
|
||||
Math.max(
|
||||
// at least 1 column when there are items
|
||||
this.getAttribute("columns") || 1,
|
||||
Math.ceil(this.itemCount / this._rowCount)
|
||||
) : this.getAttribute("columns") || 0;
|
||||
// columns attribute = min cols
|
||||
this._columnCount = this.itemCount ?
|
||||
Math.max(
|
||||
// at least 1 column when there are items
|
||||
this.getAttribute("columns") || 1,
|
||||
Math.ceil(this.itemCount / this._rowCount)
|
||||
) : this.getAttribute("columns") || 0;
|
||||
}
|
||||
|
||||
// width is typically auto, cap max columns by truncating items collection
|
||||
// or, setting max-width style property with overflow hidden
|
||||
|
|
|
@ -323,10 +323,6 @@ let BookmarksStartView = {
|
|||
this._view.destruct();
|
||||
}
|
||||
},
|
||||
|
||||
show: function show() {
|
||||
this._grid.arrangeItems();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -302,10 +302,6 @@ let HistoryStartView = {
|
|||
_view: null,
|
||||
get _grid() { return document.getElementById("start-history-grid"); },
|
||||
|
||||
show: function show() {
|
||||
this._grid.arrangeItems();
|
||||
},
|
||||
|
||||
init: function init() {
|
||||
this._view = new HistoryView(this._grid, StartUI.maxResultsPerSection, true);
|
||||
this._view.populateGrid();
|
||||
|
|
|
@ -98,6 +98,7 @@ RemoteTabsView.prototype = Util.extend(Object.create(View.prototype), {
|
|||
}, this);
|
||||
}
|
||||
this.setUIAccessVisible(show);
|
||||
this._set.arrangeItems();
|
||||
},
|
||||
|
||||
destruct: function destruct() {
|
||||
|
@ -127,8 +128,4 @@ let RemoteTabsStartView = {
|
|||
this._view.destruct();
|
||||
}
|
||||
},
|
||||
|
||||
show: function show() {
|
||||
this._grid.arrangeItems();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
// When setting the max-height of the start tab contents, this is the buffer we subtract
|
||||
// for the nav bar plus white space above it.
|
||||
const kBottomContentMargin = 50;
|
||||
|
||||
var StartUI = {
|
||||
get startUI() { return document.getElementById("start-container"); },
|
||||
|
||||
|
@ -30,7 +26,6 @@ var StartUI = {
|
|||
document.getElementById("bcast_preciseInput").setAttribute("input",
|
||||
this.chromeWin.InputSourceHelper.isPrecise ? "precise" : "imprecise");
|
||||
|
||||
this._updateStartHeight();
|
||||
this._adjustDOMforViewState();
|
||||
|
||||
TopSitesStartView.init();
|
||||
|
@ -38,12 +33,6 @@ var StartUI = {
|
|||
HistoryStartView.init();
|
||||
RemoteTabsStartView.init();
|
||||
|
||||
TopSitesStartView.show();
|
||||
BookmarksStartView.show();
|
||||
HistoryStartView.show();
|
||||
RemoteTabsStartView.show();
|
||||
|
||||
this.chromeWin.document.getElementById("browsers").addEventListener("SizeChanged", this, true);
|
||||
this.chromeWin.addEventListener("MozPrecisePointer", this, true);
|
||||
this.chromeWin.addEventListener("MozImprecisePointer", this, true);
|
||||
Services.obs.addObserver(this, "metro_viewstate_changed", false);
|
||||
|
@ -60,7 +49,6 @@ var StartUI = {
|
|||
RemoteTabsStartView.uninit();
|
||||
|
||||
if (this.chromeWin) {
|
||||
this.chromeWin.document.getElementById("browsers").removeEventListener("SizeChanged", this, true);
|
||||
this.chromeWin.removeEventListener("MozPrecisePointer", this, true);
|
||||
this.chromeWin.removeEventListener("MozImprecisePointer", this, true);
|
||||
}
|
||||
|
@ -108,7 +96,8 @@ var StartUI = {
|
|||
this.onClick(aEvent);
|
||||
break;
|
||||
case "MozMousePixelScroll":
|
||||
if (this.startUI.getAttribute("viewstate") == "snapped") {
|
||||
let viewstate = this.startUI.getAttribute("viewstate");
|
||||
if (viewstate === "snapped" || viewstate === "portrait") {
|
||||
window.scrollBy(0, aEvent.detail);
|
||||
} else {
|
||||
window.scrollBy(aEvent.detail, 0);
|
||||
|
@ -117,17 +106,9 @@ var StartUI = {
|
|||
aEvent.preventDefault();
|
||||
aEvent.stopPropagation();
|
||||
break;
|
||||
case "SizeChanged":
|
||||
this._updateStartHeight();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
_updateStartHeight: function () {
|
||||
document.getElementById("start-container").style.maxHeight =
|
||||
(this.chromeWin.ContentAreaObserver.contentHeight - kBottomContentMargin) + "px";
|
||||
},
|
||||
|
||||
_adjustDOMforViewState: function() {
|
||||
if (this.chromeWin.MetroUtils.immersive) {
|
||||
let currViewState = "";
|
||||
|
|
|
@ -311,8 +311,4 @@ let TopSitesStartView = {
|
|||
this._view.destruct();
|
||||
}
|
||||
},
|
||||
|
||||
show: function show() {
|
||||
this._grid.arrangeItems();
|
||||
}
|
||||
};
|
||||
|
|
|
@ -29,9 +29,18 @@ function View() {
|
|||
View.prototype = {
|
||||
_adjustDOMforViewState: function _adjustDOMforViewState(aState) {
|
||||
if (this._set) {
|
||||
if (undefined == aState)
|
||||
aState = this._set.getAttribute("viewstate");
|
||||
if (undefined == aState)
|
||||
aState = this._set.getAttribute("viewstate");
|
||||
|
||||
this._set.setAttribute("suppressonselect", (aState == "snapped"));
|
||||
|
||||
if (aState == "portrait") {
|
||||
this._set.setAttribute("vertical", true);
|
||||
} else {
|
||||
this._set.removeAttribute("vertical");
|
||||
}
|
||||
|
||||
this._set.arrangeItems();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -190,15 +190,19 @@ documenttab[selected] .documenttab-selection {
|
|||
#startui-page {
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#startui-body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#start-container {
|
||||
display: -moz-box;
|
||||
min-width: @grid_double_column_width@;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#start-topsites {
|
||||
|
@ -210,7 +214,8 @@ documenttab[selected] .documenttab-selection {
|
|||
padding-bottom: @toolbar_height@;
|
||||
}
|
||||
|
||||
#start-container[viewstate="snapped"] {
|
||||
#start-container[viewstate="snapped"],
|
||||
#start-container[viewstate="portrait"] {
|
||||
-moz-box-orient: vertical;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
|
||||
%define tile_border_color #dbdcde
|
||||
%define tile_spacing 12px
|
||||
%define tile_side_margin 6px
|
||||
|
||||
%define scroller_thickness 4px
|
||||
%define scroller_minimum 8px
|
||||
|
|
|
@ -624,6 +624,7 @@ arrowbox {
|
|||
}
|
||||
|
||||
.meta-section-title {
|
||||
margin: @metro_spacing_normal@ @tile_side_margin@;
|
||||
font-size: @metro_font_large@;
|
||||
font-weight: 100;
|
||||
cursor: default;
|
||||
|
|
|
@ -68,7 +68,7 @@ richgriditem {
|
|||
background-origin: padding-box;
|
||||
/* content positioning within the grid "cell"
|
||||
gives us the gutters/spacing between tiles */
|
||||
top: 2px; right: 6px; bottom: 10px; left: 6px;
|
||||
top: 2px; right: @tile_side_margin@; bottom: 10px; left: @tile_side_margin@;
|
||||
border: @metro_border_thin@ solid @tile_border_color@;
|
||||
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
|
||||
transition: 150ms transform ease-out;
|
||||
|
|
|
@ -1616,6 +1616,7 @@ window[tabsontop="false"] richlistitem[type~="action"][actiontype="switchtab"][s
|
|||
#go-button,
|
||||
#urlbar-go-button {
|
||||
-moz-image-region: rect(0, 84px, 28px, 56px);
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
#go-button:hover:active,
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "jsapi.h"
|
||||
#include "jsdbgapi.h"
|
||||
#include "nsIXPCSecurityManager.h"
|
||||
#include "nsInterfaceHashtable.h"
|
||||
#include "nsHashtable.h"
|
||||
|
@ -23,6 +21,10 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace JS {
|
||||
template <typename T> class Handle;
|
||||
template <typename T> class MutableHandle;
|
||||
}
|
||||
class nsIDocShell;
|
||||
class nsString;
|
||||
class nsIClassInfo;
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
#include "domstubs.idl"
|
||||
|
||||
%{C++
|
||||
#include "jsapi.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
namespace indexedDB {
|
||||
|
|
|
@ -16,11 +16,6 @@ interface nsIGlobalObject;
|
|||
interface nsIInputStream;
|
||||
interface nsIDOMBlob;
|
||||
|
||||
%{C++
|
||||
// for jsval
|
||||
#include "jsapi.h"
|
||||
%}
|
||||
|
||||
[scriptable, builtinclass, uuid(ac97e161-9f1d-4163-adc9-e9a59e18682c)]
|
||||
interface nsIXMLHttpRequestEventTarget : nsIDOMEventTarget {
|
||||
// event handler attributes
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
// Need this for BinaryType.
|
||||
#include "mozilla/dom/WebSocketBinding.h"
|
||||
|
||||
#include "jsfriendapi.h"
|
||||
#include "nsISupportsUtils.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsString.h"
|
||||
|
|
|
@ -927,7 +927,8 @@ nsContentUtils::ParseSandboxAttributeToFlags(const nsAString& aSandboxAttrValue)
|
|||
SANDBOXED_FORMS |
|
||||
SANDBOXED_SCRIPTS |
|
||||
SANDBOXED_AUTOMATIC_FEATURES |
|
||||
SANDBOXED_POINTER_LOCK;
|
||||
SANDBOXED_POINTER_LOCK |
|
||||
SANDBOXED_DOMAIN;
|
||||
|
||||
if (!aSandboxAttrValue.IsEmpty()) {
|
||||
// The separator optional flag is used because the HTML5 spec says any
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "nsThreadUtils.h"
|
||||
#include "nsWeakPtr.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "js/RootingAPI.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -135,7 +136,7 @@ class MOZ_STACK_CLASS SameProcessCpowHolder : public CpowHolder
|
|||
bool ToObject(JSContext* aCx, JSObject** aObjp);
|
||||
|
||||
private:
|
||||
JS::RootedObject mObj;
|
||||
JS::Rooted<JSObject*> mObj;
|
||||
};
|
||||
|
||||
class nsFrameMessageManager MOZ_FINAL : public nsIContentFrameMessageManager,
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "nsIScriptObjectPrincipal.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIClassInfo.h"
|
||||
#include "jsapi.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsCOMArray.h"
|
||||
|
|
|
@ -60,4 +60,9 @@ const unsigned long SANDBOXED_AUTOMATIC_FEATURES = 0x40;
|
|||
* This flag blocks the document from acquiring pointerlock.
|
||||
*/
|
||||
const unsigned long SANDBOXED_POINTER_LOCK = 0x80;
|
||||
|
||||
/**
|
||||
* This flag blocks the document from changing document.domain.
|
||||
*/
|
||||
const unsigned long SANDBOXED_DOMAIN = 0x100;
|
||||
#endif
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "nsIDocument.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "jsapi.h"
|
||||
#include "nsIChannelEventSink.h"
|
||||
#include "nsIAsyncVerifyRedirectCallback.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
|
|
|
@ -664,6 +664,8 @@ MOCHITEST_FILES_C= \
|
|||
file_CSP_bug802872.html^headers^ \
|
||||
file_CSP_bug802872.js \
|
||||
file_CSP_bug802872.sjs \
|
||||
test_bug907892.html \
|
||||
file_bug907892.html \
|
||||
$(NULL)
|
||||
|
||||
# OOP tests don't work on Windows (bug 763081) or native-fennec
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<script>
|
||||
var threw;
|
||||
try {
|
||||
document.domain = "example.org";
|
||||
threw = false;
|
||||
} catch (e) {
|
||||
threw = true;
|
||||
}
|
||||
var sandboxed = (location.search == "?sandboxed");
|
||||
parent.postMessage({ threw: threw, sandboxed: sandboxed }, "*");
|
||||
</script>
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=907892
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 907892</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 907892 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var expectedMessages = 2;
|
||||
window.onmessage = function (ev) {
|
||||
if (ev.data.sandboxed) {
|
||||
ok(ev.data.threw,
|
||||
"Should have thrown when setting document.domain in sandboxed iframe");
|
||||
} else {
|
||||
ok(!ev.data.threw,
|
||||
"Should not have thrown when setting document.domain in iframe");
|
||||
}
|
||||
|
||||
--expectedMessages;
|
||||
if (expectedMessages == 0) {
|
||||
SimpleTest.finish();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=907892">Mozilla Bug 907892</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
<!-- Set all the sandbox flags to "allow" to make sure we cover that case -->
|
||||
<iframe
|
||||
sandbox="allow-same-origin allow-scripts allow-forms allow-top-navigation alllow-pointer-lock"
|
||||
src="http://test1.example.org/tests/content/base/test/file_bug907892.html?sandboxed">
|
||||
</iframe>
|
||||
<iframe
|
||||
src="http://test1.example.org/tests/content/base/test/file_bug907892.html?normal">
|
||||
</iframe>
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -16,8 +16,6 @@
|
|||
#include "nsTraceRefcnt.h"
|
||||
#include "xpcpublic.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
|
|
|
@ -9,7 +9,12 @@
|
|||
#include "WebGLTypes.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsString.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
struct JSContext;
|
||||
class JSObject;
|
||||
namespace JS {
|
||||
template <typename T> class Handle;
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
@ -87,6 +87,7 @@ MOCHITEST_FILES = \
|
|||
test_mozDashOffset.html \
|
||||
file_drawImage_document_domain.html \
|
||||
test_windingRuleUndefined.html \
|
||||
test_strokeText_throw.html \
|
||||
$(NULL)
|
||||
|
||||
# SkiaGL on Android/Gonk does not implement these composite ops yet
|
||||
|
|
|
@ -0,0 +1,68 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=728629
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 728629</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 728629 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
function test() {
|
||||
var c = document.createElement('canvas');
|
||||
document.body.appendChild(c);
|
||||
try {
|
||||
c.getContext("2d").strokeText("Hello",NaN,50);
|
||||
ok(true, "strokeText should not throw with NaN.");
|
||||
} catch (e) {
|
||||
ok(false, "strokeText should not throw with NaN.");
|
||||
}
|
||||
try {
|
||||
c.getContext("2d").strokeText("Hello",Infinity,50);
|
||||
ok(true, "strokeText should not throw with Infinity.");
|
||||
} catch (e) {
|
||||
ok(false, "strokeText should not throw with Infinity.");
|
||||
}
|
||||
try {
|
||||
c.getContext("2d").strokeText("Hello",undefined,50);
|
||||
ok(true, "strokeText should not throw with undefined.");
|
||||
} catch (e) {
|
||||
ok(false, "strokeText should not throw with undefined.");
|
||||
}
|
||||
try {
|
||||
c.getContext("2d").fillText("Hello",NaN,50);
|
||||
ok(true, "fillText should not throw with NaN.");
|
||||
} catch (e) {
|
||||
ok(false, "fillText should not throw with NaN.");
|
||||
}
|
||||
try {
|
||||
c.getContext("2d").fillText("Hello",Infinity,50);
|
||||
ok(true, "fillText should not throw with Infinity.");
|
||||
} catch (e) {
|
||||
ok(false, "fillText should not throw with Infinity.");
|
||||
}
|
||||
try {
|
||||
c.getContext("2d").fillText("Hello",undefined,50);
|
||||
ok(true, "fillText should not throw with undefined.");
|
||||
} catch (e) {
|
||||
ok(false, "fillText should not throw with undefined.");
|
||||
}
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="test();">
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=728629">Mozilla Bug 728629</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -9,7 +9,6 @@
|
|||
#include "nsIDOMMessageEvent.h"
|
||||
#include "nsDOMEvent.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "jsapi.h"
|
||||
#include "mozilla/dom/MessageEventBinding.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#ifndef nsEventListenerManager_h__
|
||||
#define nsEventListenerManager_h__
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "mozilla/dom/EventListenerBinding.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/Link.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "nsIDOMHTMLAnchorElement.h"
|
||||
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#include "nsIHTMLCollection.h"
|
||||
#include "nsHashKeys.h"
|
||||
#include "nsRefPtrHashtable.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
class nsGenericHTMLElement;
|
||||
class nsIDocument;
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "nsString.h"
|
||||
#include "nsWrapperCache.h"
|
||||
#include "nsGenericHTMLElement.h"
|
||||
#include "jsfriendapi.h"
|
||||
|
||||
namespace mozilla {
|
||||
class ErrorResult;
|
||||
|
|
|
@ -1006,6 +1006,12 @@ nsHTMLDocument::SetDomain(const nsAString& aDomain)
|
|||
void
|
||||
nsHTMLDocument::SetDomain(const nsAString& aDomain, ErrorResult& rv)
|
||||
{
|
||||
if (mSandboxFlags & SANDBOXED_DOMAIN) {
|
||||
// We're sandboxed; disallow setting domain
|
||||
rv.Throw(NS_ERROR_DOM_SECURITY_ERR);
|
||||
return;
|
||||
}
|
||||
|
||||
if (aDomain.IsEmpty()) {
|
||||
rv.Throw(NS_ERROR_DOM_BAD_DOCUMENT_DOMAIN);
|
||||
return;
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#include "nsIDOMHTMLDocument.h"
|
||||
#include "nsIDOMHTMLCollection.h"
|
||||
#include "nsIScriptElement.h"
|
||||
#include "jsapi.h"
|
||||
#include "nsTArray.h"
|
||||
|
||||
#include "pldhash.h"
|
||||
|
|
|
@ -366,6 +366,11 @@ MediaPluginReader::ImageBufferCallback::operator()(size_t aWidth, size_t aHeight
|
|||
rgbImage = mozilla::layers::CreateSharedRGBImage(mImageContainer,
|
||||
nsIntSize(aWidth, aHeight),
|
||||
gfxASurface::ImageFormatRGB16_565);
|
||||
if (!rgbImage) {
|
||||
NS_WARNING("Could not create rgb image");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mImage = rgbImage;
|
||||
return rgbImage->AsSharedImage()->GetBuffer();
|
||||
case MPAPI::YCbCr:
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "nsTArray.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
class nsXBLPrototypeBinding;
|
||||
class nsIContent;
|
||||
|
|
|
@ -453,8 +453,15 @@ nsXBLContentSink::OnOpenContainer(const PRUnichar **aAtts,
|
|||
NS_ASSERTION(mBinding, "Must have binding here");
|
||||
|
||||
mSecondaryState = eXBL_InConstructor;
|
||||
nsAutoString name;
|
||||
if (!mCurrentBindingID.IsEmpty()) {
|
||||
name.Assign(mCurrentBindingID);
|
||||
name.AppendLiteral("_XBL_Constructor");
|
||||
} else {
|
||||
name.AppendLiteral("XBL_Constructor");
|
||||
}
|
||||
nsXBLProtoImplAnonymousMethod* newMethod =
|
||||
new nsXBLProtoImplAnonymousMethod();
|
||||
new nsXBLProtoImplAnonymousMethod(name.get());
|
||||
if (newMethod) {
|
||||
newMethod->SetLineNumber(aLineNumber);
|
||||
mBinding->SetConstructor(newMethod);
|
||||
|
@ -466,8 +473,15 @@ nsXBLContentSink::OnOpenContainer(const PRUnichar **aAtts,
|
|||
mSecondaryState == eXBL_None);
|
||||
NS_ASSERTION(mBinding, "Must have binding here");
|
||||
mSecondaryState = eXBL_InDestructor;
|
||||
nsAutoString name;
|
||||
if (!mCurrentBindingID.IsEmpty()) {
|
||||
name.Assign(mCurrentBindingID);
|
||||
name.AppendLiteral("_XBL_Destructor");
|
||||
} else {
|
||||
name.AppendLiteral("XBL_Destructor");
|
||||
}
|
||||
nsXBLProtoImplAnonymousMethod* newMethod =
|
||||
new nsXBLProtoImplAnonymousMethod();
|
||||
new nsXBLProtoImplAnonymousMethod(name.get());
|
||||
if (newMethod) {
|
||||
newMethod->SetLineNumber(aLineNumber);
|
||||
mBinding->SetDestructor(newMethod);
|
||||
|
@ -529,9 +543,8 @@ nsresult
|
|||
nsXBLContentSink::ConstructBinding(uint32_t aLineNumber)
|
||||
{
|
||||
nsCOMPtr<nsIContent> binding = GetCurrentContent();
|
||||
nsAutoString id;
|
||||
binding->GetAttr(kNameSpaceID_None, nsGkAtoms::id, id);
|
||||
NS_ConvertUTF16toUTF8 cid(id);
|
||||
binding->GetAttr(kNameSpaceID_None, nsGkAtoms::id, mCurrentBindingID);
|
||||
NS_ConvertUTF16toUTF8 cid(mCurrentBindingID);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
|
|
|
@ -135,6 +135,8 @@ protected:
|
|||
bool mIsChromeOrResource; // For bug #45989
|
||||
bool mFoundFirstBinding;
|
||||
|
||||
nsString mCurrentBindingID;
|
||||
|
||||
nsXBLPrototypeBinding* mBinding;
|
||||
nsXBLPrototypeHandler* mHandler; // current handler, owned by its PrototypeBinding
|
||||
nsXBLProtoImpl* mImplementation;
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
#ifndef nsXBLMaybeCompiled_h__
|
||||
#define nsXBLMaybeCompiled_h__
|
||||
|
||||
#include "js/RootingAPI.h"
|
||||
|
||||
/*
|
||||
* A union containing either a pointer representing uncompiled source or a
|
||||
* JSObject* representing the compiled result. The class is templated on the
|
||||
|
|
|
@ -397,7 +397,11 @@ nsXBLProtoImpl::Read(nsIObjectInputStream* aStream,
|
|||
}
|
||||
case XBLBinding_Serialize_Constructor:
|
||||
{
|
||||
mConstructor = new nsXBLProtoImplAnonymousMethod();
|
||||
nsAutoString name;
|
||||
rv = aStream->ReadString(name);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mConstructor = new nsXBLProtoImplAnonymousMethod(name.get());
|
||||
rv = mConstructor->Read(aStream);
|
||||
if (NS_FAILED(rv)) {
|
||||
delete mConstructor;
|
||||
|
@ -410,7 +414,11 @@ nsXBLProtoImpl::Read(nsIObjectInputStream* aStream,
|
|||
}
|
||||
case XBLBinding_Serialize_Destructor:
|
||||
{
|
||||
mDestructor = new nsXBLProtoImplAnonymousMethod();
|
||||
nsAutoString name;
|
||||
rv = aStream->ReadString(name);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
mDestructor = new nsXBLProtoImplAnonymousMethod(name.get());
|
||||
rv = mDestructor->Read(aStream);
|
||||
if (NS_FAILED(rv)) {
|
||||
delete mDestructor;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "nsIAtom.h"
|
||||
#include "nsString.h"
|
||||
#include "jsapi.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsContentUtils.h" // For NS_CONTENT_DELETE_LIST_MEMBER.
|
||||
|
|
|
@ -372,6 +372,9 @@ nsXBLProtoImplAnonymousMethod::Write(nsIObjectOutputStream* aStream,
|
|||
nsresult rv = aStream->Write8(aType);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = aStream->WriteWStringZ(mName);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Calling fromMarkedLocation() is safe because mMethod is traced by the
|
||||
// Trace() method above, and because its value is never changed after it has
|
||||
// been set to a compiled method.
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsString.h"
|
||||
#include "jsapi.h"
|
||||
#include "nsString.h"
|
||||
#include "nsXBLMaybeCompiled.h"
|
||||
#include "nsXBLProtoImplMember.h"
|
||||
|
@ -131,8 +130,8 @@ protected:
|
|||
|
||||
class nsXBLProtoImplAnonymousMethod : public nsXBLProtoImplMethod {
|
||||
public:
|
||||
nsXBLProtoImplAnonymousMethod() :
|
||||
nsXBLProtoImplMethod(EmptyString().get())
|
||||
nsXBLProtoImplAnonymousMethod(const PRUnichar* aName) :
|
||||
nsXBLProtoImplMethod(aName)
|
||||
{}
|
||||
|
||||
nsresult Execute(nsIContent* aBoundElement);
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "nsIAtom.h"
|
||||
#include "nsString.h"
|
||||
#include "jsapi.h"
|
||||
#include "nsString.h"
|
||||
#include "nsXBLSerialize.h"
|
||||
#include "nsXBLMaybeCompiled.h"
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
|
||||
#include "js/RootingAPI.h"
|
||||
|
||||
class JSObject;
|
||||
class nsIDOMEvent;
|
||||
class nsIContent;
|
||||
|
@ -28,6 +26,10 @@ class nsIObjectInputStream;
|
|||
class nsIObjectOutputStream;
|
||||
class nsXBLPrototypeBinding;
|
||||
|
||||
namespace JS {
|
||||
template <typename T> class MutableHandle;
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
class EventTarget;
|
||||
|
|
|
@ -6,17 +6,20 @@
|
|||
#ifndef nsXBLSerialize_h__
|
||||
#define nsXBLSerialize_h__
|
||||
|
||||
#include "jsapi.h"
|
||||
|
||||
#include "nsIObjectInputStream.h"
|
||||
#include "nsIObjectOutputStream.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
|
||||
namespace JS {
|
||||
template <typename T> class Handle;
|
||||
template <typename T> class MutableHandle;
|
||||
}
|
||||
|
||||
typedef uint8_t XBLBindingSerializeDetails;
|
||||
|
||||
// A version number to ensure we don't load cached data in a different
|
||||
// file format.
|
||||
#define XBLBinding_Serialize_Version 0x00000001
|
||||
#define XBLBinding_Serialize_Version 0x00000002
|
||||
|
||||
// Set for the first binding in a document
|
||||
#define XBLBinding_Serialize_IsFirstBinding 1
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "nsAutoPtr.h"
|
||||
#include "nsStyledElement.h"
|
||||
#include "nsIFrameLoader.h"
|
||||
#include "jspubtd.h"
|
||||
#include "nsFrameLoader.h"
|
||||
|
||||
class nsIDocument;
|
||||
|
|
|
@ -17,11 +17,8 @@
|
|||
#include "nsIInputStream.h"
|
||||
#include "nsIStorageStream.h"
|
||||
|
||||
#include "jspubtd.h"
|
||||
|
||||
#include "mozilla/scache/StartupCache.h"
|
||||
|
||||
|
||||
class nsCSSStyleSheet;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9552,9 +9552,20 @@ nsDocShell::DoURILoad(nsIURI * aURI,
|
|||
if (mLoadType == LOAD_RELOAD_ALLOW_MIXED_CONTENT) {
|
||||
rv = SetMixedContentChannel(channel);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
} else {
|
||||
rv = SetMixedContentChannel(nullptr);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
} else if (mMixedContentChannel) {
|
||||
/*
|
||||
* If the user "Disables Protection on This Page", we call
|
||||
* SetMixedContentChannel for the first time, otherwise
|
||||
* mMixedContentChannel is still null.
|
||||
* Later, if the new channel passes a same orign check, we remember the
|
||||
* users decision by calling SetMixedContentChannel using the new channel.
|
||||
* This way, the user does not have to click the disable protection button
|
||||
* over and over for browsing the same site.
|
||||
*/
|
||||
rv = nsContentUtils::CheckSameOrigin(mMixedContentChannel, channel);
|
||||
if (NS_FAILED(rv) || NS_FAILED(SetMixedContentChannel(channel))) {
|
||||
SetMixedContentChannel(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
//hack
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#ifndef StructuredCloneTags_h__
|
||||
#define StructuredCloneTags_h__
|
||||
|
||||
#include "jsapi.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#ifndef mozilla_dom_WindowNamedPropertiesHandler_h
|
||||
#define mozilla_dom_WindowNamedPropertiesHandler_h
|
||||
|
||||
#include "jsproxy.h"
|
||||
#include "mozilla/dom/DOMJSProxyHandler.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -266,7 +266,7 @@ public:
|
|||
NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
|
||||
JSObject *globalObj, JSObject **parentObj) MOZ_OVERRIDE;
|
||||
NS_IMETHOD AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
JSObject *obj, jsid id, JS::Value *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
|
||||
virtual void PreserveWrapper(nsISupports *aNative) MOZ_OVERRIDE;
|
||||
|
||||
|
@ -355,12 +355,12 @@ protected:
|
|||
public:
|
||||
NS_IMETHOD CheckAccess(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, uint32_t mode,
|
||||
jsval *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
JS::Value *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
|
||||
JSObject *globalObj, JSObject **parentObj) MOZ_OVERRIDE;
|
||||
NS_IMETHODIMP AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, jsval *vp, bool *_retval);
|
||||
JSObject *obj, jsid id, JS::Value *vp, bool *_retval);
|
||||
|
||||
static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
|
||||
{
|
||||
|
@ -419,7 +419,7 @@ protected:
|
|||
|
||||
public:
|
||||
NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
JSObject *obj, jsid id, JS::Value *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Not implemented, nothing should create an instance of this class.
|
||||
|
@ -443,7 +443,7 @@ public:
|
|||
static bool DocumentAllNewResolve(JSContext *cx, JS::Handle<JSObject*> obj, JS::Handle<jsid> id,
|
||||
unsigned flags, JS::MutableHandle<JSObject*> objp);
|
||||
static void ReleaseDocument(JSFreeOp *fop, JSObject *obj);
|
||||
static bool CallToGetPropMapper(JSContext *cx, unsigned argc, jsval *vp);
|
||||
static bool CallToGetPropMapper(JSContext *cx, unsigned argc, JS::Value *vp);
|
||||
};
|
||||
|
||||
|
||||
|
@ -465,7 +465,7 @@ protected:
|
|||
|
||||
public:
|
||||
NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
JSObject *obj, jsid id, JS::Value *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
};
|
||||
|
||||
|
||||
|
@ -489,7 +489,7 @@ public:
|
|||
NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx,
|
||||
JSObject *globalObj, JSObject **parentObj) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
JSObject *obj, jsid id, JS::Value *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
|
||||
static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
|
||||
{
|
||||
|
@ -611,13 +611,13 @@ protected:
|
|||
JSObject *obj, jsid id, uint32_t flags,
|
||||
JSObject **objp, bool *_retval) MOZ_OVERRIDE;
|
||||
NS_IMETHOD SetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
JSObject *obj, jsid id, JS::Value *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
NS_IMETHOD GetProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, jsval *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
JSObject *obj, jsid id, JS::Value *vp, bool *_retval) MOZ_OVERRIDE;
|
||||
NS_IMETHOD DelProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid id, bool *_retval) MOZ_OVERRIDE;
|
||||
NS_IMETHOD NewEnumerate(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, uint32_t enum_op, jsval *statep,
|
||||
JSObject *obj, uint32_t enum_op, JS::Value *statep,
|
||||
jsid *idp, bool *_retval) MOZ_OVERRIDE;
|
||||
|
||||
public:
|
||||
|
@ -676,7 +676,7 @@ public:
|
|||
JSObject *obj, const JS::CallArgs &args, bool *_retval) MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, const jsval &val, bool *bp,
|
||||
JSObject *obj, const JS::Value &val, bool *bp,
|
||||
bool *_retval);
|
||||
|
||||
static nsIClassInfo *doCreate(nsDOMClassInfoData* aData)
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#ifndef nsDOMJSUtils_h__
|
||||
#define nsDOMJSUtils_h__
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "nsIScriptContext.h"
|
||||
|
||||
class nsIJSArgArray;
|
||||
|
|
|
@ -184,6 +184,7 @@
|
|||
#endif
|
||||
#include "prlog.h"
|
||||
#include "prenv.h"
|
||||
#include "prprf.h"
|
||||
|
||||
#include "mozilla/dom/indexedDB/IDBFactory.h"
|
||||
#include "mozilla/dom/quota/QuotaManager.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#define nsIJSEventListener_h__
|
||||
|
||||
#include "nsIScriptContext.h"
|
||||
#include "jsapi.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "nsIDOMEventListener.h"
|
||||
#include "nsIAtom.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#define nsIJSNativeInitializer_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
#define NS_IJSNATIVEINITIALIZER_IID \
|
||||
{ 0xdb48eee5, 0x89a4, 0x4f18, \
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#include "nsISupports.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIProgrammingLanguage.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "jspubtd.h"
|
||||
#include "js/GCAPI.h"
|
||||
|
||||
|
|
|
@ -698,6 +698,7 @@ static const char js_baselinejit_eager_str[] = JS_OPTIONS_DOT_STR "baselinejit.
|
|||
static const char js_ion_content_str[] = JS_OPTIONS_DOT_STR "ion.content";
|
||||
static const char js_ion_chrome_str[] = JS_OPTIONS_DOT_STR "ion.chrome";
|
||||
static const char js_ion_eager_str[] = JS_OPTIONS_DOT_STR "ion.unsafe_eager_compilation";
|
||||
static const char js_parallel_parsing_str[] = JS_OPTIONS_DOT_STR "parallel_parsing";
|
||||
static const char js_ion_parallel_compilation_str[] = JS_OPTIONS_DOT_STR "ion.parallel_compilation";
|
||||
|
||||
int
|
||||
|
@ -739,6 +740,7 @@ nsJSContext::JSOptionChangedCallback(const char *pref, void *data)
|
|||
js_ion_content_str);
|
||||
bool useIonEager = Preferences::GetBool(js_ion_eager_str);
|
||||
bool useAsmJS = Preferences::GetBool(js_asmjs_content_str);
|
||||
bool parallelParsing = Preferences::GetBool(js_parallel_parsing_str);
|
||||
bool parallelIonCompilation = Preferences::GetBool(js_ion_parallel_compilation_str);
|
||||
nsCOMPtr<nsIXULRuntime> xr = do_GetService(XULRUNTIME_SERVICE_CONTRACTID);
|
||||
if (xr) {
|
||||
|
@ -793,7 +795,8 @@ nsJSContext::JSOptionChangedCallback(const char *pref, void *data)
|
|||
|
||||
::JS_SetOptions(context->mContext, newDefaultJSOptions & JSOPTION_MASK);
|
||||
|
||||
::JS_SetParallelCompilationEnabled(context->mContext, parallelIonCompilation);
|
||||
::JS_SetParallelParsingEnabled(context->mContext, parallelParsing);
|
||||
::JS_SetParallelIonCompilationEnabled(context->mContext, parallelIonCompilation);
|
||||
|
||||
::JS_SetGlobalCompilerOption(context->mContext, JSCOMPILER_BASELINE_USECOUNT_TRIGGER,
|
||||
(useBaselineJITEager ? 0 : -1));
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "jsapi.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "prtime.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
|
|
|
@ -174,6 +174,13 @@ nsScriptNameSpaceManager::AddToHash(PLDHashTable *aTable, const nsAString *aKey,
|
|||
return &entry->mGlobalName;
|
||||
}
|
||||
|
||||
void
|
||||
nsScriptNameSpaceManager::RemoveFromHash(PLDHashTable *aTable,
|
||||
const nsAString *aKey)
|
||||
{
|
||||
PL_DHashTableOperate(aTable, aKey, PL_DHASH_REMOVE);
|
||||
}
|
||||
|
||||
nsGlobalNameStruct*
|
||||
nsScriptNameSpaceManager::GetConstructorProto(const nsGlobalNameStruct* aStruct)
|
||||
{
|
||||
|
@ -392,6 +399,7 @@ nsScriptNameSpaceManager::Init()
|
|||
|
||||
if (serv) {
|
||||
serv->AddObserver(this, NS_XPCOM_CATEGORY_ENTRY_ADDED_OBSERVER_ID, true);
|
||||
serv->AddObserver(this, NS_XPCOM_CATEGORY_ENTRY_REMOVED_OBSERVER_ID, true);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -615,10 +623,12 @@ nsScriptNameSpaceManager::RegisterDOMCIData(const char *aName,
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsScriptNameSpaceManager::AddCategoryEntryToHash(nsICategoryManager* aCategoryManager,
|
||||
const char* aCategory,
|
||||
nsISupports* aEntry)
|
||||
nsScriptNameSpaceManager::OperateCategoryEntryHash(nsICategoryManager* aCategoryManager,
|
||||
const char* aCategory,
|
||||
nsISupports* aEntry,
|
||||
bool aRemove)
|
||||
{
|
||||
MOZ_ASSERT(aCategoryManager);
|
||||
// Get the type from the category name.
|
||||
// NOTE: we could have passed the type in FillHash() and guessed it in
|
||||
// Observe() but this way, we have only one place to update and this is
|
||||
|
@ -650,6 +660,31 @@ nsScriptNameSpaceManager::AddCategoryEntryToHash(nsICategoryManager* aCategoryMa
|
|||
nsresult rv = strWrapper->GetData(categoryEntry);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
PLDHashTable *table;
|
||||
if (type == nsGlobalNameStruct::eTypeNavigatorProperty) {
|
||||
table = &mNavigatorNames;
|
||||
} else {
|
||||
table = &mGlobalNames;
|
||||
}
|
||||
|
||||
// We need to handle removal before calling GetCategoryEntry
|
||||
// because the category entry is already removed before we are
|
||||
// notified.
|
||||
if (aRemove) {
|
||||
NS_ConvertASCIItoUTF16 entry(categoryEntry);
|
||||
const nsGlobalNameStruct *s =
|
||||
type == nsGlobalNameStruct::eTypeNavigatorProperty ?
|
||||
LookupNavigatorName(entry) : LookupNameInternal(entry);
|
||||
// Verify mType so that this API doesn't remove names
|
||||
// registered by others.
|
||||
if (!s || s->mType != type) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
RemoveFromHash(table, &entry);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsXPIDLCString contractId;
|
||||
rv = aCategoryManager->GetCategoryEntry(aCategory, categoryEntry.get(),
|
||||
getter_Copies(contractId));
|
||||
|
@ -709,13 +744,6 @@ nsScriptNameSpaceManager::AddCategoryEntryToHash(nsICategoryManager* aCategoryMa
|
|||
}
|
||||
}
|
||||
|
||||
PLDHashTable *table;
|
||||
if (type == nsGlobalNameStruct::eTypeNavigatorProperty) {
|
||||
table = &mNavigatorNames;
|
||||
} else {
|
||||
table = &mGlobalNames;
|
||||
}
|
||||
|
||||
nsGlobalNameStruct *s = AddToHash(table, categoryEntry.get());
|
||||
NS_ENSURE_TRUE(s, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
|
@ -732,6 +760,24 @@ nsScriptNameSpaceManager::AddCategoryEntryToHash(nsICategoryManager* aCategoryMa
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsScriptNameSpaceManager::AddCategoryEntryToHash(nsICategoryManager* aCategoryManager,
|
||||
const char* aCategory,
|
||||
nsISupports* aEntry)
|
||||
{
|
||||
return OperateCategoryEntryHash(aCategoryManager, aCategory, aEntry,
|
||||
/* aRemove = */ false);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsScriptNameSpaceManager::RemoveCategoryEntryFromHash(nsICategoryManager* aCategoryManager,
|
||||
const char* aCategory,
|
||||
nsISupports* aEntry)
|
||||
{
|
||||
return OperateCategoryEntryHash(aCategoryManager, aCategory, aEntry,
|
||||
/* aRemove = */ true);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsScriptNameSpaceManager::Observe(nsISupports* aSubject, const char* aTopic,
|
||||
const PRUnichar* aData)
|
||||
|
@ -740,7 +786,7 @@ nsScriptNameSpaceManager::Observe(nsISupports* aSubject, const char* aTopic,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
if (strcmp(aTopic, NS_XPCOM_CATEGORY_ENTRY_ADDED_OBSERVER_ID) == 0) {
|
||||
if (!strcmp(aTopic, NS_XPCOM_CATEGORY_ENTRY_ADDED_OBSERVER_ID)) {
|
||||
nsCOMPtr<nsICategoryManager> cm =
|
||||
do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
|
||||
if (!cm) {
|
||||
|
@ -749,11 +795,19 @@ nsScriptNameSpaceManager::Observe(nsISupports* aSubject, const char* aTopic,
|
|||
|
||||
return AddCategoryEntryToHash(cm, NS_ConvertUTF16toUTF8(aData).get(),
|
||||
aSubject);
|
||||
} else if (!strcmp(aTopic, NS_XPCOM_CATEGORY_ENTRY_REMOVED_OBSERVER_ID)) {
|
||||
nsCOMPtr<nsICategoryManager> cm =
|
||||
do_GetService(NS_CATEGORYMANAGER_CONTRACTID);
|
||||
if (!cm) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return RemoveCategoryEntryFromHash(cm, NS_ConvertUTF16toUTF8(aData).get(),
|
||||
aSubject);
|
||||
}
|
||||
|
||||
// TODO: we could observe NS_XPCOM_CATEGORY_ENTRY_REMOVED_OBSERVER_ID
|
||||
// and NS_XPCOM_CATEGORY_CLEARED_OBSERVER_ID but we are safe without it.
|
||||
// See bug 600460.
|
||||
// TODO: we could observe NS_XPCOM_CATEGORY_CLEARED_OBSERVER_ID
|
||||
// but we are safe without it. See bug 600460.
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -177,6 +177,8 @@ private:
|
|||
NS_ConvertASCIItoUTF16 key(aKey);
|
||||
return AddToHash(aTable, &key, aClassName);
|
||||
}
|
||||
// Removes an existing entry from the hash.
|
||||
void RemoveFromHash(PLDHashTable *aTable, const nsAString *aKey);
|
||||
|
||||
nsresult FillHash(nsICategoryManager *aCategoryManager,
|
||||
const char *aCategory);
|
||||
|
@ -197,6 +199,24 @@ private:
|
|||
const char* aCategory,
|
||||
nsISupports* aEntry);
|
||||
|
||||
/**
|
||||
* Remove an existing category entry from the hash table.
|
||||
* Only some categories can be removed (see the beginning of the definition).
|
||||
* The other ones will be ignored.
|
||||
*
|
||||
* @aCategory Category where the entry will be removed from.
|
||||
* @aEntry The entry that should be removed.
|
||||
*/
|
||||
nsresult RemoveCategoryEntryFromHash(nsICategoryManager* aCategoryManager,
|
||||
const char* aCategory,
|
||||
nsISupports* aEntry);
|
||||
|
||||
// common helper for AddCategoryEntryToHash and RemoveCategoryEntryFromHash
|
||||
nsresult OperateCategoryEntryHash(nsICategoryManager* aCategoryManager,
|
||||
const char* aCategory,
|
||||
nsISupports* aEntry,
|
||||
bool aRemove);
|
||||
|
||||
nsGlobalNameStruct* LookupNameInternal(const nsAString& aName,
|
||||
const PRUnichar **aClassName = nullptr);
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "nsIXPConnect.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
#include "mozilla/Base64.h"
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#define nsStructuredCloneContainer_h__
|
||||
|
||||
#include "nsIStructuredCloneContainer.h"
|
||||
#include "jsapi.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
#define NS_STRUCTUREDCLONECONTAINER_CONTRACTID \
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "js/Value.h"
|
||||
#include "js/Value.h" // must come before js/RootingAPI.h
|
||||
#include "js/RootingAPI.h"
|
||||
|
||||
struct JSTracer;
|
||||
class JSObject;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "nsWrapperCache.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
inline JSObject*
|
||||
nsWrapperCache::GetWrapper() const
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
#define mozilla_dom_BindingDeclarations_h__
|
||||
|
||||
#include "nsStringGlue.h"
|
||||
#include "jsapi.h"
|
||||
#include "js/Value.h"
|
||||
#include "js/RootingAPI.h"
|
||||
#include "mozilla/Util.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsDOMString.h"
|
||||
|
@ -22,6 +23,8 @@
|
|||
#include "nsTArray.h"
|
||||
#include "nsAutoPtr.h" // for nsRefPtr member variables
|
||||
|
||||
struct JSContext;
|
||||
class JSObject;
|
||||
class nsWrapperCache;
|
||||
|
||||
// nsGlobalWindow implements nsWrapperCache, but doesn't always use it. Don't
|
||||
|
@ -72,7 +75,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
JS::RootedObject mGlobalJSObject;
|
||||
JS::Rooted<JSObject*> mGlobalJSObject;
|
||||
nsISupports* mGlobalObject;
|
||||
nsCOMPtr<nsISupports> mGlobalObjectRef;
|
||||
};
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "XPCQuickStubs.h"
|
||||
#include "XrayWrapper.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "prprf.h"
|
||||
|
||||
#include "mozilla/dom/HTMLObjectElement.h"
|
||||
#include "mozilla/dom/HTMLObjectElementBinding.h"
|
||||
|
|
|
@ -20,9 +20,10 @@
|
|||
# interfaces.
|
||||
# * headerFile - The file in which the nativeType is declared (defaults
|
||||
# to an educated guess).
|
||||
# * concrete - Indicates whether there exist objects with this interface as
|
||||
# their primary interface. Always False for callback interfaces.
|
||||
# defaults to True otherwise.
|
||||
# * concrete - Indicates whether there exist JS objects with this interface as
|
||||
# their primary interface (and hence whose prototype is this
|
||||
# interface's prototype object). Always False for callback
|
||||
# interfaces. Defaults to True otherwise.
|
||||
# * workers - Indicates whether the descriptor is intended to be used for
|
||||
# worker threads (defaults to false).
|
||||
# * customTrace - The native class will use a custom trace hook (defaults to
|
||||
|
@ -1236,6 +1237,7 @@ DOMInterfaces = {
|
|||
{
|
||||
'implicitJSContext': [ 'createObjectURL', 'revokeObjectURL' ],
|
||||
'workers': True,
|
||||
'concrete': False,
|
||||
}],
|
||||
|
||||
'WebGLActiveInfo': {
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "nsISupports.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "jsapi.h"
|
||||
#include "jswrapper.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
|
@ -31,7 +30,6 @@
|
|||
#include "nsJSEnvironment.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "nsLayoutStatics.h"
|
||||
#include "js/RootingAPI.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -5980,12 +5980,12 @@ def getUnionTypeTemplateVars(unionType, type, descriptorProvider, isReturnValue=
|
|||
else:
|
||||
name = type.name
|
||||
|
||||
tryNextCode = """tryNext = true;
|
||||
return true;"""
|
||||
tryNextCode = ("tryNext = true;\n"
|
||||
"return true;")
|
||||
if type.isGeckoInterface():
|
||||
tryNextCode = ("""if (mUnion.mType != mUnion.eUninitialized) {
|
||||
mUnion.Destroy%s();
|
||||
}""" % name) + tryNextCode
|
||||
tryNextCode = ("if (mUnion.mType != mUnion.eUninitialized) {"
|
||||
" mUnion.Destroy%s();"
|
||||
"}" % name) + tryNextCode
|
||||
conversionInfo = getJSToNativeConversionInfo(
|
||||
type, descriptorProvider, failureCode=tryNextCode,
|
||||
isDefinitelyObject=True, isInUnionReturnValue=isReturnValue,
|
||||
|
@ -5999,11 +5999,14 @@ return true;"""
|
|||
externalType = getUnionAccessorSignatureType(type, descriptorProvider).define()
|
||||
|
||||
if type.isObject():
|
||||
setter = CGGeneric("void SetToObject(JSContext* cx, JSObject* obj)\n"
|
||||
"{\n"
|
||||
" mUnion.mValue.mObject.SetValue(cx, obj);\n"
|
||||
" mUnion.mType = mUnion.eObject;\n"
|
||||
"}")
|
||||
body = ("mUnion.mValue.mObject.SetValue(cx, obj);\n"
|
||||
"mUnion.mType = mUnion.eObject;")
|
||||
setter = ClassMethod("SetToObject", "void",
|
||||
[Argument("JSContext*", "cx"),
|
||||
Argument("JSObject*", "obj")],
|
||||
inline=True, bodyInHeader=True,
|
||||
body=body)
|
||||
|
||||
else:
|
||||
jsConversion = string.Template(conversionInfo.template).substitute(
|
||||
{
|
||||
|
@ -6014,20 +6017,22 @@ return true;"""
|
|||
}
|
||||
)
|
||||
jsConversion = CGWrapper(CGGeneric(jsConversion),
|
||||
pre="tryNext = false;\n",
|
||||
post="\n"
|
||||
"return true;")
|
||||
setter = CGWrapper(CGIndenter(jsConversion),
|
||||
pre="bool TrySetTo" + name + "(JSContext* cx, JS::Handle<JS::Value> value, JS::MutableHandle<JS::Value> pvalue, bool& tryNext)\n"
|
||||
"{\n"
|
||||
" tryNext = false;\n",
|
||||
post="\n"
|
||||
"}")
|
||||
setter = ClassMethod("TrySetTo" + name, "bool",
|
||||
[Argument("JSContext*", "cx"),
|
||||
Argument("JS::Handle<JS::Value>", "value"),
|
||||
Argument("JS::MutableHandle<JS::Value>", "pvalue"),
|
||||
Argument("bool&", "tryNext")],
|
||||
inline=True, bodyInHeader=True,
|
||||
body=jsConversion.define())
|
||||
|
||||
return {
|
||||
"name": name,
|
||||
"structType": structType,
|
||||
"externalType": externalType,
|
||||
"setter": CGIndenter(setter).define(),
|
||||
"setter": setter,
|
||||
"holderType": conversionInfo.holderType.define() if conversionInfo.holderType else None
|
||||
}
|
||||
|
||||
|
@ -6164,51 +6169,45 @@ class CGUnionConversionStruct(CGThing):
|
|||
self.descriptorProvider = descriptorProvider
|
||||
|
||||
def declare(self):
|
||||
setters = []
|
||||
|
||||
structName = str(self.type)
|
||||
members = [ClassMember("mUnion", structName + "&",
|
||||
body="const_cast<%s&>(aUnion)" % structName)]
|
||||
# Argument needs to be a const ref because that's all Maybe<> allows
|
||||
ctor = ClassConstructor([Argument("const %s&" % structName, "aUnion")],
|
||||
bodyInHeader=True,
|
||||
visibility="public",
|
||||
explicit=True)
|
||||
methods = []
|
||||
|
||||
if self.type.hasNullableType:
|
||||
setters.append(""" bool SetNull()
|
||||
{
|
||||
mUnion.mType = mUnion.eNull;
|
||||
return true;
|
||||
}""")
|
||||
methods.append(ClassMethod("SetNull", "bool", [],
|
||||
body=("mUnion.mType = mUnion.eNull;\n"
|
||||
"return true;"),
|
||||
inline=True, bodyInHeader=True))
|
||||
|
||||
templateVars = map(lambda t: getUnionTypeTemplateVars(self.type, t, self.descriptorProvider),
|
||||
self.type.flatMemberTypes)
|
||||
structName = self.type.__str__()
|
||||
for t in self.type.flatMemberTypes:
|
||||
vars = getUnionTypeTemplateVars(self.type,
|
||||
t, self.descriptorProvider)
|
||||
methods.append(vars["setter"])
|
||||
if vars["name"] != "Object":
|
||||
body=string.Template("mUnion.mType = mUnion.e${name};\n"
|
||||
"return mUnion.mValue.m${name}.SetValue();").substitute(vars)
|
||||
methods.append(ClassMethod("SetAs" + vars["name"],
|
||||
vars["structType"] + "&",
|
||||
[],
|
||||
bodyInHeader=True,
|
||||
body=body,
|
||||
visibility="private"))
|
||||
if vars["holderType"] is not None:
|
||||
members.append(ClassMember("m%sHolder" % vars["name"],
|
||||
vars["holderType"]))
|
||||
|
||||
setters.extend(mapTemplate("${setter}", templateVars))
|
||||
# Don't generate a SetAsObject, since we don't use it
|
||||
private = "\n".join(mapTemplate(""" ${structType}& SetAs${name}()
|
||||
{
|
||||
mUnion.mType = mUnion.e${name};
|
||||
return mUnion.mValue.m${name}.SetValue();
|
||||
}""",
|
||||
filter(lambda v: v["name"] != "Object",
|
||||
templateVars)))
|
||||
private += "\n\n"
|
||||
holders = filter(lambda v: v["holderType"] is not None, templateVars)
|
||||
if len(holders) > 0:
|
||||
private += "\n".join(mapTemplate(" ${holderType} m${name}Holder;", holders))
|
||||
private += "\n\n"
|
||||
private += " " + structName + "& mUnion;"
|
||||
return string.Template("""
|
||||
class ${structName}Argument {
|
||||
public:
|
||||
// Argument needs to be a const ref because that's all Maybe<> allows
|
||||
${structName}Argument(const ${structName}& aUnion) : mUnion(const_cast<${structName}&>(aUnion))
|
||||
{
|
||||
}
|
||||
|
||||
${setters}
|
||||
|
||||
private:
|
||||
${private}
|
||||
};
|
||||
""").substitute({"structName": structName,
|
||||
"setters": "\n\n".join(setters),
|
||||
"private": private
|
||||
})
|
||||
return CGClass(structName + "Argument",
|
||||
members=members,
|
||||
constructors=[ctor],
|
||||
methods=methods,
|
||||
disallowCopyConstruction=True).declare()
|
||||
|
||||
def define(self):
|
||||
return """
|
||||
|
@ -7519,7 +7518,9 @@ if (expando) {
|
|||
}
|
||||
|
||||
if (hasProp) {
|
||||
return JS_GetPropertyById(cx, expando, id, vp);
|
||||
// Forward the get to the expando object, but our receiver is whatever our
|
||||
// receiver is.
|
||||
return JS_ForwardGetPropertyTo(cx, expando, id, receiver, vp);
|
||||
}
|
||||
}"""
|
||||
|
||||
|
|
|
@ -480,11 +480,14 @@ class Descriptor(DescriptorProvider):
|
|||
def needsHeaderInclude(self):
|
||||
"""
|
||||
An interface doesn't need a header file if it is not concrete,
|
||||
not pref-controlled, and has only consts.
|
||||
not pref-controlled, has no prototype object, and has no
|
||||
static methods or attributes.
|
||||
"""
|
||||
return (self.interface.isExternal() or self.concrete or
|
||||
self.interface.getExtendedAttribute("PrefControlled") or
|
||||
self.interface.hasInterfacePrototypeObject())
|
||||
self.interface.hasInterfacePrototypeObject() or
|
||||
any((m.isAttr() or m.isMethod()) and m.isStatic() for m
|
||||
in self.interface.members))
|
||||
|
||||
def wantsQI(self):
|
||||
# If it was specified explicitly use that.
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#ifndef mozilla_dom_DOMJSClass_h
|
||||
#define mozilla_dom_DOMJSClass_h
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/Likely.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "jsproxy.h"
|
||||
#include "xpcpublic.h"
|
||||
#include "nsStringGlue.h"
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#define mozilla_dom_TypedArray_h
|
||||
|
||||
#include "jsfriendapi.h"
|
||||
#include "js/RootingAPI.h"
|
||||
#include "jsapi.h"
|
||||
#include "mozilla/dom/BindingDeclarations.h"
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ MOCHITEST_FILES := \
|
|||
test_ByteString.html \
|
||||
test_exception_messages.html \
|
||||
test_bug707564.html \
|
||||
test_bug907548.html \
|
||||
$(NULL)
|
||||
|
||||
MOCHITEST_CHROME_FILES = \
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=907548
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 907548</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 907548 **/
|
||||
ok(!URL.prototype,
|
||||
"URL.prototype should be undefined unless the URL API is implemented");
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=907548">Mozilla Bug 907548</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -5,7 +5,6 @@
|
|||
#ifndef DOM_CAMERA_ICAMERACONTROL_H
|
||||
#define DOM_CAMERA_ICAMERACONTROL_H
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIDOMCameraManager.h"
|
||||
#include "DictionaryHelpers.h"
|
||||
|
|
|
@ -5,11 +5,6 @@
|
|||
|
||||
#include "nsIDOMHTMLElement.idl"
|
||||
|
||||
%{C++
|
||||
// for jsval
|
||||
#include "jsapi.h"
|
||||
%}
|
||||
|
||||
/**
|
||||
* The nsIDOMHTMLCanvasElement interface is the interface to a HTML
|
||||
* <canvas> element.
|
||||
|
|
|
@ -9,9 +9,13 @@ interface nsIInputStream;
|
|||
interface nsIOutputStream;
|
||||
interface nsIScriptGlobalObject;
|
||||
|
||||
[ptr] native JSValPtr(jsval);
|
||||
[ptr] native JSValPtr(JS::Value);
|
||||
[ptr] native JSContext(JSContext);
|
||||
|
||||
%{C++
|
||||
namespace JS { class Value; }
|
||||
%}
|
||||
|
||||
/**
|
||||
* Don't use this! Use JSON.parse and JSON.stringify directly.
|
||||
*/
|
||||
|
|
|
@ -7,11 +7,12 @@
|
|||
#ifndef mozilla_dom_StructuredCloneUtils_h
|
||||
#define mozilla_dom_StructuredCloneUtils_h
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsIDOMFile.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
struct SerializedStructuredCloneBuffer;
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "nsIDOMEventListener.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIWindowProvider.h"
|
||||
#include "jsapi.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
#include "base/basictypes.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "mozilla/dom/ContentParent.h"
|
||||
#include "mozilla/dom/PBrowserParent.h"
|
||||
#include "mozilla/dom/PContentDialogParent.h"
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
#include "nsIDOMMozMmsMessage.h"
|
||||
#include "nsString.h"
|
||||
#include "jspubtd.h"
|
||||
#include "mozilla/dom/mobilemessage/Types.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "DictionaryHelpers.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "mozilla/dom/mobilemessage/SmsTypes.h"
|
||||
#include "nsIDOMMozMobileMessageThread.h"
|
||||
#include "nsString.h"
|
||||
#include "jspubtd.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "mozilla/dom/mobilemessage/SmsTypes.h"
|
||||
#include "nsIDOMMozSmsMessage.h"
|
||||
#include "nsString.h"
|
||||
#include "jspubtd.h"
|
||||
#include "mozilla/dom/mobilemessage/Types.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#define nsJSNPRuntime_h_
|
||||
|
||||
#include "nscore.h"
|
||||
#include "jsapi.h"
|
||||
#include "npapi.h"
|
||||
#include "npruntime.h"
|
||||
#include "pldhash.h"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include "npfunctions.h"
|
||||
#include "nsPluginHost.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "nsCxPusher.h"
|
||||
|
||||
#include "mozilla/PluginLibrary.h"
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче