mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Support non-flat strings in Any_getelem and Any_setelem.
This commit is contained in:
parent
80ab94547d
commit
b6bc18350b
@ -222,7 +222,7 @@ CPPSRCS += \
|
||||
|
||||
ifdef DEBUG
|
||||
EXPORTS += nanojit/TraceTreeDrawer.h
|
||||
CPPSRCS += nanojit/TraceTreeDrawer.cpp nanojit/Tests.cpp
|
||||
CPPSRCS += nanojit/TraceTreeDrawer.cpp
|
||||
endif
|
||||
|
||||
DEFINES += -DFEATURE_NANOJIT -DJS_TRACER
|
||||
|
@ -302,6 +302,8 @@ jsval FASTCALL
|
||||
js_Any_getelem(JSContext* cx, JSObject* obj, JSString* idstr)
|
||||
{
|
||||
jsval v;
|
||||
if (!JSSTRING_IS_FLAT(idstr) && !js_UndependString(cx, idstr))
|
||||
return JSVAL_ERROR_COOKIE;
|
||||
if (!OBJ_GET_PROPERTY(cx, obj, ATOM_TO_JSID(STRING_TO_JSVAL(idstr)), &v))
|
||||
return JSVAL_ERROR_COOKIE;
|
||||
return v;
|
||||
@ -310,6 +312,8 @@ js_Any_getelem(JSContext* cx, JSObject* obj, JSString* idstr)
|
||||
bool FASTCALL
|
||||
js_Any_setelem(JSContext* cx, JSObject* obj, JSString* idstr, jsval v)
|
||||
{
|
||||
if (!JSSTRING_IS_FLAT(idstr) && !js_UndependString(cx, idstr))
|
||||
return false;
|
||||
return OBJ_SET_PROPERTY(cx, obj, ATOM_TO_JSID(STRING_TO_JSVAL(idstr)), &v);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user