Closed Bug 1331949 Opened 8 years ago Closed 8 years ago

ServiceWorker and Cache code fails to compile with MOZ_DIAGNOSTIC_ASSERT disabled

Categories

(Core :: DOM: Service Workers, defect)

Unspecified
Windows 7
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox-esr45 --- unaffected
firefox50 --- unaffected
firefox51 --- unaffected
firefox52 --- fixed
firefox53 --- fixed

People

(Reporter: bkelly, Assigned: bkelly)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1330984 +++

Forked from bug 1330984 comment 8:

::: dom/workers/test/gtest/TestReadWrite.cpp
@@ +25,5 @@
>    ServiceWorkerRegistrarTest()
>    {
>      nsresult rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR,
>                                         getter_AddRefs(mProfileDir));
> +    MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv));

This will break when reaching beta, with:

/home/worker/workspace/build/src/dom/workers/test/gtest/TestReadWrite.cpp:27:14: error: unused variable 'rv' [-Werror,-Wunused-variable]
This affects more places in bug 1328686 as well.
Blocks: 1328686
Summary: ServiceWorkerRegistrar fails to compile with MOZ_DIAGNOSTIC_ASSERT disabled → ServiceWorker and Cache code fails to compile with MOZ_DIAGNOSTIC_ASSERT disabled
I think this should do it.  I'm not actually clear how to simulate the "merge to beta" on my aurora tree.
Attachment #8828130 - Flags: review?(bugmail)
Comment on attachment 8828130 [details] [diff] [review]
Make service worker and cache diagnostic assert code compile on beta. r=asuth

Review of attachment 8828130 [details] [diff] [review]:
-----------------------------------------------------------------

It took some false-starts, but I am able to simulate the beta/release build failure by:
- creating a build without --enable-debug
- in build/defines.sh set EARLY_BETA_OR_EARLIER=0 (previously it was =1)[1]
- in config/milestone.txt changing 53.0a1 to 53.0b1
Then when I do "mach configure" and check OBJDIR/mozilla-config.h I see I have "#define RELEASE_OR_BETA 1" in there.

The simulated beta/release build then failed without this patch and passed with it.  Apologies for not helping catch these in the original set of reviews; I think I just assumed there was a build permutation that existed to catch this class of bug.

1: According to comments in https://hg.mozilla.org/mozilla-central/file/tip/browser/config/mozconfigs/macosx-universal/release, doing export BUILDING_RELEASE=1 can override the failure to zero EARLY_BETA_OR_EARLIER.
Attachment #8828130 - Flags: review?(bugmail) → review+
Comment on attachment 8828130 [details] [diff] [review]
Make service worker and cache diagnostic assert code compile on beta. r=asuth

Approval Request Comment
[Feature/Bug causing the regression]: Bug 1328686 and bug 1330984
[User impact if declined]: FF52 won't build when it merges to beta channel
[Is this code covered by automated tests?]: We have extensive tests for this code
[Has the fix been verified in Nightly?]: asuth helped me verify this fixes the problem
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: No
[Is the change risky?]: Minimal risk
[Why is the change risky/not risky?]: This fixes some of our conditional compilation for assertions to still work on beta where the assertions are disabled.  Very low risk of regressions.
[String changes made/needed]: None
Attachment #8828130 - Flags: approval-mozilla-aurora?
Pushed by bkelly@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3174a6f74014
Make service worker and cache diagnostic assert code compile on beta. r=asuth
https://hg.mozilla.org/mozilla-central/rev/3174a6f74014
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
we need to uplift this too, to avoid bustage on merge day
Flags: needinfo?(bkelly)
(In reply to Carsten Book [:Tomcat] from comment #8)
> we need to uplift this too, to avoid bustage on merge day

oh already done in comment #4
Flags: needinfo?(bkelly)
Comment on attachment 8828130 [details] [diff] [review]
Make service worker and cache diagnostic assert code compile on beta. r=asuth

avoid bustage next week, aurora52+
Attachment #8828130 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: