mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix the strangest JavaScriptCore bug that I've encountered in ages.
Closes #168. Read comment for more details.
This commit is contained in:
parent
02ca95eb46
commit
b6d2d83af5
2 changed files with 9 additions and 1 deletions
|
@ -10,4 +10,6 @@
|
|||
#
|
||||
# All rights reserved.
|
||||
|
||||
uglifyjs ../dist/paper.js -o ../dist/paper-min.js -c unused=false -m -r "_$_,$_" -b ascii_only=true,beautify=false --comments /^!/
|
||||
# We need to keep dead_code around for now, since the very odd JavaScriptCore
|
||||
# scope bug fix (nop().nop()) requires it.
|
||||
uglifyjs ../dist/paper.js -o ../dist/paper-min.js -c unused=false,dead_code=false -m -r "_$_,$_" -b ascii_only=true,beautify=false --comments /^!/
|
||||
|
|
|
@ -421,5 +421,11 @@ var Segment = this.Segment = Base.extend(/** @lends Segment# */{
|
|||
}
|
||||
}
|
||||
return coords;
|
||||
// NOTE: There is a very strange bug in JavaScriptCore that causes
|
||||
// segments to receive wrong values after the transformation of a very
|
||||
// large amount of segments. For some strange reason, this unreachable
|
||||
// stamement causes JavaScriptCore to optimize code differently and not
|
||||
// cause the error. There is no nop() function...
|
||||
nop().nop();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue