Closed Bug 306825 Opened 19 years ago Closed 6 years ago

Allow to use shell.Global in servlets

Categories

(Rhino Graveyard :: Core, defect, P5)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: igor, Unassigned)

Details

Attachments

(1 file)

Currently org.mozilla.javascript.tools.shell.Global is not usable in servlet
environment since it stores its state in the static variables in
org.mozilla.javascript.tools.shell.Main. When Rhino is used as system library
for a servlet container, such static variables prevents application reload or to
use several application instances in the servlet container.

It causes code duplication as applications are forced to duplicate the
functionality that is otherwise exposed to scripts via top level function
provided by Global.
Attached patch Implementation β€” β€” Splinter Review
The patch replaces the code that uses static variables from shell.Main by
extracting necessary information either from Context or Function instances
passed to Global functions. Similar treatment is applied to the methods from
shell.Main that are called from Global.

The patch also adds new utility methods to Global and the debugger to simplify
creating, initialization and usage of Global instances.
Reassigning to please_see_bug_288433@eml.cc pending resolution of bug 288433
Assignee: igor.bukanov → please_see_bug_288433
Assignee: please_see_bug_288433 → nobody
Changing priority to P5 based on recent bug triage.
Priority: -- → P5

Closing. Bug management is now done here:
https://github.com/mozilla/rhino

Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: