Title: [165066] trunk/Source/_javascript_Core
Revision
165066
Author
[email protected]
Date
2014-03-04 11:56:01 -0800 (Tue, 04 Mar 2014)

Log Message

Fix too-narrow assertion I added in r165054.

It's okay for a 1-character string to come in here. This will happen
if the VM small string optimization doesn't apply (ch > 0xFF)

* runtime/JSString.h:
(JSC::jsStringWithWeakOwner):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (165065 => 165066)


--- trunk/Source/_javascript_Core/ChangeLog	2014-03-04 19:53:26 UTC (rev 165065)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-03-04 19:56:01 UTC (rev 165066)
@@ -1,5 +1,15 @@
 2014-03-04  Andreas Kling  <[email protected]>
 
+        Fix too-narrow assertion I added in r165054.
+
+        It's okay for a 1-character string to come in here. This will happen
+        if the VM small string optimization doesn't apply (ch > 0xFF)
+
+        * runtime/JSString.h:
+        (JSC::jsStringWithWeakOwner):
+
+2014-03-04  Andreas Kling  <[email protected]>
+
         Micro-optimize Strings in JS bindings.
         <https://webkit.org/b/129673>
 

Modified: trunk/Source/_javascript_Core/runtime/JSString.h (165065 => 165066)


--- trunk/Source/_javascript_Core/runtime/JSString.h	2014-03-04 19:53:26 UTC (rev 165065)
+++ trunk/Source/_javascript_Core/runtime/JSString.h	2014-03-04 19:56:01 UTC (rev 165066)
@@ -415,10 +415,8 @@
     inline JSString* jsStringWithWeakOwner(VM& vm, StringImpl& stringImpl)
     {
         WeakHandleOwner* jsStringWeakOwner = vm.jsStringWeakOwner.get();
+        ASSERT(stringImpl.length() > 0);
 
-        // Should have picked a VM-global empty or single-character string already.
-        ASSERT(stringImpl.length() > 1);
-
         // If this VM is not allowed to weakly own strings just make a new JSString.
         if (!jsStringWeakOwner)
             return JSString::create(vm, &stringImpl);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to