Title: [241236] trunk/Source/_javascript_Core
Revision
241236
Author
[email protected]
Date
2019-02-08 23:43:26 -0800 (Fri, 08 Feb 2019)

Log Message

[JSC] CachedTypes should use jsString instead of JSString::create
https://bugs.webkit.org/show_bug.cgi?id=194471

Reviewed by Mark Lam.

Use jsString() here because JSString::create is a bit low-level API and it requires some invariant like "length is not zero".

* runtime/CachedTypes.cpp:
(JSC::CachedJSValue::decode const):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (241235 => 241236)


--- trunk/Source/_javascript_Core/ChangeLog	2019-02-09 07:04:47 UTC (rev 241235)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-02-09 07:43:26 UTC (rev 241236)
@@ -1,5 +1,17 @@
 2019-02-08  Yusuke Suzuki  <[email protected]>
 
+        [JSC] CachedTypes should use jsString instead of JSString::create
+        https://bugs.webkit.org/show_bug.cgi?id=194471
+
+        Reviewed by Mark Lam.
+
+        Use jsString() here because JSString::create is a bit low-level API and it requires some invariant like "length is not zero".
+
+        * runtime/CachedTypes.cpp:
+        (JSC::CachedJSValue::decode const):
+
+2019-02-08  Yusuke Suzuki  <[email protected]>
+
         [JSC] Increase StructureIDTable initial capacity
         https://bugs.webkit.org/show_bug.cgi?id=194468
 

Modified: trunk/Source/_javascript_Core/runtime/CachedTypes.cpp (241235 => 241236)


--- trunk/Source/_javascript_Core/runtime/CachedTypes.cpp	2019-02-09 07:04:47 UTC (rev 241235)
+++ trunk/Source/_javascript_Core/runtime/CachedTypes.cpp	2019-02-09 07:43:26 UTC (rev 241236)
@@ -1112,8 +1112,8 @@
             v = this->buffer<CachedSymbolTable>()->decode(decoder);
             break;
         case EncodedType::String: {
-            UniquedStringImpl* impl = this->buffer<CachedUniquedStringImpl>()->decode(decoder);
-            v = JSString::create(decoder.vm(), adoptRef(*impl));
+            StringImpl* impl = this->buffer<CachedUniquedStringImpl>()->decode(decoder);
+            v = jsString(&decoder.vm(), adoptRef(*impl));
             break;
         }
         case EncodedType::ImmutableButterfly:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to