Closed
Bug 1313470
Opened 9 years ago
Closed 9 years ago
Convert XPCOM test TestCOMPtr to a gtest
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: erahm, Assigned: erahm)
References
Details
Attachments
(3 files)
23.90 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
5.04 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
19.08 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
Convert xpcom/tests/TestCOMPtr.cpp to a gtest and move to xpcom/tests/gtest/.
Assignee | ||
Comment 1•9 years ago
|
||
This is just whitespace changes with a few minor deletions.
MozReview-Commit-ID: A7fpHLqt5fU
Attachment #8806112 -
Flags: review?(nfroyd)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → erahm
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
This just splits out test functions, no logic is changed.
MozReview-Commit-ID: EjGYyUjf1b2
Attachment #8806113 -
Flags: review?(nfroyd)
Assignee | ||
Comment 3•9 years ago
|
||
MozReview-Commit-ID: HfcLTmvkRc8
Attachment #8806114 -
Flags: review?(nfroyd)
![]() |
||
Comment 4•9 years ago
|
||
Comment on attachment 8806112 [details] [diff] [review]
Part 0: Cleanup indentation
Review of attachment 8806112 [details] [diff] [review]:
-----------------------------------------------------------------
Please delete trailing whitespace while you are here.
Attachment #8806112 -
Flags: review?(nfroyd) → review+
![]() |
||
Updated•9 years ago
|
Attachment #8806113 -
Flags: review?(nfroyd) → review+
![]() |
||
Updated•9 years ago
|
Attachment #8806114 -
Flags: review?(nfroyd) → review+
Assignee | ||
Comment 5•9 years ago
|
||
(In reply to Nathan Froyd [:froydnj] from comment #4)
> Comment on attachment 8806112 [details] [diff] [review]
> Part 0: Cleanup indentation
>
> Review of attachment 8806112 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Please delete trailing whitespace while you are here.
The offending line gets deleted later in the patchset.
Assignee | ||
Comment 6•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/e7d5b8135ae61384a51c0b909e5eb2aac9e6e035
Bug 1313470 - Part 0: Cleanup indentation. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/f012923cfd8b903bc342910ec81cff508624906a
Bug 1313470 - Part 1: Split out test functions. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/00f7b342bb29c4f26c7e78fade11b631054aadc4
Bug 1313470 - Part 2: Convert TestCOMPtr to a gtest. r=froydnj
Comment 7•9 years ago
|
||
Assignee | ||
Comment 8•9 years ago
|
||
I can't repro this locally with an OSX debug build.
Relevant log snippet:
> 21:06:34 INFO - TEST-START | COMPtr.Bloat_Smart
> 21:06:34 INFO - [2276] ###!!! ASSERTION: QueryInterface needed: 'query_result.get() == mRawPtr', file /builds/slave/m-in-m64-d-0000000000000000000/build/src/obj-firefox/dist/include/nsCOMPtr.h, line 414
> 21:07:04 INFO - #01: COMPtr_Bloat_Smart_Test::TestBody() [xpcom/tests/gtest/TestCOMPtr.cpp:234]
So |COMPtr.Bloat_Smart| is crashing at:
> nsresult rv = CreateIBar( getter_AddRefs(barP) );
Where CreateIBar looks like:
> CreateIBar( void** result )
> {
> IBar* barp = new IBar;
> barp->AddRef();
> *result = barp;
> return NS_OK;
> }
The assertion is in:
> void Assert_NoQueryNeeded()
> {
> if (mRawPtr) {
> nsCOMPtr<T> query_result(do_QueryInterface(mRawPtr));
> NS_ASSERTION(query_result.get() == mRawPtr, "QueryInterface needed");
> }
> }
Assignee | ||
Comment 9•9 years ago
|
||
Okay I can repro with the whole patchset applied which implies some misbehavior from having multiple file-scoped definitions of IFoo or IBar.
Assignee | ||
Comment 10•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/351981a14a43bb1902746687609d7aeaf1168c0a
Bug 1313470 - Part 0: Cleanup indentation. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/733ef60958c16161f51d2c345e6ac6c2fb8bedcb
Bug 1313470 - Part 1: Split out test functions. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/fa89c7fb96577c9eeb930279e30d9d6ab37baf7c
Bug 1313470 - Part 2: Convert TestCOMPtr to a gtest. r=froydnj
Comment 11•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/351981a14a43
https://hg.mozilla.org/mozilla-central/rev/733ef60958c1
https://hg.mozilla.org/mozilla-central/rev/fa89c7fb9657
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Assignee | ||
Comment 12•9 years ago
|
||
For posterity: my fix was just to move the support code into a private namespace.
You need to log in
before you can comment on or make changes to this bug.
Description
•