Title: [260693] trunk/Source/_javascript_Core
Revision
260693
Author
[email protected]
Date
2020-04-25 00:47:34 -0700 (Sat, 25 Apr 2020)

Log Message

Fix internal build by using strcmp instead of using string literal comparison
https://bugs.webkit.org/show_bug.cgi?id=211011

Reviewed by Keith Miller.

Use strcmp for string literal comparison to expect that this is fully handled by compiler and converted into constant at compile time.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (260692 => 260693)


--- trunk/Source/_javascript_Core/ChangeLog	2020-04-25 07:24:07 UTC (rev 260692)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-04-25 07:47:34 UTC (rev 260693)
@@ -1,3 +1,15 @@
+2020-04-24  Yusuke Suzuki  <[email protected]>
+
+        Fix internal build by using strcmp instead of using string literal comparison
+        https://bugs.webkit.org/show_bug.cgi?id=211011
+
+        Reviewed by Keith Miller.
+
+        Use strcmp for string literal comparison to expect that this is fully handled by compiler and converted into constant at compile time.
+
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::init):
+
 2020-04-24  Mark Lam  <[email protected]>
 
         Suppress ASan on DFG::clobberize() to work around an ASan bug.

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (260692 => 260693)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2020-04-25 07:24:07 UTC (rev 260692)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2020-04-25 07:47:34 UTC (rev 260693)
@@ -1243,7 +1243,7 @@
             [] (LazyClassStructure::Initializer& init) { \
                 init.setPrototype(capitalName##Prototype::create(init.vm, init.global, capitalName##Prototype::createStructure(init.vm, init.global, init.global->prototypeBase ## Prototype()))); \
                 init.setStructure(instanceType::createStructure(init.vm, init.global, init.prototype)); \
-                auto* constructorPrototype = #prototypeBase == "error" ? init.global->m_errorStructure.constructor(init.global) : init.global->functionPrototype(); \
+                auto* constructorPrototype = strcmp(#prototypeBase, "error") == 0 ? init.global->m_errorStructure.constructor(init.global) : init.global->functionPrototype(); \
                 init.setConstructor(capitalName ## Constructor::create(init.vm, capitalName ## Constructor::createStructure(init.vm, init.global, constructorPrototype), jsCast<capitalName ## Prototype*>(init.prototype))); \
             }); \
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to