diff options
Diffstat (limited to 'src/3rdparty/javascriptcore/JavaScriptCore/runtime')
4 files changed, 14 insertions, 7 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp index 747c4ac..0702c42 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp @@ -195,7 +195,7 @@ PassRefPtr<UString::Rep> Identifier::add(JSGlobalData* globalData, const UChar* UString::Rep::empty().hash(); return &UString::Rep::empty(); } - UCharBuffer buf = {s, length}; + UCharBuffer buf = {s, static_cast<unsigned>(length)}; pair<HashSet<UString::Rep*>::iterator, bool> addResult = globalData->identifierTable->add<UCharBuffer, UCharBufferTranslator>(buf); // If the string is newly-translated, then we need to adopt it. diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp index b089584..daacbdb 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp @@ -320,7 +320,11 @@ void Stringifier::appendQuotedString(StringBuilder& builder, const UString& valu default: static const char hexDigits[] = "0123456789abcdef"; UChar ch = data[i]; - UChar hex[] = { '\\', 'u', hexDigits[(ch >> 12) & 0xF], hexDigits[(ch >> 8) & 0xF], hexDigits[(ch >> 4) & 0xF], hexDigits[ch & 0xF] }; + UChar hex[] = { '\\', 'u', + static_cast<UChar>(hexDigits[(ch >> 12) & 0xF]), + static_cast<UChar>(hexDigits[(ch >> 8) & 0xF]), + static_cast<UChar>(hexDigits[(ch >> 4) & 0xF]), + static_cast<UChar>(hexDigits[ch & 0xF]) }; builder.append(hex, sizeof(hex) / sizeof(UChar)); break; } diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp index bf49a15..307b1f7 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp @@ -156,9 +156,10 @@ Structure::Structure(JSValue prototype, const TypeInfo& typeInfo) Structure::~Structure() { if (m_previous) { - if (m_nameInPrevious) - m_previous->table.remove(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(m_nameInPrevious.get()), m_attributesInPrevious), m_specificValueInPrevious); - else + if (m_nameInPrevious) { + unsigned attrInPrev = m_attributesInPrevious; + m_previous->table.remove(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(m_nameInPrevious.get()), attrInPrev), m_specificValueInPrevious); + } else m_previous->table.removeAnonymousSlotTransition(m_anonymousSlotsInPrevious); } diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h index 7571efc..a8deb5e 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h @@ -316,8 +316,10 @@ namespace JSC { Structure* existingTransition = singleTransition(); TransitionTable* transitionTable = new TransitionTable; setTransitionTable(transitionTable); - if (existingTransition) - add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(existingTransition->m_nameInPrevious.get()), existingTransition->m_attributesInPrevious), existingTransition, existingTransition->m_specificValueInPrevious); + if (existingTransition) { + const unsigned attrsInPrev = existingTransition->m_attributesInPrevious; + add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(existingTransition->m_nameInPrevious.get()), attrsInPrev), existingTransition, existingTransition->m_specificValueInPrevious); + } } } // namespace JSC |