-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path360.bug
executable file
·223 lines (223 loc) · 7.76 KB
/
360.bug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
diff -r 359/src/config/CVS/Tag 360/src/config/CVS/Tag
1c1
< D2006.04.06.20.04.54
---
> D2006.04.07.03.15.24
diff -r 359/src/CVS/Entries 360/src/CVS/Entries
83a84
> /jsobj.c/3.250/Result of merge//D2006.04.07.03.15.24
108a110
> /jsxml.c/3.101/Mon Dec 22 23:26:46 2014//D2006.04.07.03.15.24
112,113d113
< /jsobj.c/3.249/Result of merge//D2006.04.06.20.04.54
< /jsxml.c/3.99/Mon Dec 22 23:26:48 2014//D2006.04.06.20.04.54
diff -r 359/src/CVS/Tag 360/src/CVS/Tag
1c1
< D2006.04.06.20.04.54
---
> D2006.04.07.03.15.24
diff -r 359/src/editline/CVS/Tag 360/src/editline/CVS/Tag
1c1
< D2006.04.06.20.04.54
---
> D2006.04.07.03.15.24
diff -r 359/src/fdlibm/CVS/Tag 360/src/fdlibm/CVS/Tag
1c1
< D2006.04.06.20.04.54
---
> D2006.04.07.03.15.24
diff -r 359/src/jsobj.c 360/src/jsobj.c
71a72,75
> #if JS_HAS_XML_SUPPORT
> #include "jsxml.h"
> #endif
>
4094a4099
> jsid id;
4110,4116c4115,4127
< if (!OBJ_GET_PROPERTY(cx, obj, ATOM_TO_JSID(atom), &fval)) {
< JS_ClearPendingException(cx);
< ok = JS_TRUE;
< } else if (!JSVAL_IS_PRIMITIVE(fval)) {
< ok = js_InternalCall(cx, obj, fval, argc, argv, rval);
< } else {
< ok = JS_TRUE;
---
> id = ATOM_TO_JSID(atom);
> fval = JSVAL_VOID;
> #if JS_HAS_XML_SUPPORT
> if (OBJECT_IS_XML(cx, obj)) {
> JSXMLObjectOps *ops;
>
> ops = (JSXMLObjectOps *) obj->map->ops;
> obj = ops->getMethod(cx, obj, id, &fval);
> ok = (obj != NULL);
> } else
> #endif
> {
> ok = OBJ_GET_PROPERTY(cx, obj, id, &fval);
4117a4129,4132
> if (!ok)
> JS_ClearPendingException(cx);
> ok = JSVAL_IS_PRIMITIVE(fval) ||
> js_InternalCall(cx, obj, fval, argc, argv, rval);
Only in 359/src: .#jsobj.c.3.250
diff -r 359/src/jsxml.c 360/src/jsxml.c
7023a7024
> {js_toSource_str, xml_toXMLString, 0,0,GENERIC_MASK},
7525a7527
> /* Optimize by avoiding JS_LOCK_GC(rt) for the common case. */
7529,7531c7531,7537
< atom = js_Atomize(cx, js_function_str, 8, 0);
< JS_ASSERT(atom);
< prefix = ATOM_TO_STRING(atom);
---
> JS_LOCK_GC(rt);
> obj = rt->functionNamespaceObject;
> if (!obj) {
> JS_UNLOCK_GC(rt);
> atom = js_Atomize(cx, js_function_str, 8, 0);
> JS_ASSERT(atom);
> prefix = ATOM_TO_STRING(atom);
7533,7536c7539,7549
< atom = js_Atomize(cx, anti_uri, sizeof anti_uri - 1, ATOM_PINNED);
< if (!atom)
< return JS_FALSE;
< rt->atomState.lazy.functionNamespaceURIAtom = atom;
---
> /*
> * Note that any race to atomize anti_uri here is resolved by
> * the atom table code, such that at most one atom for anti_uri
> * is created. We store in rt->atomState.lazy unconditionally,
> * since we are guaranteed to overwrite either null or the same
> * atom pointer.
> */
> atom = js_Atomize(cx, anti_uri, sizeof anti_uri - 1, ATOM_PINNED);
> if (!atom)
> return JS_FALSE;
> rt->atomState.lazy.functionNamespaceURIAtom = atom;
7538,7541c7551,7554
< uri = ATOM_TO_STRING(atom);
< obj = js_NewXMLNamespaceObject(cx, prefix, uri, JS_FALSE);
< if (!obj)
< return JS_FALSE;
---
> uri = ATOM_TO_STRING(atom);
> obj = js_NewXMLNamespaceObject(cx, prefix, uri, JS_FALSE);
> if (!obj)
> return JS_FALSE;
7543,7551c7556,7571
< /*
< * Avoid entraining any in-scope Object.prototype. The loss of
< * Namespace.prototype is not detectable, as there is no way to
< * refer to this instance in scripts. When used to qualify method
< * names, its prefix and uri references are copied to the QName.
< */
< OBJ_SET_PROTO(cx, obj, NULL);
< OBJ_SET_PARENT(cx, obj, NULL);
< rt->functionNamespaceObject = obj;
---
> /*
> * Avoid entraining any in-scope Object.prototype. The loss of
> * Namespace.prototype is not detectable, as there is no way to
> * refer to this instance in scripts. When used to qualify method
> * names, its prefix and uri references are copied to the QName.
> */
> OBJ_SET_PROTO(cx, obj, NULL);
> OBJ_SET_PARENT(cx, obj, NULL);
>
> JS_LOCK_GC(rt);
> if (!rt->functionNamespaceObject)
> rt->functionNamespaceObject = obj;
> else
> obj = rt->functionNamespaceObject;
> }
> JS_UNLOCK_GC(rt);
7731a7752
> JSBool ok;
7732a7754
> /* Optimize by avoiding JS_LOCK_GC(rt) for the common case. */
7736,7739c7758,7761
< qn = js_NewXMLQName(cx, rt->emptyString, rt->emptyString,
< ATOM_TO_STRING(rt->atomState.starAtom));
< if (!qn)
< return JS_FALSE;
---
> JS_LOCK_GC(rt);
> obj = rt->anynameObject;
> if (!obj) {
> JS_UNLOCK_GC(rt);
7741,7757c7763,7811
< obj = js_NewObject(cx, &js_AnyNameClass, NULL, NULL);
< if (!obj || !JS_SetPrivate(cx, obj, qn)) {
< cx->newborn[GCX_OBJECT] = NULL;
< return JS_FALSE;
< }
< qn->object = obj;
< METER(xml_stats.qnameobj);
< METER(xml_stats.liveqnameobj);
<
< /*
< * Avoid entraining any in-scope Object.prototype. This loses the
< * default toString inheritance, but no big deal: we want a better
< * custom one for clearer diagnostics.
< */
< if (!JS_DefineFunction(cx, obj, js_toString_str, anyname_toString,
< 0, 0)) {
< return JS_FALSE;
---
> /*
> * Protect multiple newborns created below, in the do-while(0)
> * loop used to ensure that we leave this local root scope.
> */
> if (!js_EnterLocalRootScope(cx))
> return JS_FALSE;
>
> do {
> qn = js_NewXMLQName(cx, rt->emptyString, rt->emptyString,
> ATOM_TO_STRING(rt->atomState.starAtom));
> if (!qn) {
> ok = JS_FALSE;
> break;
> }
>
> obj = js_NewObject(cx, &js_AnyNameClass, NULL, NULL);
> if (!obj || !JS_SetPrivate(cx, obj, qn)) {
> cx->newborn[GCX_OBJECT] = NULL;
> ok = JS_FALSE;
> break;
> }
> qn->object = obj;
> METER(xml_stats.qnameobj);
> METER(xml_stats.liveqnameobj);
>
> /*
> * Avoid entraining any Object.prototype found via cx's scope
> * chain or global object. This loses the default toString,
> * but no big deal: we want to customize toString anyway for
> * clearer diagnostics.
> */
> if (!JS_DefineFunction(cx, obj, js_toString_str,
> anyname_toString, 0, 0)) {
> ok = JS_FALSE;
> break;
> }
> OBJ_SET_PROTO(cx, obj, NULL);
> JS_ASSERT(!OBJ_GET_PARENT(cx, obj));
> } while (0);
>
> js_LeaveLocalRootScopeWithResult(cx, OBJECT_TO_JSVAL(obj));
> if (!ok)
> return JS_FALSE;
>
> JS_LOCK_GC(rt);
> if (!rt->anynameObject)
> rt->anynameObject = obj;
> else
> obj = rt->anynameObject;
7759,7761c7813
< OBJ_SET_PROTO(cx, obj, NULL);
< JS_ASSERT(!OBJ_GET_PARENT(cx, obj));
< rt->anynameObject = obj;
---
> JS_UNLOCK_GC(rt);