Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
9482ac92
Commit
9482ac92
authored
Sep 01, 2016
by
Alex Beregszaszi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move the URL magic for loadVersion from the compiler to the app
parent
47c4b416
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
app.js
src/app.js
+8
-2
compiler.js
src/app/compiler.js
+1
-7
No files found.
src/app.js
View file @
9482ac92
...
@@ -487,14 +487,20 @@ var run = function () {
...
@@ -487,14 +487,20 @@ var run = function () {
if
(
window
.
soljsonReleases
!==
undefined
&&
window
.
soljsonReleases
[
version
]
!==
undefined
)
{
if
(
window
.
soljsonReleases
!==
undefined
&&
window
.
soljsonReleases
[
version
]
!==
undefined
)
{
version
=
window
.
soljsonReleases
[
version
];
version
=
window
.
soljsonReleases
[
version
];
}
}
var
url
;
if
(
version
!==
'soljson.js'
)
{
url
=
'https://ethereum.github.io/solc-bin/bin/'
+
version
;
}
else
{
url
=
'soljson.js'
;
}
var
isFirefox
=
typeof
InstallTrigger
!==
'undefined'
;
var
isFirefox
=
typeof
InstallTrigger
!==
'undefined'
;
if
(
document
.
location
.
protocol
!==
'file:'
&&
Worker
!==
undefined
&&
isFirefox
)
{
if
(
document
.
location
.
protocol
!==
'file:'
&&
Worker
!==
undefined
&&
isFirefox
)
{
// Workers cannot load js on "file:"-URLs and we get a
// Workers cannot load js on "file:"-URLs and we get a
// "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium,
// "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium,
// resort to non-worker version in that case.
// resort to non-worker version in that case.
compiler
.
loadVersion
(
true
,
version
);
compiler
.
loadVersion
(
true
,
url
);
}
else
{
}
else
{
compiler
.
loadVersion
(
false
,
version
);
compiler
.
loadVersion
(
false
,
url
);
}
}
};
};
...
...
src/app/compiler.js
View file @
9482ac92
...
@@ -123,13 +123,7 @@ function Compiler (editor, queryParams, handleGithubCall, updateFiles) {
...
@@ -123,13 +123,7 @@ function Compiler (editor, queryParams, handleGithubCall, updateFiles) {
}
}
}
}
this
.
loadVersion
=
function
(
usingWorker
,
version
)
{
this
.
loadVersion
=
function
(
usingWorker
,
url
)
{
var
url
;
if
(
version
!==
'soljson.js'
)
{
url
=
'https://ethereum.github.io/solc-bin/bin/'
+
version
;
}
else
{
url
=
'soljson.js'
;
}
console
.
log
(
'Loading '
+
url
+
' '
+
(
usingWorker
?
'with worker'
:
'without worker'
));
console
.
log
(
'Loading '
+
url
+
' '
+
(
usingWorker
?
'with worker'
:
'without worker'
));
if
(
usingWorker
)
{
if
(
usingWorker
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment