mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-22 20:34:01 +00:00
Bug 341915: can we move nsIScriptContext(Owner) from dom to xpconnect
r=timeless, sr=jst
This commit is contained in:
parent
59bf00c8eb
commit
ca11f368e4
@ -54,7 +54,6 @@ class nsIVariant;
|
||||
class nsIObjectInputStream;
|
||||
class nsIObjectOutputStream;
|
||||
class nsScriptObjectHolder;
|
||||
class nsIDOMDocument;
|
||||
|
||||
typedef void (*nsScriptTerminationFunc)(nsISupports* aRef);
|
||||
|
||||
@ -443,9 +442,10 @@ public:
|
||||
|
||||
/**
|
||||
* Tell the context our global has a new document, and the scope
|
||||
* used by it.
|
||||
* used by it. Use nsISupports to avoid dependency issues - but expect
|
||||
* a QI for nsIDOMDocument and/or nsIDocument.
|
||||
*/
|
||||
virtual void DidSetDocument(nsIDOMDocument *aDoc, void *aGlobal) = 0;
|
||||
virtual void DidSetDocument(nsISupports *aDoc, void *aGlobal) = 0;
|
||||
|
||||
/* Memory managment for script objects. Used by the implementation of
|
||||
* nsScriptObjectHolder to manage the lifetimes of the held script objects.
|
||||
|
@ -154,7 +154,7 @@ public:
|
||||
|
||||
virtual void WillInitializeContext();
|
||||
virtual void DidInitializeContext();
|
||||
virtual void DidSetDocument(nsIDOMDocument *aDocdoc, void *aGlobal) {;}
|
||||
virtual void DidSetDocument(nsISupports *aDocdoc, void *aGlobal) {;}
|
||||
|
||||
virtual nsresult Serialize(nsIObjectOutputStream* aStream, void *aScriptObject);
|
||||
virtual nsresult Deserialize(nsIObjectInputStream* aStream,
|
||||
|
@ -288,7 +288,7 @@ nsPythonContext::InitContext(nsIScriptGlobalObject *aGlobalObject)
|
||||
}
|
||||
|
||||
void
|
||||
nsPythonContext::DidSetDocument(nsIDOMDocument *aDoc, void *aGlobal)
|
||||
nsPythonContext::DidSetDocument(nsISupports *aSupDoc, void *aGlobal)
|
||||
{
|
||||
NS_TIMELINE_MARK_FUNCTION("nsPythonContext::DidSetDocument");
|
||||
NS_ASSERTION(mDelegate != NULL, "No delegate");
|
||||
@ -298,9 +298,12 @@ nsPythonContext::DidSetDocument(nsIDOMDocument *aDoc, void *aGlobal)
|
||||
|
||||
CEnterLeavePython _celp;
|
||||
PyObject *obDoc;
|
||||
if (aDoc) {
|
||||
obDoc = PyObject_FromNSDOMInterface(mDelegate, aDoc,
|
||||
NS_GET_IID(nsIDOMDocument));
|
||||
if (aSupDoc) {
|
||||
nsCOMPtr<nsIDOMDocument> doc(do_QueryInterface(aSupDoc));
|
||||
NS_ASSERTION(nsnull != doc, "not an nsIDOMDocument!?");
|
||||
if (nsnull != doc)
|
||||
obDoc = PyObject_FromNSDOMInterface(mDelegate, aSupDoc,
|
||||
NS_GET_IID(nsIDOMDocument));
|
||||
if (!obDoc) {
|
||||
HandlePythonError();
|
||||
return;
|
||||
|
@ -204,7 +204,7 @@ public:
|
||||
|
||||
virtual void WillInitializeContext();
|
||||
virtual void DidInitializeContext();
|
||||
virtual void DidSetDocument(nsIDOMDocument *aDocdoc, void *aGlobal);
|
||||
virtual void DidSetDocument(nsISupports *aDocdoc, void *aGlobal);
|
||||
|
||||
virtual nsresult Serialize(nsIObjectOutputStream* aStream, void *aScriptObject);
|
||||
virtual nsresult Deserialize(nsIObjectInputStream* aStream,
|
||||
|
Loading…
x
Reference in New Issue
Block a user