Ignore:
Timestamp:
Dec 9, 2016, 10:04:28 PM (9 years ago)
Author:
[email protected]
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 <[email protected]> on 2016-12-09
Reviewed by Darin Adler.

  • bindings/ScriptValue.cpp:

(Inspector::jsToInspectorValue):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bindings/ScriptValue.cpp

    r207229 r209650  
    5454
    5555    if (value.isUndefinedOrNull())
    56         return InspectorValue::null(); // FIXME: Why is it OK to turn undefined into null?
     56        return InspectorValue::null();
    5757    if (value.isBoolean())
    5858        return InspectorValue::create(value.asBoolean());
Note: See TracChangeset for help on using the changeset viewer.