From 4dbc99eb01a41bc72ce2613df1c4ac00a42fcc5e Mon Sep 17 00:00:00 2001 From: "nboyd%atg.com" Date: Mon, 12 Mar 2001 14:55:47 +0000 Subject: [PATCH] Close thread hazard hole. git-svn-id: svn://10.0.0.236/trunk@89339 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/rhino/org/mozilla/javascript/Context.java | 6 +++--- mozilla/js/rhino/src/org/mozilla/javascript/Context.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mozilla/js/rhino/org/mozilla/javascript/Context.java b/mozilla/js/rhino/org/mozilla/javascript/Context.java index b19f33560b0..cb3c9b83030 100644 --- a/mozilla/js/rhino/org/mozilla/javascript/Context.java +++ b/mozilla/js/rhino/org/mozilla/javascript/Context.java @@ -1369,16 +1369,16 @@ public final class Context { * Set the security support for this context. *

SecuritySupport may only be set if it is currently null. * Otherwise a SecurityException is thrown. - * @param securitySupportObj a SecuritySupport object + * @param supportObj a SecuritySupport object * @throws SecurityException if there is already a SecuritySupport * object for this Context */ - public void setSecuritySupport(SecuritySupport securitySupportObj) { + public synchronized void setSecuritySupport(SecuritySupport supportObj) { if (securitySupport != null) { throw new SecurityException("Cannot overwrite existing " + "SecuritySupport object"); } - securitySupport = securitySupportObj; + securitySupport = supportObj; } /** diff --git a/mozilla/js/rhino/src/org/mozilla/javascript/Context.java b/mozilla/js/rhino/src/org/mozilla/javascript/Context.java index b19f33560b0..cb3c9b83030 100644 --- a/mozilla/js/rhino/src/org/mozilla/javascript/Context.java +++ b/mozilla/js/rhino/src/org/mozilla/javascript/Context.java @@ -1369,16 +1369,16 @@ public final class Context { * Set the security support for this context. *

SecuritySupport may only be set if it is currently null. * Otherwise a SecurityException is thrown. - * @param securitySupportObj a SecuritySupport object + * @param supportObj a SecuritySupport object * @throws SecurityException if there is already a SecuritySupport * object for this Context */ - public void setSecuritySupport(SecuritySupport securitySupportObj) { + public synchronized void setSecuritySupport(SecuritySupport supportObj) { if (securitySupport != null) { throw new SecurityException("Cannot overwrite existing " + "SecuritySupport object"); } - securitySupport = securitySupportObj; + securitySupport = supportObj; } /**