Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/system/ParamNode.cpp
Show First 20 Lines • Show All 374 Lines • ▼ Show 20 Lines | if (m_Childs.empty()) | ||||
if (m_Value.empty()) | if (m_Value.empty()) | ||||
{ | { | ||||
ret.setUndefined(); | ret.setUndefined(); | ||||
return; | return; | ||||
} | } | ||||
// Just a string | // Just a string | ||||
utf16string text(m_Value.begin(), m_Value.end()); | utf16string text(m_Value.begin(), m_Value.end()); | ||||
JS::RootedString str(cx, JS_InternUCStringN(cx, reinterpret_cast<const char16_t*>(text.data()), text.length())); | JS::RootedString str(cx, JS_AtomizeAndPinUCStringN(cx, reinterpret_cast<const char16_t*>(text.data()), text.length())); | ||||
elexis: Check, this function was renamed according to https://developer.mozilla.org/en… | |||||
if (str) | if (str) | ||||
{ | { | ||||
ret.setString(str); | ret.setString(str); | ||||
return; | return; | ||||
} | } | ||||
// TODO: report error | // TODO: report error | ||||
ret.setUndefined(); | ret.setUndefined(); | ||||
return; | return; | ||||
Show All 18 Lines | if (!JS_SetProperty(cx, obj, it->first.c_str(), childVal)) | ||||
return; // TODO: report error | return; // TODO: report error | ||||
} | } | ||||
} | } | ||||
// If the node has a string too, add that as an extra property | // If the node has a string too, add that as an extra property | ||||
if (!m_Value.empty()) | if (!m_Value.empty()) | ||||
{ | { | ||||
utf16string text(m_Value.begin(), m_Value.end()); | utf16string text(m_Value.begin(), m_Value.end()); | ||||
JS::RootedString str(cx, JS_InternUCStringN(cx, reinterpret_cast<const char16_t*>(text.data()), text.length())); | JS::RootedString str(cx, JS_AtomizeAndPinUCStringN(cx, reinterpret_cast<const char16_t*>(text.data()), text.length())); | ||||
wraitiiUnsubmitted Not Done Inline ActionsRenamed, see change log. wraitii: Renamed, see change log. | |||||
if (!str) | if (!str) | ||||
{ | { | ||||
ret.setUndefined(); | ret.setUndefined(); | ||||
return; // TODO: report error | return; // TODO: report error | ||||
} | } | ||||
JS::RootedValue childVal(cx, JS::StringValue(str)); | JS::RootedValue childVal(cx, JS::StringValue(str)); | ||||
if (!JS_SetProperty(cx, obj, "_string", childVal)) | if (!JS_SetProperty(cx, obj, "_string", childVal)) | ||||
Show All 13 Lines |
Wildfire Games · Phabricator
Check, this function was renamed according to https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/45