Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to async xhr #839

Merged
merged 5 commits into from
Jul 27, 2018
Merged

Convert to async xhr #839

merged 5 commits into from
Jul 27, 2018

Conversation

RobbieTheWagner
Copy link
Member

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 馃槃

@stefanpenner
Copy link
Member

Q: now that this is async, is there any waiting / coordinating we must do, to mitigate potential race conditions?

@RobbieTheWagner
Copy link
Member Author

@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.

@stefanpenner
Copy link
Member

@teddyzeenny mind taking a 馃憖

Copy link
Contributor

@teddyzeenny teddyzeenny left a 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 馃憤

},

canOpenResource: false,

sendIframes(urls) {
urls.forEach(url => {
chrome.devtools.inspectedWindow.eval(loadEmberDebug(), { frameURL: url });
loadEmberDebug().then((emberDebug) => {
Copy link
Contributor

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.

@RobbieTheWagner RobbieTheWagner merged commit c207685 into master Jul 27, 2018
@RobbieTheWagner RobbieTheWagner deleted the async-xhr branch July 27, 2018 13:28
cyril-sf pushed a commit to cyril-sf/ember-inspector that referenced this pull request Mar 30, 2022
* Convert to async xhr

Resolves emberjs#820

* Move load outside forEach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants