-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert to async xhr #839
Convert to async xhr #839
Conversation
Resolves #820
Q: now that this is async, is there any waiting / coordinating we must do, to mitigate potential race conditions? |
@stefanpenner I'm not sure. I wrapped in a promise and made sure to wait for the promise to resolve before using the returned values, and everything seemed to work locally for me. I think it should work okay. |
@teddyzeenny mind taking a 👀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me 👍
app/adapters/web-extension.js
Outdated
}, | ||
|
||
canOpenResource: false, | ||
|
||
sendIframes(urls) { | ||
urls.forEach(url => { | ||
chrome.devtools.inspectedWindow.eval(loadEmberDebug(), { frameURL: url }); | ||
loadEmberDebug().then((emberDebug) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can load Ember Debug once and call the forEach inside then
.
* Convert to async xhr Resolves emberjs#820 * Move load outside forEach
Resolves #820
I think this should do the trick, but would love some eyes on this to let me know if I did anything dumb 😄