Closed
Bug 1194115
Opened 11 years ago
Closed 11 years ago
test_promises_client_getdependentpromises.js throws tons of errors without failing
Categories
(DevTools :: Debugger, defect)
DevTools
Debugger
Tracking
(firefox43 fixed)
RESOLVED
FIXED
Firefox 43
| Tracking | Status | |
|---|---|---|
| firefox43 | --- | fixed |
People
(Reporter: ochameau, Assigned: ochameau)
References
Details
Attachments
(1 file, 1 obsolete file)
|
2.40 KB,
patch
|
jryans
:
review+
|
Details | Diff | Splinter Review |
I broke this test while working on bug 1192863 and the actual error I introduced, which was breaking the test was deeply hidden in tons of already existing errors, many related to strict warnings and lot of others related to the fact that we don't wait for chrome tabactor to be attached before playing with promise actor.
Promise actor call tabactor.sources.createSourceActors() which expect the tab actor to be already attached.
I'm really surprised this test pass with such failures!
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → poirot.alex
| Assignee | ||
Comment 1•11 years ago
|
||
| Assignee | ||
Comment 2•11 years ago
|
||
Comment on attachment 8647511 [details] [diff] [review]
patch v1
Review of attachment 8647511 [details] [diff] [review]:
-----------------------------------------------------------------
So. I'm also fixing *all* the strict warning that happen during this particular test.
But many of those happen in all xpcshelle (Loader.jsm one at least).
See comment 0 for why we need to attach the tabactor.
Attachment #8647511 -
Flags: review?(jryans)
Comment on attachment 8647511 [details] [diff] [review]
patch v1
Review of attachment 8647511 [details] [diff] [review]:
-----------------------------------------------------------------
Are you sure about this `appinfo` stuff? It seems like it should have a name[1]?
[1]: https://dxr.allizom.org/mozilla-central/source/testing/modules/AppInfo.jsm?offset=1000#19
::: toolkit/devtools/client/main.js
@@ +964,5 @@
> }
>
> // Only try to notify listeners on events, not responses to requests
> // that lack a packet type.
> + if ("type" in aPacket && aPacket.type) {
This one seems redundant, right? Can't you use `aPacket.type` for the other cases above too?
Attachment #8647511 -
Flags: review?(jryans)
| Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 8647511 [details] [diff] [review]
patch v1
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #3)
> Comment on attachment 8647511 [details] [diff] [review]
> patch v1
>
> Review of attachment 8647511 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Are you sure about this `appinfo` stuff? It seems like it should have a
> name[1]?
[1] Isn't always called. It is only loaded on-demand.
For example the webapps xpcshell test is doing that, but not this one.
I don't know exatly how is defined this appinfo on xpcshell.
Here is the keys available on appinfo object:
QueryInterface,inSafeMode,logConsoleErrors,OS,XPCOMABI,widgetToolkit,processType,processID,browserTabsRemoteAutostart,accessibilityEnabled,accessibilityIsBlacklistedForE10S,is64Bit,invalidateCachesOnRestart,ensureContentProcess,replacedLockTime,lastRunCrashID,isReleaseBuild,isOfficialBranding,defaultUpdateChannel,distributionID,isOfficial,PROCESS_TYPE_DEFAULT,PROCESS_TYPE_PLUGIN,PROCESS_TYPE_CONTENT,PROCESS_TYPE_IPDLUNITTEST,PROCESS_TYPE_GMPLUGIN
There is no `name` attribute.
>
> [1]:
> https://dxr.allizom.org/mozilla-central/source/testing/modules/AppInfo.
> jsm?offset=1000#19
>
> ::: toolkit/devtools/client/main.js
> @@ +964,5 @@
> > }
> >
> > // Only try to notify listeners on events, not responses to requests
> > // that lack a packet type.
> > + if ("type" in aPacket && aPacket.type) {
>
> This one seems redundant, right? Can't you use `aPacket.type` for the other
> cases above too?
No, unfortunately, the strict mode is really really strict. You shouldn't even try to access an attribute that doesn't exists. It is ok if it exists and has undefined/null value, but it's not ok if it doesn't exist.
Try to run this test without this patch (toolkit/devtools/server/tests/unit/test_promises_client_getdependentpromises.js)
You will see that in the console:
ReferenceError: reference to undefined property Services.appinfo.name
Attachment #8647511 -
Flags: review?(jryans)
Comment on attachment 8647511 [details] [diff] [review]
patch v1
Review of attachment 8647511 [details] [diff] [review]:
-----------------------------------------------------------------
Will wait for a patch without these strict fixes as discussed on IRC.
Attachment #8647511 -
Flags: review?(jryans)
| Assignee | ||
Comment 6•11 years ago
|
||
Let's just ignore strict warnings.
Instead, we should try to avoid displaying them at all instead of making out codebase complex.
Attachment #8647511 -
Attachment is obsolete: true
Attachment #8647599 -
Flags: review+
Status: NEW → RESOLVED
Closed: 11 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•