Title: [209650] trunk/Source/_javascript_Core
Revision
209650
Author
commit-qu...@webkit.org
Date
2016-12-09 22:04:28 -0800 (Fri, 09 Dec 2016)

Log Message

It is okay to turn undefined into null because we are producing values for a
JSON representation (InspectorValue) and JSON has a `null` value and no
`undefined` value.
https://bugs.webkit.org/show_bug.cgi?id=165506

Patch by Karim H <ka...@karhm.com> on 2016-12-09
Reviewed by Darin Adler.

* bindings/ScriptValue.cpp:
(Inspector::jsToInspectorValue):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (209649 => 209650)


--- trunk/Source/_javascript_Core/ChangeLog	2016-12-10 05:56:13 UTC (rev 209649)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-12-10 06:04:28 UTC (rev 209650)
@@ -1,3 +1,15 @@
+2016-12-09  Karim H  <ka...@karhm.com>
+
+        It is okay to turn undefined into null because we are producing values for a
+        JSON representation (InspectorValue) and JSON has a `null` value and no
+        `undefined` value.
+        https://bugs.webkit.org/show_bug.cgi?id=165506
+
+        Reviewed by Darin Adler.
+
+        * bindings/ScriptValue.cpp:
+        (Inspector::jsToInspectorValue):
+
 2016-12-09  Filip Pizlo  <fpi...@apple.com>
 
         REGRESSION (r209554-209571): stress/poly-setter-combo crashing

Modified: trunk/Source/_javascript_Core/bindings/ScriptValue.cpp (209649 => 209650)


--- trunk/Source/_javascript_Core/bindings/ScriptValue.cpp	2016-12-10 05:56:13 UTC (rev 209649)
+++ trunk/Source/_javascript_Core/bindings/ScriptValue.cpp	2016-12-10 06:04:28 UTC (rev 209650)
@@ -53,7 +53,7 @@
     maxDepth--;
 
     if (value.isUndefinedOrNull())
-        return InspectorValue::null(); // FIXME: Why is it OK to turn undefined into null?
+        return InspectorValue::null();
     if (value.isBoolean())
         return InspectorValue::create(value.asBoolean());
     if (value.isNumber() && value.isDouble())
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to