Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
ofbiz-rhino
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
acfc8c96
authored
2014-04-18 17:36:01 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Disable optimization when loading r.js, as it has a method that is too
large when compiled as bytecode.
1 parent
2b75b07e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
src/com/brainfood/rhino/Require.java
src/com/brainfood/rhino/Require.java
View file @
acfc8c9
...
...
@@ -97,7 +97,13 @@ public class Require {
if
(
configPath
!=
null
&&
configPath
.
length
()
>
0
)
{
container
.
processSource
(
cx
,
this
,
configPath
);
}
cx
.
evaluateReader
(
this
,
new
FileReader
(
rLocation
.
getPath
()),
"r.js"
,
1
,
null
);
int
optLevel
=
cx
.
getOptimizationLevel
();
try
{
cx
.
setOptimizationLevel
(-
1
);
cx
.
evaluateReader
(
this
,
new
FileReader
(
rLocation
.
getPath
()),
"r.js"
,
1
,
null
);
}
finally
{
cx
.
setOptimizationLevel
(
optLevel
);
}
return
(
Function
)
cx
.
evaluateString
(
this
,
"require"
,
null
,
-
1
,
null
);
}
...
...
Please
register
or
sign in
to post a comment