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
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla10
Assigned To: Henri Sivonen (:hsivonen)
: Andrew Overholt [:overholt]
Depends on:
Blocks: 651072 687087
  Show dependency treegraph
Reported: 2011-10-06 06:48 PDT by Henri Sivonen (:hsivonen)
Modified: 2011-11-16 05:46 PST (History)
7 users (show)
hsivonen: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Use = instead of ==, with a test (3.42 KB, patch)
2011-10-07 03:08 PDT, Henri Sivonen (:hsivonen)
bugs: review+
asa: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description User image Henri Sivonen (:hsivonen) 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 User image Olli Pettay [:smaug] 2011-10-06 07:04:49 PDT
Need to fix this asap, since Bug 687087 is in Aurora.
Comment 2 User image Henri Sivonen (:hsivonen) 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 User image Henri Sivonen (:hsivonen) 2011-10-07 04:35:57 PDT
Comment 4 User image Henri Sivonen (:hsivonen) 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 User image Matt Brubeck (:mbrubeck) 2011-10-07 12:41:53 PDT
Comment 6 User image Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 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 User image Henri Sivonen (:hsivonen) 2011-10-12 04:22:10 PDT
Comment 8 User image 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.