This feature affects how code executed inside the browser interacts with the OS's memory. Starting with the latest Firefox 46 Nightly build, WebPages will either be allowed to write code to the memory or execute code in the memory, not both at the same time. By doing so, the W^X prevents some types of buffer overflow attacks and makes sure that when dynamic arbitrary codes are injected into the process execution stack, Firefox will crash. This will prevent it from blindly running these malicious codes.
This feature was added by Jan De Mooij and core can be read from his blog post [Click Here!]