mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Backed out 4 changesets (bug 893858, bug 868859, bug 886903) for Linux debug mochitest-other crashes on a CLOSED TREE.
Backed out changeset 0ded4854067b (bug 886903) Backed out changeset ca8afb897e13 (bug 893858) Backed out changeset c15f503a96cc (bug 868859) Backed out changeset 6a788f399a7f (bug 868859)
This commit is contained in:
parent
f785fd17e7
commit
cc6b678858
@ -4432,10 +4432,6 @@ nsBrowserAccess.prototype = {
|
|||||||
|
|
||||||
isTabContentWindow: function (aWindow) {
|
isTabContentWindow: function (aWindow) {
|
||||||
return gBrowser.browsers.some(function (browser) browser.contentWindow == aWindow);
|
return gBrowser.browsers.some(function (browser) browser.contentWindow == aWindow);
|
||||||
},
|
|
||||||
|
|
||||||
get contentWindow() {
|
|
||||||
return gBrowser.contentWindow;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1205,10 +1205,6 @@ nsBrowserAccess.prototype = {
|
|||||||
|
|
||||||
isTabContentWindow: function(aWindow) {
|
isTabContentWindow: function(aWindow) {
|
||||||
return Browser.browsers.some(function (browser) browser.contentWindow == aWindow);
|
return Browser.browsers.some(function (browser) browser.contentWindow == aWindow);
|
||||||
},
|
|
||||||
|
|
||||||
get contentWindow() {
|
|
||||||
return Browser.selectedBrowser.contentWindow;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,15 +27,8 @@ function make_object()
|
|||||||
o.b = true;
|
o.b = true;
|
||||||
o.s = "hello";
|
o.s = "hello";
|
||||||
o.x = { i: 10 };
|
o.x = { i: 10 };
|
||||||
o.f = function () { return 99; };
|
o.f = function () { return 99; }
|
||||||
|
|
||||||
// Doing anything with this Proxy will throw.
|
|
||||||
var throwing = new Proxy({}, new Proxy({}, {
|
|
||||||
get: function (trap) { throw trap; }
|
|
||||||
}));
|
|
||||||
|
|
||||||
return { "data": o,
|
return { "data": o,
|
||||||
"throwing": throwing,
|
|
||||||
"document": content.document
|
"document": content.document
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -37,39 +37,6 @@
|
|||||||
ok(data.b === false, "boolean property");
|
ok(data.b === false, "boolean property");
|
||||||
ok(data.s === "bye", "string property");
|
ok(data.s === "bye", "string property");
|
||||||
ok(data.x === null, "nested property");
|
ok(data.x === null, "nested property");
|
||||||
|
|
||||||
let throwing = message.objects.throwing;
|
|
||||||
// Based on the table on:
|
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy
|
|
||||||
let tests = [
|
|
||||||
() => Object.getOwnPropertyDescriptor(throwing, 'test'),
|
|
||||||
() => Object.getOwnPropertyNames(throwing),
|
|
||||||
() => Object.defineProperty(throwing, 'test', {value: 1}),
|
|
||||||
() => delete throwing.test,
|
|
||||||
() => "test" in throwing,
|
|
||||||
() => Object.prototype.hasOwnProperty.call(throwing, 'test'),
|
|
||||||
() => throwing.test,
|
|
||||||
() => { throwing.test = 1 },
|
|
||||||
// () => { for (let prop in throwing) {} }, Bug 783829
|
|
||||||
() => { for (let prop of throwing) {} },
|
|
||||||
() => Object.keys(throwing),
|
|
||||||
() => Function.prototype.call.call(throwing),
|
|
||||||
() => new throwing,
|
|
||||||
() => Object.preventExtensions(throwing),
|
|
||||||
() => Object.freeze(throwing),
|
|
||||||
() => Object.seal(throwing),
|
|
||||||
]
|
|
||||||
|
|
||||||
for (let test of tests) {
|
|
||||||
let threw = false;
|
|
||||||
try {
|
|
||||||
test()
|
|
||||||
} catch (e) {
|
|
||||||
threw = true;
|
|
||||||
}
|
|
||||||
ok(threw, "proxy operation threw exception");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function recvAsyncMessage(message) {
|
function recvAsyncMessage(message) {
|
||||||
@ -90,7 +57,7 @@
|
|||||||
run_tests("inprocess");
|
run_tests("inprocess");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
interface nsIDocShellTreeItem;
|
interface nsIDocShellTreeItem;
|
||||||
|
|
||||||
[scriptable, uuid(6cd89e60-1060-491e-8c31-ce969435ec56)]
|
[scriptable, uuid(932f9f93-8e21-4728-a527-cafc64b4d831)]
|
||||||
interface nsIDocShellTreeOwner : nsISupports
|
interface nsIDocShellTreeOwner : nsISupports
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -64,9 +64,6 @@ interface nsIDocShellTreeOwner : nsISupports
|
|||||||
*/
|
*/
|
||||||
readonly attribute nsIDocShellTreeItem primaryContentShell;
|
readonly attribute nsIDocShellTreeItem primaryContentShell;
|
||||||
|
|
||||||
[implicit_jscontext]
|
|
||||||
readonly attribute jsval contentWindow;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Tells the tree owner to size its window or parent window in such a way
|
Tells the tree owner to size its window or parent window in such a way
|
||||||
that the shell passed along will be the size specified.
|
that the shell passed along will be the size specified.
|
||||||
|
@ -3622,28 +3622,6 @@ nsGlobalWindow::GetContent(nsIDOMWindow** aContent)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsGlobalWindow::GetScriptableContent(JSContext* aCx, JS::Value* aVal)
|
|
||||||
{
|
|
||||||
nsCOMPtr<nsIDOMWindow> content;
|
|
||||||
nsresult rv = GetContent(getter_AddRefs(content));
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
if (content || !nsContentUtils::IsCallerChrome() || !IsChromeWindow()) {
|
|
||||||
JS::Rooted<JSObject*> global(aCx, JS_GetGlobalForScopeChain(aCx));
|
|
||||||
if (content && global) {
|
|
||||||
nsCOMPtr<nsIXPConnectJSObjectHolder> wrapper;
|
|
||||||
return nsContentUtils::WrapNative(aCx, global, content, aVal,
|
|
||||||
getter_AddRefs(wrapper));
|
|
||||||
}
|
|
||||||
return NS_ERROR_FAILURE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Something tries to get .content on a ChromeWindow, try to fetch the CPOW.
|
|
||||||
nsCOMPtr<nsIDocShellTreeOwner> treeOwner = GetTreeOwner();
|
|
||||||
NS_ENSURE_TRUE(treeOwner, NS_ERROR_FAILURE);
|
|
||||||
return treeOwner->GetContentWindow(aCx, aVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsGlobalWindow::GetPrompter(nsIPrompt** aPrompt)
|
nsGlobalWindow::GetPrompter(nsIPrompt** aPrompt)
|
||||||
|
@ -9,7 +9,7 @@ interface nsIDOMWindow;
|
|||||||
interface nsIURI;
|
interface nsIURI;
|
||||||
interface nsIFrameLoaderOwner;
|
interface nsIFrameLoaderOwner;
|
||||||
|
|
||||||
[scriptable, uuid(e420bd32-b8c4-4b47-8cca-09e0bddbb0c3)]
|
[scriptable, uuid(3ab89888-eb41-4dc8-b347-115555f47c80)]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The C++ source has access to the browser script source through
|
* The C++ source has access to the browser script source through
|
||||||
@ -92,12 +92,5 @@ interface nsIBrowserDOMWindow : nsISupports
|
|||||||
* currently open tab in this toplevel browser window.
|
* currently open tab in this toplevel browser window.
|
||||||
*/
|
*/
|
||||||
boolean isTabContentWindow(in nsIDOMWindow aWindow);
|
boolean isTabContentWindow(in nsIDOMWindow aWindow);
|
||||||
|
|
||||||
/**
|
|
||||||
* The contentWindow property of the currently selected browser.
|
|
||||||
* This is used to implement .content in remote-Firefox.
|
|
||||||
*/
|
|
||||||
|
|
||||||
readonly attribute jsval contentWindow;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "domstubs.idl"
|
#include "domstubs.idl"
|
||||||
|
|
||||||
[scriptable, uuid(f28c92a2-302a-4448-b589-46af599de352)]
|
[scriptable, uuid(35b653f4-e679-4843-8391-89cb2f5a9ba4)]
|
||||||
interface nsIDOMJSWindow : nsISupports
|
interface nsIDOMJSWindow : nsISupports
|
||||||
{
|
{
|
||||||
void dump(in DOMString str);
|
void dump(in DOMString str);
|
||||||
@ -66,7 +66,4 @@ interface nsIDOMJSWindow : nsISupports
|
|||||||
* This property is "replaceable" in JavaScript.
|
* This property is "replaceable" in JavaScript.
|
||||||
*/
|
*/
|
||||||
readonly attribute nsIDOMWindow frames;
|
readonly attribute nsIDOMWindow frames;
|
||||||
|
|
||||||
[implicit_jscontext, binaryname(ScriptableContent)]
|
|
||||||
readonly attribute jsval content;
|
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@ interface nsIVariant;
|
|||||||
* @see <http://www.whatwg.org/html/#window>
|
* @see <http://www.whatwg.org/html/#window>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[scriptable, uuid(db8ea3c8-6997-460a-8715-0a1cbf20f15d)]
|
[scriptable, uuid(be62660a-e3f6-409c-a4a9-378364a9526f)]
|
||||||
interface nsIDOMWindow : nsISupports
|
interface nsIDOMWindow : nsISupports
|
||||||
{
|
{
|
||||||
// the current browsing context
|
// the current browsing context
|
||||||
@ -360,7 +360,7 @@ interface nsIDOMWindow : nsISupports
|
|||||||
void sizeToContent();
|
void sizeToContent();
|
||||||
|
|
||||||
/* [replaceable] content */
|
/* [replaceable] content */
|
||||||
[noscript] readonly attribute nsIDOMWindow content;
|
readonly attribute nsIDOMWindow content;
|
||||||
|
|
||||||
/* [replaceable] prompter */
|
/* [replaceable] prompter */
|
||||||
[noscript] readonly attribute nsIPrompt prompter;
|
[noscript] readonly attribute nsIPrompt prompter;
|
||||||
|
@ -1181,13 +1181,10 @@ PreloadSlowThings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID,
|
ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID)
|
||||||
const nsCString& name, const nsCString& UAName)
|
|
||||||
{
|
{
|
||||||
mAppInfo.version.Assign(version);
|
mAppInfo.version.Assign(version);
|
||||||
mAppInfo.buildID.Assign(buildID);
|
mAppInfo.buildID.Assign(buildID);
|
||||||
mAppInfo.name.Assign(name);
|
|
||||||
mAppInfo.UAName.Assign(UAName);
|
|
||||||
// If we're part of the mozbrowser machinery, go ahead and start
|
// If we're part of the mozbrowser machinery, go ahead and start
|
||||||
// preloading things. We can only do this for mozbrowser because
|
// preloading things. We can only do this for mozbrowser because
|
||||||
// PreloadSlowThings() may set the docshell of the first TabChild
|
// PreloadSlowThings() may set the docshell of the first TabChild
|
||||||
|
@ -60,8 +60,6 @@ public:
|
|||||||
{
|
{
|
||||||
nsCString version;
|
nsCString version;
|
||||||
nsCString buildID;
|
nsCString buildID;
|
||||||
nsCString name;
|
|
||||||
nsCString UAName;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool Init(MessageLoop* aIOLoop,
|
bool Init(MessageLoop* aIOLoop,
|
||||||
@ -196,8 +194,7 @@ public:
|
|||||||
virtual bool RecvGarbageCollect();
|
virtual bool RecvGarbageCollect();
|
||||||
virtual bool RecvCycleCollect();
|
virtual bool RecvCycleCollect();
|
||||||
|
|
||||||
virtual bool RecvAppInfo(const nsCString& version, const nsCString& buildID,
|
virtual bool RecvAppInfo(const nsCString& version, const nsCString& buildID);
|
||||||
const nsCString& name, const nsCString& UAName);
|
|
||||||
|
|
||||||
virtual bool RecvLastPrivateDocShellDestroyed();
|
virtual bool RecvLastPrivateDocShellDestroyed();
|
||||||
|
|
||||||
|
@ -1133,11 +1133,9 @@ ContentParent::ContentParent(mozIApplication* aApp,
|
|||||||
if (gAppData) {
|
if (gAppData) {
|
||||||
nsCString version(gAppData->version);
|
nsCString version(gAppData->version);
|
||||||
nsCString buildID(gAppData->buildID);
|
nsCString buildID(gAppData->buildID);
|
||||||
nsCString name(gAppData->name);
|
|
||||||
nsCString UAName(gAppData->UAName);
|
|
||||||
|
|
||||||
//Sending all information to content process
|
//Sending all information to content process
|
||||||
unused << SendAppInfo(version, buildID, name, UAName);
|
unused << SendAppInfo(version, buildID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ child:
|
|||||||
*/
|
*/
|
||||||
ActivateA11y();
|
ActivateA11y();
|
||||||
|
|
||||||
AppInfo(nsCString version, nsCString buildID, nsCString name, nsCString UAName);
|
AppInfo(nsCString version, nsCString buildID);
|
||||||
|
|
||||||
// Notify child that last-pb-context-exited notification was observed
|
// Notify child that last-pb-context-exited notification was observed
|
||||||
LastPrivateDocShellDestroyed();
|
LastPrivateDocShellDestroyed();
|
||||||
|
@ -253,9 +253,6 @@
|
|||||||
},
|
},
|
||||||
openDialog: function(aType, aName, aFeatures, aArguments, aFrameElement) {
|
openDialog: function(aType, aName, aFeatures, aArguments, aFrameElement) {
|
||||||
alert(aType + ", " + aName + ", " + aFeatures + ", " + aArguments + ", " + aFrameElement);
|
alert(aType + ", " + aName + ", " + aFeatures + ", " + aArguments + ", " + aFrameElement);
|
||||||
},
|
|
||||||
get contentWindow() {
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ nsDocShellTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aShell)
|
|||||||
{
|
{
|
||||||
NS_ENSURE_ARG_POINTER(aShell);
|
NS_ENSURE_ARG_POINTER(aShell);
|
||||||
|
|
||||||
if (mTreeOwner)
|
if(mTreeOwner)
|
||||||
return mTreeOwner->GetPrimaryContentShell(aShell);
|
return mTreeOwner->GetPrimaryContentShell(aShell);
|
||||||
|
|
||||||
*aShell = (mPrimaryContentShell ? mPrimaryContentShell : mWebBrowser->mDocShell);
|
*aShell = (mPrimaryContentShell ? mPrimaryContentShell : mWebBrowser->mDocShell);
|
||||||
@ -362,15 +362,6 @@ nsDocShellTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aShell)
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsDocShellTreeOwner::GetContentWindow(JSContext* aCx, JS::Value* aVal)
|
|
||||||
{
|
|
||||||
if (mTreeOwner)
|
|
||||||
return mTreeOwner->GetContentWindow(aCx, aVal);
|
|
||||||
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDocShellTreeOwner::SizeShellTo(nsIDocShellTreeItem* aShellItem,
|
nsDocShellTreeOwner::SizeShellTo(nsIDocShellTreeItem* aShellItem,
|
||||||
int32_t aCX, int32_t aCY)
|
int32_t aCX, int32_t aCY)
|
||||||
|
@ -434,7 +434,7 @@ JavaScriptChild::AnswerIsExtensible(const ObjectId &objId, ReturnStatus *rs, boo
|
|||||||
return fail(cx, rs);
|
return fail(cx, rs);
|
||||||
|
|
||||||
*result = !!extensible;
|
*result = !!extensible;
|
||||||
return ok(rs);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@ -7206,11 +7206,12 @@ JS_GetScriptedGlobal(JSContext *cx)
|
|||||||
JS_PUBLIC_API(JSBool)
|
JS_PUBLIC_API(JSBool)
|
||||||
JS_PreventExtensions(JSContext *cx, JS::HandleObject obj)
|
JS_PreventExtensions(JSContext *cx, JS::HandleObject obj)
|
||||||
{
|
{
|
||||||
bool extensible;
|
JSBool extensible;
|
||||||
if (!JSObject::isExtensible(cx, obj, &extensible))
|
if (!JS_IsExtensible(cx, obj, &extensible))
|
||||||
return false;
|
return JS_TRUE;
|
||||||
if (!extensible)
|
if (extensible)
|
||||||
return true;
|
return JS_TRUE;
|
||||||
|
|
||||||
return JSObject::preventExtensions(cx, obj);
|
return JSObject::preventExtensions(cx, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2492,10 +2492,6 @@ nsBrowserAccess.prototype = {
|
|||||||
|
|
||||||
isTabContentWindow: function(aWindow) {
|
isTabContentWindow: function(aWindow) {
|
||||||
return BrowserApp.getBrowserForWindow(aWindow) != null;
|
return BrowserApp.getBrowserForWindow(aWindow) != null;
|
||||||
},
|
|
||||||
|
|
||||||
get contentWindow() {
|
|
||||||
return BrowserApp.selectedBrowser.contentWindow;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,24 +29,12 @@ let WebProgressListener = {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
_setupObjects: function setupObjects(aWebProgress) {
|
|
||||||
let win = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
|
||||||
.getInterface(Ci.nsIDOMWindow);
|
|
||||||
return {
|
|
||||||
contentWindow: win,
|
|
||||||
// DOMWindow is not necessarily the content-window with subframes.
|
|
||||||
DOMWindow: aWebProgress.DOMWindow
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
onStateChange: function onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
|
onStateChange: function onStateChange(aWebProgress, aRequest, aStateFlags, aStatus) {
|
||||||
let json = this._setupJSON(aWebProgress, aRequest);
|
let json = this._setupJSON(aWebProgress, aRequest);
|
||||||
let objects = this._setupObjects(aWebProgress);
|
|
||||||
|
|
||||||
json.stateFlags = aStateFlags;
|
json.stateFlags = aStateFlags;
|
||||||
json.status = aStatus;
|
json.status = aStatus;
|
||||||
|
|
||||||
sendAsyncMessage("Content:StateChange", json, objects);
|
sendAsyncMessage("Content:StateChange", json);
|
||||||
},
|
},
|
||||||
|
|
||||||
onProgressChange: function onProgressChange(aWebProgress, aRequest, aCurSelf, aMaxSelf, aCurTotal, aMaxTotal) {
|
onProgressChange: function onProgressChange(aWebProgress, aRequest, aCurSelf, aMaxSelf, aCurTotal, aMaxTotal) {
|
||||||
@ -57,35 +45,29 @@ let WebProgressListener = {
|
|||||||
let charset = content.document.characterSet;
|
let charset = content.document.characterSet;
|
||||||
|
|
||||||
let json = this._setupJSON(aWebProgress, aRequest);
|
let json = this._setupJSON(aWebProgress, aRequest);
|
||||||
let objects = this._setupObjects(aWebProgress);
|
|
||||||
|
|
||||||
json.documentURI = aWebProgress.DOMWindow.document.documentURIObject.spec;
|
json.documentURI = aWebProgress.DOMWindow.document.documentURIObject.spec;
|
||||||
json.location = spec;
|
json.location = spec;
|
||||||
json.canGoBack = docShell.canGoBack;
|
json.canGoBack = docShell.canGoBack;
|
||||||
json.canGoForward = docShell.canGoForward;
|
json.canGoForward = docShell.canGoForward;
|
||||||
json.charset = charset.toString();
|
json.charset = charset.toString();
|
||||||
|
|
||||||
sendAsyncMessage("Content:LocationChange", json, objects);
|
sendAsyncMessage("Content:LocationChange", json);
|
||||||
},
|
},
|
||||||
|
|
||||||
onStatusChange: function onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
|
onStatusChange: function onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
|
||||||
let json = this._setupJSON(aWebProgress, aRequest);
|
let json = this._setupJSON(aWebProgress, aRequest);
|
||||||
let objects = this._setupObjects(aWebProgress);
|
|
||||||
|
|
||||||
json.status = aStatus;
|
json.status = aStatus;
|
||||||
json.message = aMessage;
|
json.message = aMessage;
|
||||||
|
|
||||||
sendAsyncMessage("Content:StatusChange", json, objects);
|
sendAsyncMessage("Content:StatusChange", json);
|
||||||
},
|
},
|
||||||
|
|
||||||
onSecurityChange: function onSecurityChange(aWebProgress, aRequest, aState) {
|
onSecurityChange: function onSecurityChange(aWebProgress, aRequest, aState) {
|
||||||
let json = this._setupJSON(aWebProgress, aRequest);
|
let json = this._setupJSON(aWebProgress, aRequest);
|
||||||
let objects = this._setupObjects(aWebProgress);
|
|
||||||
|
|
||||||
json.state = aState;
|
json.state = aState;
|
||||||
json.status = SecurityUI.getSSLStatusAsString();
|
json.status = SecurityUI.getSSLStatusAsString();
|
||||||
|
|
||||||
sendAsyncMessage("Content:SecurityChange", json, objects);
|
sendAsyncMessage("Content:SecurityChange", json);
|
||||||
},
|
},
|
||||||
|
|
||||||
QueryInterface: function QueryInterface(aIID) {
|
QueryInterface: function QueryInterface(aIID) {
|
||||||
|
@ -62,16 +62,6 @@
|
|||||||
onget="return this._characterSet"
|
onget="return this._characterSet"
|
||||||
readonly="true"/>
|
readonly="true"/>
|
||||||
|
|
||||||
<field name="_contentWindow">null</field>
|
|
||||||
|
|
||||||
<property name="contentWindow"
|
|
||||||
onget="return this._contentWindow"
|
|
||||||
readonly="true"/>
|
|
||||||
|
|
||||||
<property name="contentDocument"
|
|
||||||
onget="return this.contentWindow ? this.contentWindow.document : null"
|
|
||||||
readonly="true"/>
|
|
||||||
|
|
||||||
<constructor>
|
<constructor>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
this.messageManager.addMessageListener("DOMTitleChanged", this);
|
this.messageManager.addMessageListener("DOMTitleChanged", this);
|
||||||
|
@ -27,7 +27,6 @@ function RemoteWebProgress(browser)
|
|||||||
{
|
{
|
||||||
this._browser = browser;
|
this._browser = browser;
|
||||||
this._isDocumentLoading = false;
|
this._isDocumentLoading = false;
|
||||||
this._DOMWindow = null;
|
|
||||||
this._isTopLevel = true;
|
this._isTopLevel = true;
|
||||||
this._progressListeners = [];
|
this._progressListeners = [];
|
||||||
}
|
}
|
||||||
@ -61,7 +60,7 @@ RemoteWebProgress.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
get isLoadingDocument() { return this._isDocumentLoading },
|
get isLoadingDocument() { return this._isDocumentLoading },
|
||||||
get DOMWindow() { return this._DOMWindow; },
|
get DOMWindow() { return null; },
|
||||||
get DOMWindowID() { return 0; },
|
get DOMWindowID() { return 0; },
|
||||||
get isTopLevel() { return this._isTopLevel; },
|
get isTopLevel() { return this._isTopLevel; },
|
||||||
|
|
||||||
@ -82,9 +81,7 @@ RemoteWebProgress.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
receiveMessage: function WP_ReceiveMessage(aMessage) {
|
receiveMessage: function WP_ReceiveMessage(aMessage) {
|
||||||
this._DOMWindow = aMessage.objects.DOMWindow;
|
|
||||||
this._isTopLevel = aMessage.json.isTopLevel;
|
this._isTopLevel = aMessage.json.isTopLevel;
|
||||||
this._browser._contentWindow = aMessage.objects.contentWindow;
|
|
||||||
|
|
||||||
let req = this._uriSpec(aMessage.json.requestURI);
|
let req = this._uriSpec(aMessage.json.requestURI);
|
||||||
switch (aMessage.name) {
|
switch (aMessage.name) {
|
||||||
|
@ -632,9 +632,7 @@ NS_IMETHODIMP
|
|||||||
nsXULAppInfo::GetName(nsACString& aResult)
|
nsXULAppInfo::GetName(nsACString& aResult)
|
||||||
{
|
{
|
||||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||||
ContentChild* cc = ContentChild::GetSingleton();
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
aResult = cc->GetAppInfo().name;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
aResult.Assign(gAppData->name);
|
aResult.Assign(gAppData->name);
|
||||||
|
|
||||||
@ -698,9 +696,7 @@ NS_IMETHODIMP
|
|||||||
nsXULAppInfo::GetUAName(nsACString& aResult)
|
nsXULAppInfo::GetUAName(nsACString& aResult)
|
||||||
{
|
{
|
||||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||||
ContentChild* cc = ContentChild::GetSingleton();
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
aResult = cc->GetAppInfo().UAName;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
aResult.Assign(gAppData->UAName);
|
aResult.Assign(gAppData->UAName);
|
||||||
|
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
#include "nsIDOMNodeList.h"
|
#include "nsIDOMNodeList.h"
|
||||||
#include "nsIDOMXULElement.h"
|
#include "nsIDOMXULElement.h"
|
||||||
#include "nsIXULBrowserWindow.h"
|
#include "nsIXULBrowserWindow.h"
|
||||||
#include "nsIDOMChromeWindow.h"
|
|
||||||
#include "nsIBrowserDOMWindow.h"
|
|
||||||
|
|
||||||
// CIDs
|
// CIDs
|
||||||
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
|
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
|
||||||
@ -247,25 +245,6 @@ NS_IMETHODIMP nsChromeTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aS
|
|||||||
return mXULWindow->GetPrimaryContentShell(aShell);
|
return mXULWindow->GetPrimaryContentShell(aShell);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsChromeTreeOwner::GetContentWindow(JSContext* aCx, JS::Value* aVal)
|
|
||||||
{
|
|
||||||
NS_ENSURE_STATE(mXULWindow);
|
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMWindow> domWin;
|
|
||||||
mXULWindow->GetWindowDOMWindow(getter_AddRefs(domWin));
|
|
||||||
nsCOMPtr<nsIDOMChromeWindow> chromeWin = do_QueryInterface(domWin);
|
|
||||||
if (!chromeWin)
|
|
||||||
return NS_OK;
|
|
||||||
|
|
||||||
nsCOMPtr<nsIBrowserDOMWindow> browserDOMWin;
|
|
||||||
chromeWin->GetBrowserDOMWindow(getter_AddRefs(browserDOMWin));
|
|
||||||
if (!browserDOMWin)
|
|
||||||
return NS_OK;
|
|
||||||
|
|
||||||
return browserDOMWin->GetContentWindow(aVal);
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsChromeTreeOwner::SizeShellTo(nsIDocShellTreeItem* aShellItem,
|
NS_IMETHODIMP nsChromeTreeOwner::SizeShellTo(nsIDocShellTreeItem* aShellItem,
|
||||||
int32_t aCX, int32_t aCY)
|
int32_t aCX, int32_t aCY)
|
||||||
{
|
{
|
||||||
|
@ -292,20 +292,12 @@ nsContentTreeOwner::ContentShellRemoved(nsIDocShellTreeItem* aContentShell)
|
|||||||
return mXULWindow->ContentShellRemoved(aContentShell);
|
return mXULWindow->ContentShellRemoved(aContentShell);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP nsContentTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aShell)
|
||||||
nsContentTreeOwner::GetPrimaryContentShell(nsIDocShellTreeItem** aShell)
|
|
||||||
{
|
{
|
||||||
NS_ENSURE_STATE(mXULWindow);
|
NS_ENSURE_STATE(mXULWindow);
|
||||||
return mXULWindow->GetPrimaryContentShell(aShell);
|
return mXULWindow->GetPrimaryContentShell(aShell);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsContentTreeOwner::GetContentWindow(JSContext* aCx, JS::Value* aVal)
|
|
||||||
{
|
|
||||||
NS_ENSURE_STATE(mXULWindow);
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP nsContentTreeOwner::SizeShellTo(nsIDocShellTreeItem* aShellItem,
|
NS_IMETHODIMP nsContentTreeOwner::SizeShellTo(nsIDocShellTreeItem* aShellItem,
|
||||||
int32_t aCX, int32_t aCY)
|
int32_t aCX, int32_t aCY)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user