Making OwnPtr's operator== guards const.
Making OwnPtr's operator== guards const.

OwnPtr defines operator== to stop people from comparing two OwnPtr objects with
== (this makes sense as if two OwnPtr's pointed at the same thing then their
would be two owners of the same memory!).

However, these operator==s where not defined as const, so if one of your OwnPtr
objects was const then the guards where not matched. To make things worse,
OwnPtr defines a (const) conversion to bool and operator== does know compare two
bools!

The following example compiles and then doesn't do what you expect.

    const OwnPtr<MyClass> a = getOwnPtrA();
    OwnPtr<MyClass> b = getOwnPtrB();
    if (a == b) {
      // Body
    }

 1) a gets implicitly converted to a bool, which is true if ptr is not NULL.
 2) b gets implicitly converted to a bool, which is true if ptr is not NULL.
 3) true == true is true
 4) Even though a and b point at totally different things, the body of the if
    statement gets executed!

(Don't look like anyone has been silly enough to actually be hurt by this yet.)

R=abarth@chromium.org, enne@google.com
BUG=

Review URL: https://codereview.chromium.org/53173005

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@161080 bbb929c8-8fbe-4397-9dbb-9b2b20218538

primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs,primiano/blink-gitcs