Last Comment Bug 754457 - Disallow ErrorResult copy constructor
: Disallow ErrorResult copy constructor
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla15
Assigned To: Boris Zbarsky [:bz] (Out June 25-July 6)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-11 14:45 PDT by Boris Zbarsky [:bz] (Out June 25-July 6)
Modified: 2012-05-16 03:40 PDT (History)
1 user (show)
bzbarsky: in‑testsuite?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Disallow copy-construction of ErrorResult, so it can only be passed by reference, not by value. (785 bytes, patch)
2012-05-11 14:47 PDT, Boris Zbarsky [:bz] (Out June 25-July 6)
peterv: review+
Details | Diff | Review

Description Boris Zbarsky [:bz] (Out June 25-July 6) 2012-05-11 14:45:51 PDT
I accidentally wrote a function that took an ErrorResult by value, not by reference.  This is busted, of course, because attempts to Throw() on the thing in the function won't be seen by the caller.

Patch coming up to disable the copy constructor for ErrorResult so this can't happen.
Comment 1 Boris Zbarsky [:bz] (Out June 25-July 6) 2012-05-11 14:47:01 PDT
Created attachment 623315 [details] [diff] [review]
Disallow copy-construction of ErrorResult, so it can only be passed by reference, not by value.
Comment 2 Boris Zbarsky [:bz] (Out June 25-July 6) 2012-05-15 11:29:52 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/095eef67ec7b
Comment 3 Ed Morley [:emorley] 2012-05-16 03:40:35 PDT
https://hg.mozilla.org/mozilla-central/rev/095eef67ec7b

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