mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
Checking in shaver's patch for bug 275742: E4X for JS components, r=me.
This commit is contained in:
parent
9b06b9b0f5
commit
5d3435f4a6
@ -1143,6 +1143,8 @@ JSCLAutoContext::JSCLAutoContext(JSRuntime* rt)
|
||||
}
|
||||
|
||||
if (mContext) {
|
||||
mSavedOptions = JS_GetOptions(mContext);
|
||||
JS_SetOptions(mContext, mSavedOptions | JSOPTION_XML);
|
||||
mContextThread = JS_GetContextThread(mContext);
|
||||
if (mContextThread) {
|
||||
JS_BeginRequest(mContext);
|
||||
@ -1156,9 +1158,11 @@ JSCLAutoContext::JSCLAutoContext(JSRuntime* rt)
|
||||
|
||||
JSCLAutoContext::~JSCLAutoContext()
|
||||
{
|
||||
if (mContext && mContextThread) {
|
||||
if (mContext) {
|
||||
JS_ClearNewbornRoots(mContext);
|
||||
JS_EndRequest(mContext);
|
||||
JS_SetOptions(mContext, mSavedOptions);
|
||||
if (mContextThread)
|
||||
JS_EndRequest(mContext);
|
||||
}
|
||||
|
||||
if (mPopNeeded) {
|
||||
|
@ -111,6 +111,7 @@ private:
|
||||
nsresult mError;
|
||||
JSBool mPopNeeded;
|
||||
intN mContextThread;
|
||||
uint32 mSavedOptions;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user