Merge m-c to inbound

This commit is contained in:
Ms2ger 2013-08-22 10:38:48 +02:00
commit 4af9d89266
166 changed files with 458 additions and 216 deletions

View File

@ -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 \

View File

@ -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() {

View File

@ -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;
}

View File

@ -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";

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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;

View File

@ -6,8 +6,6 @@
#include "domstubs.idl"
%{C++
#include "jsapi.h"
namespace mozilla {
namespace dom {
namespace indexedDB {

View File

@ -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

View File

@ -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"

View File

@ -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,

View File

@ -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"

View File

@ -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"

View File

@ -16,8 +16,6 @@
#include "nsTraceRefcnt.h"
#include "xpcpublic.h"
#include "jsapi.h"
namespace mozilla {
namespace dom {

View File

@ -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 {

View File

@ -9,7 +9,6 @@
#include "nsIDOMMessageEvent.h"
#include "nsDOMEvent.h"
#include "nsCycleCollectionParticipant.h"
#include "jsapi.h"
#include "mozilla/dom/MessageEventBinding.h"
/**

View File

@ -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"

View File

@ -19,7 +19,6 @@
#include "nsIHTMLCollection.h"
#include "nsHashKeys.h"
#include "nsRefPtrHashtable.h"
#include "jsapi.h"
class nsGenericHTMLElement;
class nsIDocument;

View File

@ -13,7 +13,6 @@
#include "nsString.h"
#include "nsWrapperCache.h"
#include "nsGenericHTMLElement.h"
#include "jsfriendapi.h"
namespace mozilla {
class ErrorResult;

View File

@ -12,7 +12,6 @@
#include "nsIDOMHTMLDocument.h"
#include "nsIDOMHTMLCollection.h"
#include "nsIScriptElement.h"
#include "jsapi.h"
#include "nsTArray.h"
#include "pldhash.h"

View File

@ -15,7 +15,6 @@
#include "nsTArray.h"
#include "nsCycleCollectionParticipant.h"
#include "nsISupportsImpl.h"
#include "jsapi.h"
class nsXBLPrototypeBinding;
class nsIContent;

View File

@ -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

View File

@ -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.

View File

@ -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"

View File

@ -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"

View File

@ -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;

View File

@ -6,12 +6,15 @@
#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

View File

@ -34,7 +34,6 @@
#include "nsAutoPtr.h"
#include "nsStyledElement.h"
#include "nsIFrameLoader.h"
#include "jspubtd.h"
#include "nsFrameLoader.h"
class nsIDocument;

View File

@ -17,11 +17,8 @@
#include "nsIInputStream.h"
#include "nsIStorageStream.h"
#include "jspubtd.h"
#include "mozilla/scache/StartupCache.h"
class nsCSSStyleSheet;
/**

View File

@ -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

View File

@ -5,8 +5,6 @@
#ifndef StructuredCloneTags_h__
#define StructuredCloneTags_h__
#include "jsapi.h"
namespace mozilla {
namespace dom {

View File

@ -7,7 +7,6 @@
#ifndef mozilla_dom_WindowNamedPropertiesHandler_h
#define mozilla_dom_WindowNamedPropertiesHandler_h
#include "jsproxy.h"
#include "mozilla/dom/DOMJSProxyHandler.h"
namespace mozilla {

View File

@ -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)

View File

@ -6,7 +6,6 @@
#ifndef nsDOMJSUtils_h__
#define nsDOMJSUtils_h__
#include "jsapi.h"
#include "nsIScriptContext.h"
class nsIJSArgArray;

View File

@ -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"

View File

@ -7,7 +7,6 @@
#define nsIJSEventListener_h__
#include "nsIScriptContext.h"
#include "jsapi.h"
#include "xpcpublic.h"
#include "nsIDOMEventListener.h"
#include "nsIAtom.h"

View File

@ -7,7 +7,6 @@
#define nsIJSNativeInitializer_h__
#include "nsISupports.h"
#include "jsapi.h"
#define NS_IJSNATIVEINITIALIZER_IID \
{ 0xdb48eee5, 0x89a4, 0x4f18, \

View File

@ -11,7 +11,6 @@
#include "nsISupports.h"
#include "nsCOMPtr.h"
#include "nsIProgrammingLanguage.h"
#include "jsfriendapi.h"
#include "jspubtd.h"
#include "js/GCAPI.h"

View File

@ -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"

View File

@ -13,6 +13,7 @@
#include "nsIXPConnect.h"
#include "nsServiceManagerUtils.h"
#include "nsContentUtils.h"
#include "jsapi.h"
#include "mozilla/Base64.h"

View File

@ -9,7 +9,6 @@
#define nsStructuredCloneContainer_h__
#include "nsIStructuredCloneContainer.h"
#include "jsapi.h"
#include "mozilla/Attributes.h"
#define NS_STRUCTUREDCLONECONTAINER_CONTRACTID \

View File

@ -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;

View File

@ -8,7 +8,6 @@
#include "nsWrapperCache.h"
#include "xpcpublic.h"
#include "jsapi.h"
inline JSObject*
nsWrapperCache::GetWrapper() const

View File

@ -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;
};

View File

@ -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"

View File

@ -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 {

View File

@ -6,7 +6,6 @@
#ifndef mozilla_dom_DOMJSClass_h
#define mozilla_dom_DOMJSClass_h
#include "jsapi.h"
#include "jsfriendapi.h"
#include "mozilla/Assertions.h"

View File

@ -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"

View File

@ -8,7 +8,6 @@
#define mozilla_dom_TypedArray_h
#include "jsfriendapi.h"
#include "js/RootingAPI.h"
#include "jsapi.h"
#include "mozilla/dom/BindingDeclarations.h"

View File

@ -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"

View File

@ -5,11 +5,6 @@
#include "nsIDOMHTMLElement.idl"
%{C++
// for jsval
#include "jsapi.h"
%}
/**
* The nsIDOMHTMLCanvasElement interface is the interface to a HTML
* <canvas> element.

View File

@ -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.
*/

View File

@ -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;

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -10,7 +10,6 @@
#include "mozilla/dom/mobilemessage/SmsTypes.h"
#include "nsIDOMMozMobileMessageThread.h"
#include "nsString.h"
#include "jspubtd.h"
namespace mozilla {
namespace dom {

View File

@ -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"

View File

@ -7,7 +7,6 @@
#define nsJSNPRuntime_h_
#include "nscore.h"
#include "jsapi.h"
#include "npapi.h"
#include "npruntime.h"
#include "pldhash.h"

View File

@ -10,7 +10,6 @@
#include "npfunctions.h"
#include "nsPluginHost.h"
#include "jsapi.h"
#include "nsCxPusher.h"
#include "mozilla/PluginLibrary.h"

View File

@ -9,7 +9,6 @@
#include "mozilla/plugins/PPluginScriptableObjectParent.h"
#include "jsapi.h"
#include "npfunctions.h"
#include "npruntime.h"

View File

@ -11,7 +11,6 @@
#include "nsIDOMKeyEvent.h"
#include "nsIJSEventListener.h"
#include "nsIDOMEventListener.h"
#include "jsapi.h"
#include "nsCOMPtr.h"
#include "nsIAtom.h"
#include "nsIScriptContext.h"

View File

@ -6,7 +6,6 @@
#ifndef nsJSON_h__
#define nsJSON_h__
#include "jsapi.h"
#include "nsIJSON.h"
#include "nsString.h"
#include "nsCOMPtr.h"

View File

@ -5,7 +5,6 @@
#ifndef mozilla_osfileconstants_h__
#define mozilla_osfileconstants_h__
#include "jspubtd.h"
#include "nsIOSFileConstantsService.h"
#include "mozilla/Attributes.h"

View File

@ -9,8 +9,6 @@
#include "Workers.h"
#include "jspubtd.h"
// DOMException Codes.
#define INDEX_SIZE_ERR 1
#define DOMSTRING_SIZE_ERR 2

View File

@ -9,8 +9,6 @@
#include "Workers.h"
#include "jspubtd.h"
class nsIDOMFile;
class nsIDOMBlob;

View File

@ -10,8 +10,6 @@
#include "DOMBindingBase.h"
#include "WorkerPrivate.h"
#include "jspubtd.h"
BEGIN_WORKERS_NAMESPACE
class WorkerLocation MOZ_FINAL : public DOMBindingBase

View File

@ -8,8 +8,6 @@
#include "Workers.h"
#include "jspubtd.h"
BEGIN_WORKERS_NAMESPACE
JSPrincipals*

View File

@ -11,7 +11,6 @@
#include "nsIObserver.h"
#include "jsapi.h"
#include "mozilla/Attributes.h"
#include "mozilla/Mutex.h"
#include "mozilla/TimeStamp.h"

View File

@ -8,8 +8,6 @@
#include "Workers.h"
#include "jsapi.h"
class nsIPrincipal;
class nsIURI;
class nsIDocument;

View File

@ -8,7 +8,6 @@
#include "Workers.h"
#include "jspubtd.h"
#include "mozilla/dom/DOMJSClass.h"
BEGIN_WORKERS_NAMESPACE

View File

@ -15,7 +15,6 @@
#include "nsIThreadInternal.h"
#include "nsPIDOMWindow.h"
#include "jsapi.h"
#include "mozilla/Assertions.h"
#include "mozilla/CondVar.h"
#include "mozilla/Mutex.h"

View File

@ -11,7 +11,6 @@
{0xa21bfa01, 0xf349, 0x4394, {0xa8, 0x4c, 0x8d, 0xe5, 0xcf, 0x7, 0x37, 0xd0}}
#include "nsCOMPtr.h"
#include "jspubtd.h"
#include "mozilla/Mutex.h"
#include "nsIWindowCreator.h" // for stupid compilers
#include "nsIWindowWatcher.h"

View File

@ -8,7 +8,6 @@
#include <stdint.h> // for uint32_t, uint8_t, uint64_t
#include <sys/types.h> // for int32_t
#include "GeckoProfilerFunc.h" // for TimeStamp
#include "ImageTypes.h" // for ImageFormat, etc
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxPoint.h" // for gfxIntSize

View File

@ -9,7 +9,6 @@
#include <algorithm> // for max, min
#include "AnimationCommon.h" // for ComputedTimingFunction
#include "CompositableHost.h" // for CompositableHost
#include "GeckoProfilerFunc.h" // for TimeStamp, TimeDuration
#include "ImageContainer.h" // for ImageContainer, etc
#include "ImageLayers.h" // for ImageLayer
#include "LayerSorter.h" // for SortLayersBy3DZOrder

View File

@ -8,7 +8,7 @@
#include <algorithm> // for max
#include "BasicImplData.h" // for BasicImplData
#include "BasicLayersImpl.h" // for ToData
#include "GeckoProfilerImpl.h" // for PROFILER_LABEL
#include "GeckoProfiler.h" // for PROFILER_LABEL
#include "Layers.h" // for ThebesLayer, Layer, etc
#include "gfxColor.h" // for gfxRGBA
#include "gfxContext.h" // for gfxContext, etc

View File

@ -8,7 +8,7 @@
#include <sys/types.h> // for int32_t
#include "BasicContainerLayer.h" // for BasicContainerLayer
#include "BasicLayersImpl.h" // for ToData, BasicReadbackLayer, etc
#include "GeckoProfilerImpl.h" // for PROFILER_LABEL
#include "GeckoProfiler.h" // for PROFILER_LABEL
#include "ImageContainer.h" // for ImageFactory
#include "Layers.h" // for Layer, ContainerLayer, etc
#include "ReadbackLayer.h" // for ReadbackLayer

View File

@ -6,7 +6,7 @@
#include "ClientCanvasLayer.h"
#include "GLContext.h" // for GLContext
#include "GLScreenBuffer.h" // for GLScreenBuffer
#include "GeckoProfilerImpl.h" // for PROFILER_LABEL
#include "GeckoProfiler.h" // for PROFILER_LABEL
#include "SharedSurfaceEGL.h" // for SurfaceFactory_EGLImage
#include "SharedSurfaceGL.h" // for SurfaceFactory_GLTexture, etc
#include "SurfaceStream.h" // for SurfaceStream, etc

View File

@ -5,7 +5,7 @@
#include "ClientLayerManager.h"
#include "CompositorChild.h" // for CompositorChild
#include "GeckoProfilerImpl.h" // for PROFILER_LABEL
#include "GeckoProfiler.h" // for PROFILER_LABEL
#include "gfx3DMatrix.h" // for gfx3DMatrix
#include "gfxASurface.h" // for gfxASurface, etc
#include "ipc/AutoOpenSurface.h" // for AutoOpenSurface

View File

@ -6,7 +6,7 @@
#include "ClientThebesLayer.h"
#include "ClientTiledThebesLayer.h" // for ClientTiledThebesLayer
#include <stdint.h> // for uint32_t
#include "GeckoProfilerImpl.h" // for PROFILER_LABEL
#include "GeckoProfiler.h" // for PROFILER_LABEL
#include "client/ClientLayerManager.h" // for ClientLayerManager, etc
#include "gfxASurface.h" // for gfxASurface, etc
#include "gfxContext.h" // for gfxContext

View File

@ -6,7 +6,7 @@
#include "mozilla/layers/TiledContentClient.h"
#include <math.h> // for ceil, ceilf, floor
#include "ClientTiledThebesLayer.h" // for ClientTiledThebesLayer
#include "GeckoProfilerImpl.h" // for PROFILER_LABEL
#include "GeckoProfiler.h" // for PROFILER_LABEL
#include "ClientLayerManager.h" // for ClientLayerManager
#include "gfxContext.h" // for gfxContext, etc
#include "gfxPlatform.h" // for gfxPlatform

View File

@ -6,7 +6,6 @@
#ifndef GFX_ASYNCCOMPOSITIONMANAGER_H
#define GFX_ASYNCCOMPOSITIONMANAGER_H
#include "GeckoProfilerFunc.h" // for TimeStamp
#include "Units.h" // for LayerPoint, etc
#include "mozilla/layers/LayerManagerComposite.h" // for LayerManagerComposite
#include "gfx3DMatrix.h" // for gfx3DMatrix

View File

@ -12,7 +12,7 @@
#include "CompositableHost.h" // for CompositableHost
#include "ContainerLayerComposite.h" // for ContainerLayerComposite, etc
#include "FrameMetrics.h" // for FrameMetrics
#include "GeckoProfilerImpl.h" // for profiler_set_frame_number, etc
#include "GeckoProfiler.h" // for profiler_set_frame_number, etc
#include "ImageLayerComposite.h" // for ImageLayerComposite
#include "Layers.h" // for Layer, ContainerLayer, etc
#include "ThebesLayerComposite.h" // for ThebesLayerComposite

View File

@ -12,7 +12,6 @@
#include "AsyncPanZoomController.h" // for AsyncPanZoomController, etc
#include "CompositorParent.h" // for CompositorParent
#include "FrameMetrics.h" // for FrameMetrics, etc
#include "GeckoProfilerFunc.h" // for TimeDuration, TimeStamp
#include "GestureEventListener.h" // for GestureEventListener
#include "InputData.h" // for MultiTouchInput, etc
#include "Units.h" // for CSSRect, CSSPoint, etc

View File

@ -9,7 +9,6 @@
#include <algorithm> // for max
#include "AsyncPanZoomController.h" // for AsyncPanZoomController
#include "FrameMetrics.h" // for FrameMetrics
#include "GeckoProfilerFunc.h" // for TimeDuration
#include "mozilla/Attributes.h" // for MOZ_FINAL
#include "mozilla/Preferences.h" // for Preferences
#include "mozilla/gfx/Rect.h" // for RoundedIn

View File

@ -16,7 +16,6 @@
//#define COMPOSITOR_PERFORMANCE_WARNING
#include <stdint.h> // for uint64_t
#include "GeckoProfilerFunc.h" // for TimeStamp
#include "Layers.h" // for Layer
#include "ShadowLayersManager.h" // for ShadowLayersManager
#include "base/basictypes.h" // for DISALLOW_EVIL_CONSTRUCTORS

View File

@ -9,7 +9,7 @@
#include <set> // for _Rb_tree_const_iterator, etc
#include <vector> // for vector
#include "AutoOpenSurface.h" // for AutoOpenSurface, etc
#include "GeckoProfilerImpl.h" // for PROFILER_LABEL
#include "GeckoProfiler.h" // for PROFILER_LABEL
#include "ISurfaceAllocator.h" // for IsSurfaceDescriptorValid
#include "Layers.h" // for Layer
#include "RenderTrace.h" // for RenderTraceScope

View File

@ -10,7 +10,6 @@
#include "GLContext.h" // for GLContext
#include "GLContextTypes.h" // for GLuint, GLenum, GLint
#include "GLDefs.h" // for GLintptr, GLvoid, etc
#include "GeckoProfilerFunc.h" // for TimeStamp
#include "LayerManagerOGLProgram.h" // for ShaderProgramOGL, etc
#include "Units.h" // for ScreenPoint
#include "gfxContext.h" // for gfxContext

View File

@ -14,7 +14,6 @@
#include "FPSCounter.h" // for FPSState, FPSCounter
#include "GLContext.h" // for GLContext, etc
#include "GLContextProvider.h" // for GLContextProvider
#include "GeckoProfilerFunc.h" // for TimeStamp
#include "GeckoProfiler.h" // for PROFILER_LABEL
#include "ImageLayerOGL.h" // for ImageLayerOGL
#include "ImageLayers.h" // for ImageLayer

View File

@ -10,6 +10,8 @@
#include "mozilla/ipc/AsyncChannel.h"
#include <math.h>
namespace mozilla {
namespace ipc {
//-----------------------------------------------------------------------------

View File

@ -11,7 +11,6 @@
#include "mozilla/ipc/PTestShellParent.h"
#include "mozilla/ipc/PTestShellCommandParent.h"
#include "jsapi.h"
#include "nsAutoJSValHolder.h"
#include "nsStringGlue.h"

View File

@ -10,6 +10,7 @@
#include "nsJSUtils.h"
#include "jsfriendapi.h"
#include "jsproxy.h"
#include "jswrapper.h"
#include "HeapAPI.h"
#include "xpcprivate.h"
#include "mozilla/Casting.h"

View File

@ -10,7 +10,6 @@
#include "JavaScriptShared.h"
#include "mozilla/jsipc/PJavaScriptParent.h"
#include "jsclass.h"
#ifdef XP_WIN
#undef GetClassName

View File

@ -8,9 +8,6 @@
#ifndef mozilla_jsipc_JavaScriptShared_h__
#define mozilla_jsipc_JavaScriptShared_h__
#include "jsapi.h"
#include "jspubtd.h"
#include "js/HashTable.h"
#include "mozilla/dom/DOMTypes.h"
#include "mozilla/jsipc/PJavaScript.h"
#include "nsJSUtils.h"

View File

@ -29,12 +29,9 @@
#define JSD_USE_NSPR_LOCKS 1
#endif /* MOZILLA_CLIENT */
#include "jstypes.h"
#include "jsprf.h"
#include "jshash.h" /* Added by JSIFY */
#include "jshash.h"
#include "jsclist.h"
#include "jsdebug.h"
#include "jsapi.h"
#include "jsdbgapi.h"
#include "jsd_lock.h"

View File

@ -10,6 +10,7 @@
#include <ctype.h>
#include "jsd.h"
#include "jsprf.h"
#ifdef DEBUG
void JSD_ASSERT_VALID_SOURCE_TEXT(JSDSourceText* jsdsrc)

View File

@ -5,6 +5,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "jsdbgapi.h"
#include "jsfriendapi.h"
#include "jsd_xpc.h"
#include "js/GCAPI.h"

View File

@ -12,7 +12,6 @@
#define jsdebug_h___
#include "jsapi.h"
#include "jsdbgapi.h"
extern "C" {

View File

@ -11,8 +11,8 @@
* API to portable hash table code.
*/
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include "jstypes.h"
extern "C" {

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