Unverified Commit bc2c18b7 authored by Liana Husikyan's avatar Liana Husikyan Committed by GitHub

Merge pull request #2352 from ethereum/webworker

firefox restriction removed
parents f57feeab 25d3409e
......@@ -319,8 +319,8 @@ class CompilerContainer {
}
url = `${this.data.baseurl}/${this.data.selectedVersion}`
}
const isFirefox = typeof InstallTrigger !== 'undefined'
if (document.location.protocol !== 'file:' && Worker !== undefined && isFirefox) {
// Check if browser is compatible with web worker
if (this.browserSupportWorker) {
// Workers cannot load js on "file:"-URLs and we get a
// "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium,
// resort to non-worker version in that case.
......@@ -374,6 +374,10 @@ class CompilerContainer {
this.data.compileTimeout = window.setTimeout(() => this.compileIfAutoCompileOn(), this.data.timeout)
}
browserSupportWorker () {
return document.location.protocol !== 'file:' && Worker !== undefined
}
}
module.exports = CompilerContainer
......@@ -13,7 +13,10 @@ class VerifyContracts extends EventEmitter {
}
function getCompiledContracts (browser, callback) {
browser.clickLaunchIcon('solidity').execute(function () {
browser
.clickLaunchIcon('solidity')
.waitForElementPresent('#compileTabView select#compiledContracts option')
.execute(function () {
var contracts = document.querySelectorAll('#compileTabView select#compiledContracts option')
if (!contracts) {
return null
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment