Last Comment Bug 692434 - == instead of = when trying to assign a new encoding name in XHR
: == instead of = when trying to assign a new encoding name in XHR
Status: RESOLVED FIXED
[qa-]
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla10
Assigned To: Henri Sivonen (:hsivonen) (Not doing reviews or reading bugmail until 2016-08-01)
:
Mentors:
http://hg.mozilla.org/mozilla-central...
Depends on:
Blocks: 651072 687087
  Show dependency treegraph
 
Reported: 2011-10-06 06:48 PDT by Henri Sivonen (:hsivonen) (Not doing reviews or reading bugmail until 2016-08-01)
Modified: 2011-11-16 05:46 PST (History)
7 users (show)
hsivonen: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
fixed


Attachments
Use = instead of ==, with a test (3.42 KB, patch)
2011-10-07 03:08 PDT, Henri Sivonen (:hsivonen) (Not doing reviews or reading bugmail until 2016-08-01)
bugs: review+
asa: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Henri Sivonen (:hsivonen) (Not doing reviews or reading bugmail until 2016-08-01) 2011-10-06 06:48:01 PDT
Bug 687087 introduced this:
if (mResponseCharset != document->GetDocumentCharacterSet()) {
  mResponseCharset == document->GetDocumentCharacterSet();

Should be
if (mResponseCharset != document->GetDocumentCharacterSet()) {
  mResponseCharset = document->GetDocumentCharacterSet();

(== vs. =)
Comment 1 Olli Pettay [:smaug] 2011-10-06 07:04:49 PDT
Need to fix this asap, since Bug 687087 is in Aurora.
Comment 2 Henri Sivonen (:hsivonen) (Not doing reviews or reading bugmail until 2016-08-01) 2011-10-07 03:08:10 PDT
Created attachment 565480 [details] [diff] [review]
Use = instead of ==, with a test

Taking. I need this fixed for bug 651072.
Comment 3 Henri Sivonen (:hsivonen) (Not doing reviews or reading bugmail until 2016-08-01) 2011-10-07 04:35:57 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/6bae7a490cb0
Comment 4 Henri Sivonen (:hsivonen) (Not doing reviews or reading bugmail until 2016-08-01) 2011-10-07 04:38:30 PDT
Comment on attachment 565480 [details] [diff] [review]
Use = instead of ==, with a test

Requesting approval for Aurora. The code that has the extra equals sign was recently introduced but has made it to Aurora already. Letting it get to release could at least in theory break cases where XHR is used for reading non-UTF-8 XML as text.
Comment 5 Matt Brubeck (:mbrubeck) 2011-10-07 12:41:53 PDT
https://hg.mozilla.org/mozilla-central/rev/6bae7a490cb0
Comment 6 Kyle Huey [:khuey] (khuey@mozilla.com) 2011-10-08 13:01:51 PDT
I wonder if we can make the compiler error here.  On Windows we're already erroring for "lvalue == rvalue;" for primitive types.
Comment 7 Henri Sivonen (:hsivonen) (Not doing reviews or reading bugmail until 2016-08-01) 2011-10-12 04:22:10 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/939e5e3e2015
Comment 8 Mihaela Velimiroviciu (:mihaelav) 2011-11-16 05:46:17 PST
[qa-] because of code related issue.

Note You need to log in before you can comment on or make changes to this bug.