Index: src/symbol.js |
diff --git a/test/mjsunit/regress/regress-171641.js b/src/symbol.js |
similarity index 86% |
copy from test/mjsunit/regress/regress-171641.js |
copy to src/symbol.js |
index 8db6781821325f8f6253eb2df4abb2b362b001c0..b7f9dc9496aac589e89e2d2761ebe6431a36008e 100644 |
--- a/test/mjsunit/regress/regress-171641.js |
+++ b/src/symbol.js |
@@ -25,16 +25,15 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --allow-natives-syntax |
+"use strict"; |
-function foo(k, p) { |
- for (var i = 0; i < 1; i++) { |
- p = Math.min(p, i); |
- } |
- m = Math.floor((k | 0) / p); |
+var $Symbol = function() { return %CreateSymbol() } |
+global.Symbol = $Symbol |
+ |
+// Symbols only have a toString method and no prototype. |
+var SymbolDelegate = { |
+ __proto__: null, |
+ toString: $Object.prototype.toString |
} |
-foo(0, 1); |
-foo(0, 1); |
-%OptimizeFunctionOnNextCall(foo); |
-foo(0, 1); |
+$Object.freeze(SymbolDelegate) |