aboutsummaryrefslogtreecommitdiff
path: root/src/jdk/nashorn/internal/runtime/resources
diff options
context:
space:
mode:
authorsundar <none@none>2013-07-11 18:23:13 +0530
committersundar <none@none>2013-07-11 18:23:13 +0530
commit8a5d5c26cae9c55069ee0085896459600c691ba2 (patch)
tree01d80b6f0321dc79294346f66f89fbeb9ea57907 /src/jdk/nashorn/internal/runtime/resources
parent8667510afabe36f4ee43ac3bee44daa6b817d35b (diff)
downloadnashorn-8a5d5c26cae9c55069ee0085896459600c691ba2.tar.gz
8020380: __noSuchProperty__ defined in mozilla_compat.js script should be non-enumerable
Reviewed-by: jlaskey, hannesw, attila
Diffstat (limited to 'src/jdk/nashorn/internal/runtime/resources')
-rw-r--r--src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js b/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js
index 206a193f..8a9fcc7d 100644
--- a/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js
+++ b/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js
@@ -48,7 +48,7 @@ Object.defineProperty(this, "importPackage", {
var _packages = [];
var global = this;
var oldNoSuchProperty = global.__noSuchProperty__;
- global.__noSuchProperty__ = function(name) {
+ var __noSuchProperty__ = function(name) {
'use strict';
for (var i in _packages) {
try {
@@ -69,6 +69,11 @@ Object.defineProperty(this, "importPackage", {
}
}
+ Object.defineProperty(global, "__noSuchProperty__", {
+ writable: true, configurable: true, enumerable: false,
+ value: __noSuchProperty__
+ });
+
var prefix = "[JavaPackage ";
return function() {
for (var i in arguments) {