Some ES module import failures aren't logged because of null Element
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: ochameau, Assigned: jonco)
Details
Attachments
(1 file)
8.71 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Reporter | ||
Comment 1•6 years ago
|
||
Reporter | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Hi, this check has been removed in a recent change. Is the problem still happening?
Reporter | ||
Comment 6•6 years ago
|
||
Sorry it took me so long to get back to you, but yes, the issue still occurs and makes it really hard to debug ES Modules for the debugger.
STR is the same: open the browser console, then open the debugger against any page => no error logged about the broken import path.
Here is an updated patch for debugger based on es-modules:
https://hg.mozilla.org/try/rev/7b4d1a89340d8464bef3cdda615f0664bae69880
This is based on top of https://hg.mozilla.org/mozilla-central/log/e43944736829dc575bb12821f0e28bf1bc02c285
This patch doesn't include any error, you have to introduce one yourself. Here is an example:
diff --git a/devtools/client/debugger/new/src/utils/bootstrap.js b/devtools/client/debugger/new/src/utils/bootstrap.js
index d3cdc7d9609e..efbeef9b7c3d 100644
--- a/devtools/client/debugger/new/src/utils/bootstrap.js
+++ b/devtools/client/debugger/new/src/utils/bootstrap.js
@@ -19,7 +19,7 @@ import reducers from "../reducers";
import * as selectors from "../selectors";
import App from "../components/App";
import { asyncStore, prefs } from "./prefs";
-import * as defaultActions from "../actions";
+import * as defaultActions from "../actionxxxs";
import { Provider } from "react-redux";
Assignee | ||
Comment 7•6 years ago
|
||
Thanks for checking. I've reproduced the problem locally and I'm investigating.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 8•6 years ago
|
||
The problem is that when we preload scripts, we don't know whether they will actually end up getting loaded, so we don't report errors for them. Then, if they are later used the error information has been lost.
The patch records unreported errors for preloaded scripts and and reports them at the point we decide to use the preload request.
This does generate a whole slew of errors for this particular case, but this is better than what we have now.
Using ES6 modules for the debugger is a pretty good test case and exposed a couple of places where ModuleLoadRequest methods can get called on a previously cancelled request. In debug builds this asserts when we call SetReady(). I added checks for these cases.
Updated•6 years ago
|
Comment 10•6 years ago
|
||
bugherder |
Comment 11•6 years ago
|
||
Thanks jonco, this reminds me of the issue we found with breakpoints and pre-loading this summer.
Description
•