If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

test-content-worker.test:setTimeout are unregistered on content unload: failure

RESOLVED FIXED

Status

Add-on SDK
General
P1
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: KWierso, Assigned: ochameau)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
When bug 752877 landed, it made this test start failing, turning our (recently-turned green) testrun orange.

info: executing 'test-content-worker.test:setTimeout are unregistered on content unload'
info: pass: New document has not been modified
info: pass: Nor previous one
error: TEST FAILED: test-content-worker.test:setTimeout are unregistered on content unload (failure)
error: fail: function failed to throw exception
info: Traceback (most recent call last):
  File "resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/lib/timer.js", line 28, in notify
    callback.apply(null, args);
  File "resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/tests/test-content-worker.js", line 478, in null
    }, "can't access dead object");
  File "resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/lib/unit-test.js", line 113, in assertRaises
    this.fail("function failed to throw exception");
  File "resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/lib/unit-test.js", line 69, in fail
    this.console.trace();
console: [JavaScript Warning: "ReferenceError: reference to undefined property "failure"" {file: "resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/lib/cuddlefish.js -> resource://65919bdb-e03b-4811-b604-24a535c694cd-at-jetpack/api-utils/lib/unit-test.js" line: 46}]
(Assignee)

Comment 1

5 years ago
Created attachment 622730 [details]
Pull request 435

I'm not able to reproduce it by testing against today's nightly or inbound builds.
But we can get rid of this test. This exception is now fired after window destroy event so that it shouldn't hurt us anymore.
Assignee: nobody → poirot.alex
Attachment #622730 - Flags: review?(rFobic)
(Reporter)

Comment 2

5 years ago
I can reproduce with today's Nightly using github master here on Windows. Haven't tried Linux.
(Reporter)

Updated

5 years ago
Priority: -- → P1

Comment 3

5 years ago
If you want to fix the test rather than removing it, I imagine a setTimeout 0 would make it pass again.
Attachment #622730 - Flags: review?(rFobic) → review+
(Reporter)

Comment 4

5 years ago
(In reply to Jesse Ruderman from comment #3)
> If you want to fix the test rather than removing it, I imagine a setTimeout
> 0 would make it pass again.

After changing either/both of the setTimeout()s in that test to 0, the test is still failing with the same error. (39 out of 40 tests pass in test-content-worker)

After applying Alex's patch to remove the test (with both setTimeout()s still set to 100), 39/39 tests pass in test-content-worker.

Comment 5

5 years ago
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/8e801428f6d8f1e9f06f18aa2142f0596d48cf9f
Bug 753621: Remove explicit test of "dead object" exception as it is now harder
to test and have a better behavior thanks to bug 752877.

https://github.com/mozilla/addon-sdk/commit/01c75a6089bf6ee957e7b889b89e03ca15c2af94
Merge pull request #435 from ochameau/bug/753621-fix-test-content-worker

Bug 753621: Remove explicit test of "dead object" exception r=@gozala
(Assignee)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 6

5 years ago
(In reply to Wes Kocher (:KWierso) from comment #4)
> (In reply to Jesse Ruderman from comment #3)
> > If you want to fix the test rather than removing it, I imagine a setTimeout
> > 0 would make it pass again.
> 
> After changing either/both of the setTimeout()s in that test to 0, the test
> is still failing with the same error. (39 out of 40 tests pass in
> test-content-worker)
> 
> After applying Alex's patch to remove the test (with both setTimeout()s
> still set to 100), 39/39 tests pass in test-content-worker.

I don't mean changing timeouts from 100 to 0. I mean adding a new setTimeout 0 (a return to the event loop) to account for the change in bug 752877.

Comment 7

5 years ago
Commits pushed to stabilization at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/8e801428f6d8f1e9f06f18aa2142f0596d48cf9f
Bug 753621: Remove explicit test of "dead object" exception as it is now harder

https://github.com/mozilla/addon-sdk/commit/01c75a6089bf6ee957e7b889b89e03ca15c2af94
Merge pull request #435 from ochameau/bug/753621-fix-test-content-worker
You need to log in before you can comment on or make changes to this bug.