mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Removed JSStackFrame::xmlNamespace (bug 512389, r=brendan).
This commit is contained in:
parent
58465e64d5
commit
e322e64001
@ -2795,9 +2795,6 @@ js_TraceStackFrame(JSTracer *trc, JSStackFrame *fp)
|
||||
JS_CALL_OBJECT_TRACER(trc, fp->scopeChain, "scope chain");
|
||||
if (fp->sharpArray)
|
||||
JS_CALL_OBJECT_TRACER(trc, fp->sharpArray, "sharp array");
|
||||
|
||||
if (fp->xmlNamespace)
|
||||
JS_CALL_OBJECT_TRACER(trc, fp->xmlNamespace, "xmlNamespace");
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1306,7 +1306,6 @@ have_fun:
|
||||
frame.sharpArray = NULL;
|
||||
frame.flags = flags | rootedArgsFlag;
|
||||
frame.dormantNext = NULL;
|
||||
frame.xmlNamespace = NULL;
|
||||
frame.displaySave = NULL;
|
||||
|
||||
MUST_FLOW_THROUGH("out");
|
||||
@ -1561,7 +1560,6 @@ js_Execute(JSContext *cx, JSObject *chain, JSScript *script,
|
||||
frame.sharpDepth = 0;
|
||||
frame.flags = flags;
|
||||
frame.dormantNext = NULL;
|
||||
frame.xmlNamespace = NULL;
|
||||
frame.blockChain = NULL;
|
||||
|
||||
/*
|
||||
|
@ -126,7 +126,6 @@ struct JSStackFrame {
|
||||
JSObject *sharpArray; /* scope for #n= initializer vars */
|
||||
uint32 flags; /* frame flags -- see below */
|
||||
JSStackFrame *dormantNext; /* next dormant frame chain */
|
||||
JSObject *xmlNamespace; /* null or default xml namespace in E4X */
|
||||
JSStackFrame *displaySave; /* previous value of display entry for
|
||||
script->staticLevel */
|
||||
|
||||
|
@ -768,7 +768,6 @@ js_NewGenerator(JSContext *cx, JSStackFrame *fp)
|
||||
gen->frame.sharpArray = NULL;
|
||||
gen->frame.flags = (fp->flags & ~JSFRAME_ROOTED_ARGV) | JSFRAME_GENERATOR;
|
||||
gen->frame.dormantNext = NULL;
|
||||
gen->frame.xmlNamespace = NULL;
|
||||
/* JSOP_GENERATOR appears in the prologue, outside all blocks. */
|
||||
JS_ASSERT(!fp->blockChain);
|
||||
gen->frame.blockChain = NULL;
|
||||
|
@ -6200,8 +6200,6 @@ js_DumpStackFrame(JSStackFrame *fp)
|
||||
|
||||
if (fp->sharpDepth)
|
||||
fprintf(stderr, " sharpDepth: %u\n", (unsigned) fp->sharpDepth);
|
||||
if (fp->xmlNamespace)
|
||||
fprintf(stderr, " xmlNamespace: (JSObject *) %p\n", (void *) fp->xmlNamespace);
|
||||
|
||||
if (fp->dormantNext)
|
||||
fprintf(stderr, " dormantNext: (JSStackFrame *) %p\n", (void *) fp->dormantNext);
|
||||
|
@ -2065,7 +2065,6 @@
|
||||
newifp->frame.sharpArray = NULL;
|
||||
newifp->frame.flags = flags;
|
||||
newifp->frame.dormantNext = NULL;
|
||||
newifp->frame.xmlNamespace = NULL;
|
||||
newifp->frame.blockChain = NULL;
|
||||
if (script->staticLevel < JS_DISPLAY_SIZE) {
|
||||
JSStackFrame **disp = &cx->display[script->staticLevel];
|
||||
|
@ -5410,6 +5410,9 @@ Statement(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
|
||||
JSMSG_BAD_DEFAULT_XML_NAMESPACE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Is this an E4X dagger I see before me? */
|
||||
tc->flags |= TCF_FUN_HEAVYWEIGHT;
|
||||
pn2 = Expr(cx, ts, tc);
|
||||
if (!pn2)
|
||||
return NULL;
|
||||
|
@ -4696,7 +4696,6 @@ SynthesizeFrame(JSContext* cx, const FrameInfo& fi, JSObject* callee)
|
||||
newifp->frame.sharpArray = NULL;
|
||||
newifp->frame.flags = constructing ? JSFRAME_CONSTRUCTING : 0;
|
||||
newifp->frame.dormantNext = NULL;
|
||||
newifp->frame.xmlNamespace = NULL;
|
||||
newifp->frame.blockChain = NULL;
|
||||
newifp->mark = newmark;
|
||||
newifp->frame.thisp = NULL; // will be updated in FlushNativeStackFrame
|
||||
@ -4782,7 +4781,6 @@ SynthesizeSlowNativeFrame(JSContext *cx, VMSideExit *exit)
|
||||
fp->sharpArray = NULL;
|
||||
fp->flags = exit->constructing() ? JSFRAME_CONSTRUCTING : 0;
|
||||
fp->dormantNext = NULL;
|
||||
fp->xmlNamespace = NULL;
|
||||
fp->displaySave = NULL;
|
||||
|
||||
ifp->mark = mark;
|
||||
|
@ -7557,10 +7557,10 @@ js_GetFunctionNamespace(JSContext *cx, jsval *vp)
|
||||
/*
|
||||
* Note the asymmetry between js_GetDefaultXMLNamespace and js_SetDefaultXML-
|
||||
* Namespace. Get searches fp->scopeChain for JS_DEFAULT_XML_NAMESPACE_ID,
|
||||
* while Set sets JS_DEFAULT_XML_NAMESPACE_ID in fp->varobj (unless fp is a
|
||||
* lightweight function activation). There's no requirement that fp->varobj
|
||||
* lie directly on fp->scopeChain, although it should be reachable using the
|
||||
* prototype chain from a scope object (cf. JSOPTION_VAROBJFIX in jsapi.h).
|
||||
* while Set sets JS_DEFAULT_XML_NAMESPACE_ID in fp->varobj. There's no
|
||||
* requirement that fp->varobj lie directly on fp->scopeChain, although it
|
||||
* should be reachable using the prototype chain from a scope object (cf.
|
||||
* JSOPTION_VAROBJFIX in jsapi.h).
|
||||
*
|
||||
* If Get can't find JS_DEFAULT_XML_NAMESPACE_ID along the scope chain, it
|
||||
* creates a default namespace via 'new Namespace()'. In contrast, Set uses
|
||||
@ -7577,11 +7577,6 @@ js_GetDefaultXMLNamespace(JSContext *cx, jsval *vp)
|
||||
jsval v;
|
||||
|
||||
fp = js_GetTopStackFrame(cx);
|
||||
ns = fp->xmlNamespace;
|
||||
if (ns) {
|
||||
*vp = OBJECT_TO_JSVAL(ns);
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
for (tmp = fp->scopeChain; tmp; tmp = OBJ_GET_PARENT(cx, tmp)) {
|
||||
@ -7591,7 +7586,6 @@ js_GetDefaultXMLNamespace(JSContext *cx, jsval *vp)
|
||||
if (!tmp->getProperty(cx, JS_DEFAULT_XML_NAMESPACE_ID, &v))
|
||||
return JS_FALSE;
|
||||
if (!JSVAL_IS_PRIMITIVE(v)) {
|
||||
fp->xmlNamespace = JSVAL_TO_OBJECT(v);
|
||||
*vp = v;
|
||||
return JS_TRUE;
|
||||
}
|
||||
@ -7602,12 +7596,10 @@ js_GetDefaultXMLNamespace(JSContext *cx, jsval *vp)
|
||||
if (!ns)
|
||||
return JS_FALSE;
|
||||
v = OBJECT_TO_JSVAL(ns);
|
||||
if (obj &&
|
||||
!obj->defineProperty(cx, JS_DEFAULT_XML_NAMESPACE_ID, v, JS_PropertyStub, JS_PropertyStub,
|
||||
if (!obj->defineProperty(cx, JS_DEFAULT_XML_NAMESPACE_ID, v, JS_PropertyStub, JS_PropertyStub,
|
||||
JSPROP_PERMANENT, NULL)) {
|
||||
return JS_FALSE;
|
||||
}
|
||||
fp->xmlNamespace = ns;
|
||||
*vp = v;
|
||||
return JS_TRUE;
|
||||
}
|
||||
@ -7628,15 +7620,10 @@ js_SetDefaultXMLNamespace(JSContext *cx, jsval v)
|
||||
|
||||
fp = js_GetTopStackFrame(cx);
|
||||
varobj = fp->varobj;
|
||||
if (varobj) {
|
||||
if (!varobj->defineProperty(cx, JS_DEFAULT_XML_NAMESPACE_ID, v,
|
||||
JS_PropertyStub, JS_PropertyStub, JSPROP_PERMANENT, NULL)) {
|
||||
return JS_FALSE;
|
||||
}
|
||||
} else {
|
||||
JS_ASSERT(fp->fun && !JSFUN_HEAVYWEIGHT_TEST(fp->fun->flags));
|
||||
if (!varobj->defineProperty(cx, JS_DEFAULT_XML_NAMESPACE_ID, v,
|
||||
JS_PropertyStub, JS_PropertyStub, JSPROP_PERMANENT, NULL)) {
|
||||
return JS_FALSE;
|
||||
}
|
||||
fp->xmlNamespace = JSVAL_TO_OBJECT(v);
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user