js/src/jit-test/tests/ion/new-7.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 // Reduced from v8-raytrace.
     3 var Class = {
     4 	create : function() {
     5 		return function() {
     6 			this.initialize.apply(this, arguments);
     7 		}
     8 	}
     9 }
    11 var Bar = Class.create();
    12 Bar.prototype = {
    13 	// Compiled third.
    14 	initialize : function() { }
    15 }
    17 var Foo = Class.create();
    18 Foo.prototype = {
    19 	// Compiled second. Crashes when setting "bar". Uses LCallConstructor.
    20 	initialize : function() {
    21 		this.bar = new Bar();
    22 	}
    23 }
    25 // Compiled first.
    26 function f() {
    27 	for (var i = 0; i < 100; i++) {
    28 		var foo = new Foo();
    29 	}
    30 }
    32 f();

mercurial