Skip to content

move augmentClass definition above SyntheticEvent Proxy replacement - #10011

Merged
gaearon merged 1 commit into
react:masterfrom
walrusfruitcake:fix-syntheticevent-augmentclass-when-proxy
Jul 11, 2017
Merged

move augmentClass definition above SyntheticEvent Proxy replacement#10011
gaearon merged 1 commit into
react:masterfrom
walrusfruitcake:fix-syntheticevent-augmentclass-when-proxy

Conversation

@walrusfruitcake

Copy link
Copy Markdown
Contributor

Before submitting a pull request, please make sure the following is done:

  1. Fork the repository and create your branch from master.
  2. If you've added code that should be tested, add tests!
  3. If you've changed APIs, update the documentation.
  4. Ensure the test suite passes (npm test).
  5. Make sure your code lints (npm run lint).
  6. Format your code with prettier (npm run prettier).
  7. Run the Flow typechecks (npm run flow).
  8. If you added or removed any tests, run ./scripts/fiber/record-tests before submitting the pull request, and commit the resulting changes.
  9. If you haven't already, complete the CLA.

@aweary

Copy link
Copy Markdown
Contributor

The browser mentioned in #10010 is QTWebkit, which appears to be an unofficial fork of Webkit. While this change is trivial, I'm hesitant to include changes meant to address dev-only issues in unsupported browsers.

The usage of Proxy here appears to be correct, which indicates that the Proxy implementation GTWebkit is using is possibly incorrect (especially since this Proxy call has been working in Webkit browsers for a long time).

@gaearon

Copy link
Copy Markdown
Collaborator

We could get it in but there's no guarantee we won't break again.

postgres-mirror pushed a commit to pgadmin-org/pgadmin4 that referenced this pull request Jun 21, 2017
We learned that the underlying issue was related to react-dom's SyntheticEvent.augmentClass function being undefined.
This seems to be caused by attempted property assignment after the SyntheticEvent had been replaced by a Proxy of itself. This works fine in Chromium et al, but QtWebKit doesn't deal with Proxy Event objects well.
Moving the augmentClass definition and assignment up above the Proxy stuff resolves the issue in a PR to React: react/react#10011
@aweary

Copy link
Copy Markdown
Contributor

@gaearon do you want to make the call here? It's a (seemingly) innocent change, but I'm hesitant to accept since it sets a precedence for including changes for unsupported environments. But it's up to you.

@gaearon

Copy link
Copy Markdown
Collaborator

If it doesn't break anything I'm cool with taking it.

@awearyaweary self-assigned this Jul 6, 2017
@aweary

Copy link
Copy Markdown
Contributor

Cool, I'll verify everything looks OK locally and merge if so

@gaearon
gaearon merged commit b79619e into react:masterJul 11, 2017
@gaearon

Copy link
Copy Markdown
Collaborator

Seems fine to me, I'll get it in.

@awearyaweary mentioned this pull request Jul 11, 2017
12 tasks
@nhunzakernhunzaker mentioned this pull request Aug 10, 2017
11 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@walrusfruitcake@aweary@gaearon@facebook-github-bot