<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [TreatNullAs=NullString] should be renamed to [TreatNullAs=EmptyString] to match Web IDL"
   href="https://bugs.webkit.org/show_bug.cgi?id=154654#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [TreatNullAs=NullString] should be renamed to [TreatNullAs=EmptyString] to match Web IDL"
   href="https://bugs.webkit.org/show_bug.cgi?id=154654">bug 154654</a>
              from <span class="vcard"><a class="email" href="mailto:darin&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span></b>
        <pre>This doesn’t sound exactly right. Null string and empty string are not the same thing in the WebKit C++ DOM implementation. A function can tell the difference between an empty string and a null using the isNull function. It may be true that in some, even many, DOM function implementations, they are both treated the same. But [TreatNullAs=NullString] could be used to implement a form of &quot;nullable&quot; argument whereas [TreatNullAs=EmptyString] is clearly only useful when we actually want to handle the argument as the empty string.

I think you may be saying that all the places we are currently using [TreatNullAs=NullString], we could use [TreatNullAs=EmptyString] instead, and that may well be true. But it requires examining the functions to be sure.

There’s also an open question of whether the bindings should pass a null or empty WTF::String in these cases. It would be safer to pass an empty string if we really don’t want any chance that the C++ function accidentally handles a null differently than the empty string.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>