Index: test/mjsunit/readonly.js |
diff --git a/test/mjsunit/readonly.js b/test/mjsunit/readonly.js |
index 4d06b7cf43c31acb8a24ffe6d3adb04c30ec14fc..132712502d986548477fa1883dd0d9ddd7d307b1 100644 |
--- a/test/mjsunit/readonly.js |
+++ b/test/mjsunit/readonly.js |
@@ -25,7 +25,8 @@ |
// (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 --harmony-proxies --es5_readonly |
+// Flags: --allow-natives-syntax --es5_readonly |
+// Flags: --harmony-proxies |
// Different ways to create an object. |
@@ -120,8 +121,12 @@ function ReadonlyByProto(o, name) { |
o.__proto__ = p; |
} |
+// Allow Proxy to be undefined, so test can run in non-Harmony mdoe as well. |
Jakob Kummerow
2014/02/28 14:25:01
nit: s/mdoe/mode/
|
+var global = this; |
+ |
function ReadonlyByProxy(o, name) { |
- var p = Proxy.create({ |
+ if (!global.Proxy) return ReadonlyByFreeze(o, name); // Dummy. |
+ var p = global.Proxy.create({ |
getPropertyDescriptor: function() { |
return {value: -46, writable: false, configurable: true}; |
} |