Opened on 12/04/2017 at 02:14:27 PM
Closed on 02/13/2018 at 09:33:36 PM
#6138 closed defect (worksforme)
[emscripten] DependentString constructor creates a valid empty string if constructed from an invalid DependentString() instance
Reported by: | sergz | Assignee: | hfiguiere |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Core | Keywords: | |
Cc: | hfiguiere | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description (last modified by hfiguiere)
Noticed in https://codereview.adblockplus.org/29572731/diff/29581584/compiled/StringMap.h#newcode32.
DependentString constructor should set flags in accordance to the flags of a source object and the type of the argument (the latter it just for reference, since it's already done).
Attachments (0)
Change History (5)
comment:1 Changed on 12/04/2017 at 03:44:43 PM by hfiguiere
- Description modified (diff)
- Summary changed from DepedentString constructor creates a valid empty string if constructed from an invalid DependentString() instance to [emscripten] DependentString constructor creates a valid empty string if constructed from an invalid DependentString() instance
comment:2 Changed on 12/04/2017 at 03:49:12 PM by hfiguiere
comment:3 Changed on 12/05/2017 at 03:10:24 PM by hfiguiere
- Owner set to hfiguiere
comment:4 Changed on 12/21/2017 at 11:26:28 AM by fhd
- Cc trev removed
comment:5 Changed on 02/13/2018 at 09:33:36 PM by hfiguiere
- Resolution set to worksforme
- Status changed from new to closed
From the test we have I believe this bug is no more.
There is an implicit copy constructor called that does the job.
See https://hg.adblockplus.org/adblockpluscore/file/a798e9a8a351/test/compiled/String.cpp#l30
Note: See
TracTickets for help on using
tickets.
Also OwnedString() make a "valid" string. (there is no default constructor, but one that has a default argument value), which break if we'd try to have a StringMap with OwnedString as a key.
https://codereview.adblockplus.org/29587914/diff/29618581/compiled/String.h#newcode284